Skip to content

Commit 33ee4f2

Browse files
committed
feat: Add multi-source search, SKILL.md parsing, and CI/CD
- Phase 1: Add MCP Servers as skill source - Phase 2: SKILL.md parsing, ask info command - Phase 3: Dependency resolver with circular detection - Phase 4: Parallel source scanning with goroutines - Phase 6: GitHub Actions CI, goreleaser config - Add Chinese README (README_zh.md) - Add SPEC.md specification document - Add cute robot logo
1 parent 1a4cc43 commit 33ee4f2

File tree

13 files changed

+794
-39
lines changed

13 files changed

+794
-39
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.24'
19+
20+
- name: Download dependencies
21+
run: go mod download
22+
23+
- name: Run tests
24+
run: make test
25+
26+
- name: Build
27+
run: make build
28+
29+
lint:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Set up Go
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: '1.24'
38+
39+
- name: Run go vet
40+
run: make vet
41+
42+
- name: Run go fmt check
43+
run: |
44+
if [ -n "$(gofmt -l .)" ]; then
45+
echo "Go files must be formatted with gofmt"
46+
gofmt -l .
47+
exit 1
48+
fi

.goreleaser.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
project_name: ask
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
goos:
11+
- linux
12+
- darwin
13+
- windows
14+
goarch:
15+
- amd64
16+
- arm64
17+
ldflags:
18+
- -s -w
19+
20+
archives:
21+
- format: tar.gz
22+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
23+
format_overrides:
24+
- goos: windows
25+
format: zip
26+
27+
checksum:
28+
name_template: 'checksums.txt'
29+
30+
changelog:
31+
sort: asc
32+
filters:
33+
exclude:
34+
- '^docs:'
35+
- '^test:'
36+
- 'README'
37+
- Merge pull request
38+
- Merge branch
39+
40+
brews:
41+
- name: ask
42+
repository:
43+
owner: yeasy
44+
name: homebrew-tap
45+
homepage: "https://github.com/yeasy/ask"
46+
description: "Agent Skills Kit - The Package Manager for Agent Skills"
47+
license: "MIT"
48+
install: |
49+
bin.install "ask"
50+
test: |
51+
system "#{bin}/ask", "--help"

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ASK: Agent Skills Kit
22

33
<p align="center">
4-
<img src="https://via.placeholder.com/150/000000/FFFFFF/?text=ASK" alt="ASK Logo" width="150"/>
4+
<img src="assets/logo.png" alt="ASK Logo" width="150"/>
55
</p>
66

77
<p align="center">
@@ -15,6 +15,10 @@
1515
<a href="#contributing">Contributing</a>
1616
</p>
1717

18+
<p align="center">
19+
<a href="README.md">English</a> | <a href="README_zh.md">中文</a>
20+
</p>
21+
1822
---
1923

2024
**ASK** (Agent Skills Kit) is a command-line interface (CLI) designed to be the package manager for AI Agent Skills. Similar to how `brew` manages macOS packages or `npm` manages Node.js dependencies, `ask` helps you discover, install, and manage capabilities for your AI agents.

README_zh.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# ASK: Agent Skills Kit
2+
3+
<p align="center">
4+
<img src="assets/logo.png" alt="ASK Logo" width="150"/>
5+
</p>
6+
7+
<p align="center">
8+
<strong>只需询问,您的智能体即可获得。</strong>
9+
</p>
10+
11+
<p align="center">
12+
<a href="#功能特性">功能特性</a> •
13+
<a href="#安装">安装</a> •
14+
<a href="#使用方法">使用方法</a> •
15+
<a href="#贡献">贡献</a>
16+
</p>
17+
18+
---
19+
20+
**ASK**(Agent Skills Kit,智能体技能工具包)是一个命令行工具,专门用于管理 AI 智能体的技能包。类似于 `brew` 管理 macOS 软件包或 `npm` 管理 Node.js 依赖,`ask` 帮助您发现、安装和管理智能体的能力扩展。
21+
22+
## 功能特性
23+
24+
- **📦 包管理**:轻松安装、卸载和列出技能。
25+
- **🔍 多源搜索**:从多个来源搜索技能(基于主题和目录)。
26+
- **🌐 多数据源**:内置支持 `agent-skill` 主题和 [Anthropics Skills](https://github.com/anthropics/skills)
27+
- **⚡️ 快速原生**:使用 Go 构建,编译为单个静态二进制文件,无运行时依赖。
28+
- **🛠 项目本地化**:通过 `ask.yaml` 管理依赖,保持项目可复现性。
29+
30+
## 安装
31+
32+
### macOS (Homebrew)
33+
```bash
34+
brew tap yeasy/ask
35+
brew install ask
36+
```
37+
38+
### 手动安装
39+
[Releases](https://github.com/yeasy/ask/releases) 页面下载最新版本,或从源码构建:
40+
41+
```bash
42+
git clone https://github.com/yeasy/ask.git
43+
cd ask
44+
make build
45+
mv ask /usr/local/bin/
46+
```
47+
48+
## 使用方法
49+
50+
### 1. 初始化项目
51+
在您的智能体根目录中初始化 `ask`
52+
```bash
53+
ask init
54+
```
55+
这将创建一个 `ask.yaml` 文件来跟踪您的技能。
56+
57+
### 2. 搜索技能
58+
查找符合需求的技能:
59+
```bash
60+
ask search browser
61+
# 返回如: browser-use, web-surfer 等技能
62+
```
63+
64+
### 3. 安装技能
65+
直接从 GitHub 安装技能:
66+
```bash
67+
ask install browser-use/browser-use
68+
```
69+
这将:
70+
- 将仓库克隆到 `./skills/browser-use`
71+
- 将依赖添加到 `ask.yaml`
72+
73+
### 4. 卸载技能
74+
移除不再需要的技能:
75+
```bash
76+
ask uninstall browser-use
77+
```
78+
这将:
79+
- 删除 `skills/browser-use` 目录
80+
-`ask.yaml` 中移除依赖
81+
82+
### 5. 列出已安装技能
83+
查看您的智能体已装备的技能:
84+
```bash
85+
ask list
86+
```
87+
88+
## 目录结构
89+
使用 `ask` 后,您的项目结构如下:
90+
91+
```text
92+
my-agent/
93+
├── ask.yaml # 清单文件
94+
├── main.py # 您的智能体代码
95+
└── skills/ # 托管技能目录
96+
├── browser-use/
97+
└── web-surfer/
98+
```
99+
100+
## 技能来源
101+
默认情况下,`ask` 搜索以下来源:
102+
103+
1. **Community**`topic`):带有 `agent-skill` 主题的 GitHub 仓库。
104+
2. **Anthropics**`dir`):来自 [anthropics/skills](https://github.com/anthropics/skills/tree/main/skills) 的技能。
105+
106+
您可以在 `ask.yaml` 中自定义来源:
107+
108+
```yaml
109+
version: "1.0"
110+
skills:
111+
- browser-use
112+
sources:
113+
- name: community
114+
type: topic
115+
url: agent-skill
116+
- name: anthropics
117+
type: dir
118+
url: anthropics/skills/skills
119+
```
120+
121+
## 开发
122+
本项目包含 `Makefile` 以简化常见开发任务:
123+
124+
- `make build`:编译二进制文件为 `ask`。
125+
- `make test`:运行单元测试。
126+
- `make clean`:删除二进制文件并运行 `go clean`。
127+
- `make run`:运行 `go run main.go`。
128+
- `make deps`:下载依赖(`go mod download`)。
129+
- `make fmt`:格式化代码(`go fmt ./...`)。
130+
- `make vet`:检查代码(`go vet ./...`)。
131+
- `make install`:将二进制文件安装到 `$GOPATH/bin`(`go install`)。
132+
133+
## 贡献
134+
我们欢迎贡献!请查看我们的 [贡献指南](CONTRIBUTING.md)。
135+
136+
## 许可证
137+
MIT

0 commit comments

Comments
 (0)