askill-cli 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -153
- package/dist/cli.mjs +9 -10
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,19 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
> The package manager for AI agent skills.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/askill-cli)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
+
<details>
|
|
9
|
+
<summary><strong>🤖 For AI Agents (click to expand)</strong></summary>
|
|
10
|
+
|
|
11
|
+
You are an AI agent helping a user with askill - a package manager for AI agent skills.
|
|
12
|
+
|
|
13
|
+
**Quick Commands:**
|
|
14
|
+
```bash
|
|
15
|
+
# Install a skill
|
|
16
|
+
askill add owner/repo@skill-name -y
|
|
17
|
+
|
|
18
|
+
# Install all skills from a repo
|
|
19
|
+
askill add owner/repo --all -y
|
|
20
|
+
|
|
21
|
+
# List installed skills
|
|
22
|
+
askill list
|
|
23
|
+
|
|
24
|
+
# Search for skills
|
|
25
|
+
askill find <query>
|
|
26
|
+
|
|
27
|
+
# Run a skill command
|
|
28
|
+
askill run skill-name:command
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Key Behaviors:**
|
|
32
|
+
- Use `-y` flag to skip confirmation prompts
|
|
33
|
+
- Use `-a <agent>` to specify target agent (claude-code, cursor, opencode, etc.)
|
|
34
|
+
- Skills are installed to `.agents/skills/` and symlinked to agent directories
|
|
35
|
+
- Check `~/.agents/.skill-lock.json` for installed skill metadata
|
|
36
|
+
|
|
37
|
+
**For Skill Development:**
|
|
38
|
+
- Read [`docs/skill-spec.md`](./docs/skill-spec.md) for SKILL.md format
|
|
39
|
+
- Use `askill init` to create a new skill template
|
|
40
|
+
- Use `askill validate` to check SKILL.md syntax
|
|
41
|
+
|
|
42
|
+
**Installed Skills:**
|
|
43
|
+
After installation, read the skill's `SKILL.md` file for usage instructions. Skills are located at:
|
|
44
|
+
- Project: `.agents/skills/<skill-name>/SKILL.md`
|
|
45
|
+
- Global: `~/.agents/skills/<skill-name>/SKILL.md`
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
8
51
|
askill is a universal package manager for AI agent skills. It enables agents to discover, install, and use skills across Claude Code, Cursor, Windsurf, and 40+ other AI coding assistants.
|
|
9
52
|
|
|
10
53
|
## Quick Start
|
|
11
54
|
|
|
12
55
|
```bash
|
|
13
56
|
# Install
|
|
14
|
-
|
|
57
|
+
curl -fsSL https://askill.sh/install.sh | sh
|
|
15
58
|
|
|
16
|
-
# Install a skill
|
|
17
|
-
askill add
|
|
59
|
+
# Install a skill
|
|
60
|
+
askill add owner/repo@skill-name
|
|
18
61
|
|
|
19
62
|
# Search for skills
|
|
20
63
|
askill find code review
|
|
@@ -23,29 +66,24 @@ askill find code review
|
|
|
23
66
|
askill list
|
|
24
67
|
```
|
|
25
68
|
|
|
26
|
-
##
|
|
69
|
+
## Installation
|
|
27
70
|
|
|
28
|
-
-
|
|
29
|
-
- [Usage](#usage)
|
|
30
|
-
- [Documentation](#documentation)
|
|
31
|
-
- [Skills](#skills)
|
|
32
|
-
- [For Developers](#for-developers)
|
|
33
|
-
- [Project Structure](#project-structure)
|
|
34
|
-
- [Contributing](#contributing)
|
|
35
|
-
- [License](#license)
|
|
71
|
+
### One-line install (recommended)
|
|
36
72
|
|
|
37
|
-
|
|
73
|
+
```bash
|
|
74
|
+
curl -fsSL https://askill.sh/install.sh | sh
|
|
75
|
+
```
|
|
38
76
|
|
|
39
|
-
### npm
|
|
77
|
+
### npm
|
|
40
78
|
|
|
41
79
|
```bash
|
|
42
|
-
npm install -g
|
|
80
|
+
npm install -g askill-cli
|
|
43
81
|
```
|
|
44
82
|
|
|
45
83
|
### npx (no install)
|
|
46
84
|
|
|
47
85
|
```bash
|
|
48
|
-
npx
|
|
86
|
+
npx askill-cli add owner/repo@skill-name
|
|
49
87
|
```
|
|
50
88
|
|
|
51
89
|
### Verify
|
|
@@ -59,105 +97,75 @@ askill --version
|
|
|
59
97
|
### Install a Skill
|
|
60
98
|
|
|
61
99
|
```bash
|
|
62
|
-
# From GitHub
|
|
63
|
-
askill add
|
|
100
|
+
# From GitHub
|
|
101
|
+
askill add facebook/react@extract-errors
|
|
64
102
|
|
|
65
|
-
#
|
|
66
|
-
askill add
|
|
103
|
+
# Browse and select from a repo
|
|
104
|
+
askill add anthropics/courses
|
|
105
|
+
|
|
106
|
+
# Install all skills from a repo
|
|
107
|
+
askill add owner/repo --all
|
|
67
108
|
|
|
68
109
|
# Non-interactive (for CI/agents)
|
|
69
|
-
askill add
|
|
110
|
+
askill add owner/repo@skill -y
|
|
70
111
|
```
|
|
71
112
|
|
|
72
|
-
### Search
|
|
113
|
+
### Search & Discover
|
|
73
114
|
|
|
74
115
|
```bash
|
|
75
116
|
askill find memory
|
|
76
|
-
askill find
|
|
117
|
+
askill find code review
|
|
77
118
|
```
|
|
78
119
|
|
|
79
|
-
###
|
|
120
|
+
### Manage Skills
|
|
80
121
|
|
|
81
122
|
```bash
|
|
123
|
+
# List installed
|
|
82
124
|
askill list
|
|
83
125
|
askill list -g # global only
|
|
84
|
-
```
|
|
85
126
|
|
|
86
|
-
|
|
127
|
+
# Check for updates
|
|
128
|
+
askill check
|
|
87
129
|
|
|
88
|
-
|
|
130
|
+
# Update skills
|
|
131
|
+
askill update
|
|
89
132
|
|
|
90
|
-
|
|
91
|
-
askill
|
|
133
|
+
# Remove
|
|
134
|
+
askill remove skill-name
|
|
92
135
|
|
|
93
|
-
#
|
|
94
|
-
askill
|
|
95
|
-
askill run @anthropic/memory:recall --key preferences
|
|
136
|
+
# Update CLI itself
|
|
137
|
+
askill upgrade
|
|
96
138
|
```
|
|
97
139
|
|
|
98
|
-
###
|
|
140
|
+
### Run Skill Commands
|
|
141
|
+
|
|
142
|
+
Skills can define executable commands:
|
|
99
143
|
|
|
100
144
|
```bash
|
|
101
|
-
askill
|
|
145
|
+
askill run skill-name:command [args]
|
|
146
|
+
|
|
147
|
+
# Example
|
|
148
|
+
askill run memory:save --key name --value "John"
|
|
102
149
|
```
|
|
103
150
|
|
|
104
151
|
## Documentation
|
|
105
152
|
|
|
106
|
-
Complete documentation is available in the [`docs/`](./docs/) directory:
|
|
107
|
-
|
|
108
153
|
| Document | Description |
|
|
109
154
|
|----------|-------------|
|
|
110
|
-
| [
|
|
111
|
-
| [Getting Started](./docs/getting-started.md) | Quick start guide with examples |
|
|
112
|
-
| [SKILL.md Specification](./docs/skill-spec.md) | Complete protocol for writing skills |
|
|
113
|
-
| [Slug System](./docs/slug-system.md) | How skill identification works (`@scope/name` vs `gh:`) |
|
|
114
|
-
| [Publishing Guide](./docs/publishing.md) | How to publish your own skills |
|
|
155
|
+
| [Getting Started](./docs/getting-started.md) | Quick start guide |
|
|
115
156
|
| [CLI Reference](./docs/cli-reference.md) | Complete command documentation |
|
|
116
|
-
| [
|
|
117
|
-
|
|
118
|
-
### For AI Agents
|
|
157
|
+
| [SKILL.md Specification](./docs/skill-spec.md) | How to write skills |
|
|
158
|
+
| [Publishing Guide](./docs/publishing.md) | Publish your own skills |
|
|
119
159
|
|
|
120
|
-
|
|
160
|
+
## Creating Skills
|
|
121
161
|
|
|
122
|
-
1.
|
|
123
|
-
2. **To develop skills**: Read [`skills/@askill/developer/SKILL.md`](./skills/@askill/developer/SKILL.md)
|
|
124
|
-
3. **To understand the protocol**: Read [`docs/skill-spec.md`](./docs/skill-spec.md)
|
|
125
|
-
|
|
126
|
-
## Skills
|
|
127
|
-
|
|
128
|
-
### Slug System
|
|
129
|
-
|
|
130
|
-
Skills are identified by slugs:
|
|
131
|
-
|
|
132
|
-
| Type | Format | Example |
|
|
133
|
-
|------|--------|---------|
|
|
134
|
-
| Published | `@scope/name` | `@anthropic/memory` |
|
|
135
|
-
| Indexed | `gh:owner/repo/path` | `gh:facebook/react/scripts/errors` |
|
|
136
|
-
|
|
137
|
-
Published skills are hosted on [askill.sh](https://askill.sh). Indexed skills are automatically discovered from GitHub.
|
|
138
|
-
|
|
139
|
-
### Official Skills
|
|
140
|
-
|
|
141
|
-
| Skill | Description | Path |
|
|
142
|
-
|-------|-------------|------|
|
|
143
|
-
| `@askill/agent` | Teaches agents how to use installed skills | [`skills/@askill/agent/`](./skills/@askill/agent/SKILL.md) |
|
|
144
|
-
| `@askill/developer` | Teaches agents how to develop skills | [`skills/@askill/developer/`](./skills/@askill/developer/SKILL.md) |
|
|
145
|
-
|
|
146
|
-
### SKILL.md Format
|
|
147
|
-
|
|
148
|
-
Skills are defined by a `SKILL.md` file:
|
|
162
|
+
1. Create a `SKILL.md` file:
|
|
149
163
|
|
|
150
164
|
```markdown
|
|
151
165
|
---
|
|
152
166
|
name: my-skill
|
|
153
167
|
description: What this skill does
|
|
154
168
|
version: 1.0.0
|
|
155
|
-
dependencies:
|
|
156
|
-
- @dependency/one@^1.0.0
|
|
157
|
-
commands:
|
|
158
|
-
build:
|
|
159
|
-
run: npm run build
|
|
160
|
-
description: Build the project
|
|
161
169
|
---
|
|
162
170
|
|
|
163
171
|
# My Skill
|
|
@@ -165,85 +173,15 @@ commands:
|
|
|
165
173
|
Instructions for the agent...
|
|
166
174
|
```
|
|
167
175
|
|
|
168
|
-
See [SKILL.md Specification](./docs/skill-spec.md) for complete details.
|
|
169
|
-
|
|
170
|
-
## For Developers
|
|
171
|
-
|
|
172
|
-
### Creating a Skill
|
|
173
|
-
|
|
174
|
-
1. Create a `SKILL.md` file with frontmatter and instructions
|
|
175
176
|
2. Test locally: `askill add ./my-skill`
|
|
176
|
-
3. Validate: `askill validate
|
|
177
|
-
4. Publish:
|
|
177
|
+
3. Validate: `askill validate`
|
|
178
|
+
4. Publish: Push to GitHub, it's automatically indexed
|
|
178
179
|
|
|
179
180
|
See [Publishing Guide](./docs/publishing.md) for details.
|
|
180
181
|
|
|
181
|
-
### Building the CLI
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
# Install dependencies
|
|
185
|
-
npm install
|
|
186
|
-
|
|
187
|
-
# Build
|
|
188
|
-
npm run build
|
|
189
|
-
|
|
190
|
-
# Run locally
|
|
191
|
-
node dist/cli.mjs --help
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Project Structure
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
askill/
|
|
198
|
-
├── src/ # CLI source code
|
|
199
|
-
│ ├── cli.ts # Main entry point
|
|
200
|
-
│ ├── api.ts # API client
|
|
201
|
-
│ ├── installer.ts # Skill installation
|
|
202
|
-
│ ├── config.ts # User preferences
|
|
203
|
-
│ ├── updater.ts # Self-update
|
|
204
|
-
│ └── constants.ts # Config and agent definitions
|
|
205
|
-
├── docs/ # Documentation
|
|
206
|
-
│ ├── introduction.md # Overview
|
|
207
|
-
│ ├── getting-started.md # Quick start
|
|
208
|
-
│ ├── skill-spec.md # SKILL.md protocol
|
|
209
|
-
│ ├── slug-system.md # Slug identification
|
|
210
|
-
│ ├── publishing.md # Publishing guide
|
|
211
|
-
│ ├── cli-reference.md # CLI commands
|
|
212
|
-
│ └── api-spec.md # REST API spec
|
|
213
|
-
├── skills/ # Official skills
|
|
214
|
-
│ └── @askill/
|
|
215
|
-
│ ├── agent/ # For using skills
|
|
216
|
-
│ └── developer/ # For creating skills
|
|
217
|
-
├── package.json
|
|
218
|
-
├── tsconfig.json
|
|
219
|
-
└── README.md
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
## Related Projects
|
|
223
|
-
|
|
224
|
-
| Project | Description | Repository |
|
|
225
|
-
|---------|-------------|------------|
|
|
226
|
-
| askill (this repo) | CLI and documentation | [avibe-bot/askill](https://github.com/avibe-bot/askill) |
|
|
227
|
-
| askill-registry | Web platform and API | [avibe-bot/askill-registry](https://github.com/avibe-bot/askill-registry) |
|
|
228
|
-
|
|
229
182
|
## Contributing
|
|
230
183
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
### Development Setup
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
git clone https://github.com/avibe-bot/askill.git
|
|
237
|
-
cd askill
|
|
238
|
-
npm install
|
|
239
|
-
npm run build
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Running Tests
|
|
243
|
-
|
|
244
|
-
```bash
|
|
245
|
-
npm test
|
|
246
|
-
```
|
|
184
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
|
|
247
185
|
|
|
248
186
|
## License
|
|
249
187
|
|
|
@@ -251,4 +189,4 @@ MIT License - see [LICENSE](./LICENSE) for details.
|
|
|
251
189
|
|
|
252
190
|
---
|
|
253
191
|
|
|
254
|
-
**Website**: [askill.sh](https://askill.sh) | **npm**: [
|
|
192
|
+
**Website**: [askill.sh](https://askill.sh) | **npm**: [askill-cli](https://www.npmjs.com/package/askill-cli) | **GitHub**: [avibe-bot/askill](https://github.com/avibe-bot/askill)
|
package/dist/cli.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { homedir } from "os";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
|
-
var VERSION = "0.1.
|
|
7
|
+
var VERSION = "0.1.1";
|
|
8
8
|
var API_BASE_URL = "https://askill.sh/api/v1";
|
|
9
9
|
var RESET = "\x1B[0m";
|
|
10
10
|
var BOLD = "\x1B[1m";
|
|
@@ -766,7 +766,7 @@ async function checkForUpdates(force = false) {
|
|
|
766
766
|
console.log();
|
|
767
767
|
console.log(`${YELLOW}\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E${RESET}`);
|
|
768
768
|
console.log(`${YELLOW}\u2502${RESET} Update available: ${DIM}${current}${RESET} \u2192 ${GREEN}${latest}${RESET} ${YELLOW}\u2502${RESET}`);
|
|
769
|
-
console.log(`${YELLOW}\u2502${RESET} Run ${CYAN}askill
|
|
769
|
+
console.log(`${YELLOW}\u2502${RESET} Run ${CYAN}askill upgrade${RESET} to update ${YELLOW}\u2502${RESET}`);
|
|
770
770
|
console.log(`${YELLOW}\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F${RESET}`);
|
|
771
771
|
console.log();
|
|
772
772
|
}
|
|
@@ -795,9 +795,9 @@ async function selfUpdate() {
|
|
|
795
795
|
if (!downloadUrl) {
|
|
796
796
|
console.log(`${RED}No download available for your platform (${platformKey})${RESET}`);
|
|
797
797
|
console.log(`Please update manually:`);
|
|
798
|
-
console.log(` ${CYAN}npm install -g @askill/cli@latest${RESET}`);
|
|
799
|
-
console.log(` ${DIM}or${RESET}`);
|
|
800
798
|
console.log(` ${CYAN}curl -fsSL https://askill.sh/install.sh | sh${RESET}`);
|
|
799
|
+
console.log(` ${DIM}or${RESET}`);
|
|
800
|
+
console.log(` ${CYAN}npm install -g askill-cli@latest${RESET}`);
|
|
801
801
|
return false;
|
|
802
802
|
}
|
|
803
803
|
try {
|
|
@@ -805,7 +805,7 @@ async function selfUpdate() {
|
|
|
805
805
|
const isNodeProcess = execPath.includes("node") || execPath.includes("bun");
|
|
806
806
|
if (isNodeProcess) {
|
|
807
807
|
console.log(`${YELLOW}Running via Node.js runtime${RESET}`);
|
|
808
|
-
console.log(`Please update using: ${CYAN}npm install -g
|
|
808
|
+
console.log(`Please update using: ${CYAN}npm install -g askill-cli@latest${RESET}`);
|
|
809
809
|
return false;
|
|
810
810
|
}
|
|
811
811
|
const tempPath = `${execPath}.new`;
|
|
@@ -837,9 +837,9 @@ async function selfUpdate() {
|
|
|
837
837
|
} catch (error) {
|
|
838
838
|
console.log(`${RED}Update failed: ${error instanceof Error ? error.message : "Unknown error"}${RESET}`);
|
|
839
839
|
console.log(`Please update manually:`);
|
|
840
|
-
console.log(` ${CYAN}npm install -g @askill/cli@latest${RESET}`);
|
|
841
|
-
console.log(` ${DIM}or${RESET}`);
|
|
842
840
|
console.log(` ${CYAN}curl -fsSL https://askill.sh/install.sh | sh${RESET}`);
|
|
841
|
+
console.log(` ${DIM}or${RESET}`);
|
|
842
|
+
console.log(` ${CYAN}npm install -g askill-cli@latest${RESET}`);
|
|
843
843
|
return false;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
@@ -1474,7 +1474,7 @@ ${BOLD}Commands:${RESET}
|
|
|
1474
1474
|
check Check installed skills for updates
|
|
1475
1475
|
update [skill] Update installed skills
|
|
1476
1476
|
run <skill:cmd> Run a skill command
|
|
1477
|
-
|
|
1477
|
+
upgrade Update askill CLI to latest version
|
|
1478
1478
|
|
|
1479
1479
|
${BOLD}Skill Source Formats:${RESET}
|
|
1480
1480
|
owner/repo All skills from a GitHub repo
|
|
@@ -2779,10 +2779,9 @@ async function main() {
|
|
|
2779
2779
|
await runCheck(restArgs);
|
|
2780
2780
|
break;
|
|
2781
2781
|
case "update":
|
|
2782
|
-
case "upgrade":
|
|
2783
2782
|
await runUpdate(restArgs);
|
|
2784
2783
|
break;
|
|
2785
|
-
case "
|
|
2784
|
+
case "upgrade":
|
|
2786
2785
|
await selfUpdate();
|
|
2787
2786
|
break;
|
|
2788
2787
|
case "run":
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askill-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "askill - The Agent Skill Package Manager",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"askill": "
|
|
7
|
+
"askill": "dist/cli.mjs"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
|
-
"url": "https://github.com/avibe-bot/askill.git"
|
|
40
|
+
"url": "git+https://github.com/avibe-bot/askill.git"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://askill.sh",
|
|
43
43
|
"author": "askill",
|