@zot24/add-skill 1.0.10
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 +270 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1120 -0
- package/package.json +55 -0
package/README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# add-skill
|
|
2
|
+
|
|
3
|
+
> **Fork Notice:** This is a fork of [vercel-labs/add-skill](https://github.com/vercel-labs/add-skill/).
|
|
4
|
+
>
|
|
5
|
+
> **Install this fork:**
|
|
6
|
+
> ```bash
|
|
7
|
+
> bunx github:zot24/add-skill vercel-labs/agent-skills
|
|
8
|
+
> ```
|
|
9
|
+
>
|
|
10
|
+
> **Why this fork exists:** The original repository lacks skill management features for batch installation. This fork adds the `--from-file` option to install skills from a TOML manifest file, enabling easier skill synchronization across teams and projects.
|
|
11
|
+
|
|
12
|
+
Install agent skills onto your coding agents from any git repository.
|
|
13
|
+
|
|
14
|
+
Supports [OpenCode](https://opencode.ai), [Claude Code](https://claude.ai/code), [Codex](https://developers.openai.com/codex), [Cursor](https://cursor.com), and [Antigravity](https://antigravity.google).
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx add-skill vercel-labs/agent-skills
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What are Agent Skills?
|
|
23
|
+
|
|
24
|
+
Agent skills are reusable instruction sets that extend your coding agent's capabilities. They're defined in `SKILL.md` files with YAML frontmatter containing a `name` and `description`.
|
|
25
|
+
|
|
26
|
+
Skills let agents perform specialized tasks like:
|
|
27
|
+
- Generating release notes from git history
|
|
28
|
+
- Creating PRs following your team's conventions
|
|
29
|
+
- Integrating with external tools (Linear, Notion, etc.)
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Source Formats
|
|
34
|
+
|
|
35
|
+
The `<source>` argument accepts multiple formats:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# GitHub shorthand
|
|
39
|
+
npx add-skill vercel-labs/agent-skills
|
|
40
|
+
|
|
41
|
+
# Full GitHub URL
|
|
42
|
+
npx add-skill https://github.com/vercel-labs/agent-skills
|
|
43
|
+
|
|
44
|
+
# Direct path to a skill in a repo
|
|
45
|
+
npx add-skill https://github.com/vercel-labs/agent-skills/tree/main/skills/frontend-design
|
|
46
|
+
|
|
47
|
+
# GitLab URL
|
|
48
|
+
npx add-skill https://gitlab.com/org/repo
|
|
49
|
+
|
|
50
|
+
# Any git URL
|
|
51
|
+
npx add-skill git@github.com:vercel-labs/agent-skills.git
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Options
|
|
55
|
+
|
|
56
|
+
| Option | Description |
|
|
57
|
+
|--------|-------------|
|
|
58
|
+
| `-g, --global` | Install to user directory instead of project |
|
|
59
|
+
| `-a, --agent <agents...>` | Target specific agents: `opencode`, `claude-code`, `codex`, `cursor`, `antigravity` |
|
|
60
|
+
| `-s, --skill <skills...>` | Install specific skills by name |
|
|
61
|
+
| `-f, --from-file <path>` | Install skills from a manifest file |
|
|
62
|
+
| `--no-lock` | Skip generating lock file when using `--from-file` |
|
|
63
|
+
| `-l, --list` | List available skills without installing |
|
|
64
|
+
| `-y, --yes` | Skip all confirmation prompts |
|
|
65
|
+
| `-V, --version` | Show version number |
|
|
66
|
+
| `-h, --help` | Show help |
|
|
67
|
+
|
|
68
|
+
### Examples
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# List skills in a repository
|
|
72
|
+
npx add-skill vercel-labs/agent-skills --list
|
|
73
|
+
|
|
74
|
+
# Install multiple specific skills
|
|
75
|
+
npx add-skill vercel-labs/agent-skills --skill frontend-design --skill skill-creator
|
|
76
|
+
|
|
77
|
+
# Install to specific agents
|
|
78
|
+
npx add-skill vercel-labs/agent-skills -a claude-code -a opencode
|
|
79
|
+
|
|
80
|
+
# Non-interactive installation (CI/CD friendly)
|
|
81
|
+
npx add-skill vercel-labs/agent-skills --skill frontend-design -g -a claude-code -y
|
|
82
|
+
|
|
83
|
+
# Install all skills from a repo
|
|
84
|
+
npx add-skill vercel-labs/agent-skills -y -g
|
|
85
|
+
|
|
86
|
+
# Install skills from a manifest file
|
|
87
|
+
npx add-skill --from-file skills.toml
|
|
88
|
+
|
|
89
|
+
# Manifest with options
|
|
90
|
+
npx add-skill -f skills.toml -g -a claude-code -y
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Installation Paths
|
|
94
|
+
|
|
95
|
+
Skills are installed to different locations depending on the agent and scope:
|
|
96
|
+
|
|
97
|
+
### Project-level (default)
|
|
98
|
+
|
|
99
|
+
Installed in your current working directory. Commit these to share with your team.
|
|
100
|
+
|
|
101
|
+
| Agent | Path |
|
|
102
|
+
|-------|------|
|
|
103
|
+
| OpenCode | `.opencode/skill/<name>/` |
|
|
104
|
+
| Claude Code | `.claude/skills/<name>/` |
|
|
105
|
+
| Codex | `.codex/skills/<name>/` |
|
|
106
|
+
| Cursor | `.cursor/skills/<name>/` |
|
|
107
|
+
| Antigravity | `.agent/skills/<name>/` |
|
|
108
|
+
|
|
109
|
+
### Global (`--global`)
|
|
110
|
+
|
|
111
|
+
Installed in your home directory. Available across all projects.
|
|
112
|
+
|
|
113
|
+
| Agent | Path |
|
|
114
|
+
|-------|------|
|
|
115
|
+
| OpenCode | `~/.config/opencode/skill/<name>/` |
|
|
116
|
+
| Claude Code | `~/.claude/skills/<name>/` |
|
|
117
|
+
| Codex | `~/.codex/skills/<name>/` |
|
|
118
|
+
| Cursor | `~/.cursor/skills/<name>/` |
|
|
119
|
+
| Antigravity | `~/.gemini/antigravity/skills/<name>/` |
|
|
120
|
+
|
|
121
|
+
## Agent Detection
|
|
122
|
+
|
|
123
|
+
The CLI automatically detects which coding agents you have installed by checking for their configuration directories. If none are detected, you'll be prompted to select which agents to install to.
|
|
124
|
+
|
|
125
|
+
## Manifest Files (Fork Feature)
|
|
126
|
+
|
|
127
|
+
The `--from-file` option allows you to install multiple skills from a TOML manifest file. This is useful for:
|
|
128
|
+
- Sharing a consistent skill set across a team
|
|
129
|
+
- Automating skill setup in CI/CD pipelines
|
|
130
|
+
- Installing skills from multiple repositories
|
|
131
|
+
|
|
132
|
+
### Manifest Format
|
|
133
|
+
|
|
134
|
+
Create a `skills.toml` file:
|
|
135
|
+
|
|
136
|
+
```toml
|
|
137
|
+
# My project skills
|
|
138
|
+
|
|
139
|
+
[[skills]]
|
|
140
|
+
source = "vercel-labs/agent-skills"
|
|
141
|
+
name = "frontend-design"
|
|
142
|
+
version = "1.0.0"
|
|
143
|
+
|
|
144
|
+
[[skills]]
|
|
145
|
+
source = "vercel-labs/agent-skills"
|
|
146
|
+
name = "code-review"
|
|
147
|
+
|
|
148
|
+
[[skills]]
|
|
149
|
+
source = "other-org/custom-skills"
|
|
150
|
+
name = "my-skill"
|
|
151
|
+
version = "2.0.0"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Each `[[skills]]` entry requires:
|
|
155
|
+
- `source`: Repository in `owner/repo` format or full git URL
|
|
156
|
+
- `name`: Name of the skill to install
|
|
157
|
+
|
|
158
|
+
Optional fields:
|
|
159
|
+
- `version`: Semantic version (e.g., `1.0.0`) - defaults to latest
|
|
160
|
+
|
|
161
|
+
### Lock File
|
|
162
|
+
|
|
163
|
+
A `-lock.toml` file is generated alongside the manifest (e.g., `skills-lock.toml`), recording:
|
|
164
|
+
- Exact commit SHA for reproducibility
|
|
165
|
+
- Installation timestamps
|
|
166
|
+
|
|
167
|
+
```toml
|
|
168
|
+
lockVersion = 1
|
|
169
|
+
|
|
170
|
+
[[skills]]
|
|
171
|
+
source = "vercel-labs/agent-skills"
|
|
172
|
+
name = "frontend-design"
|
|
173
|
+
version = "1.0.0"
|
|
174
|
+
resolvedRef = "a1b2c3d4e5f6789abc0123456789def012345678"
|
|
175
|
+
installedAt = "2026-01-16T12:00:00.000Z"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Use `--no-lock` to skip lock file generation.
|
|
179
|
+
|
|
180
|
+
## Creating Skills
|
|
181
|
+
|
|
182
|
+
Skills are directories containing a `SKILL.md` file with YAML frontmatter:
|
|
183
|
+
|
|
184
|
+
```markdown
|
|
185
|
+
---
|
|
186
|
+
name: my-skill
|
|
187
|
+
description: What this skill does and when to use it
|
|
188
|
+
version: 1.0.0
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
# My Skill
|
|
192
|
+
|
|
193
|
+
Instructions for the agent to follow when this skill is activated.
|
|
194
|
+
|
|
195
|
+
## When to Use
|
|
196
|
+
|
|
197
|
+
Describe the scenarios where this skill should be used.
|
|
198
|
+
|
|
199
|
+
## Steps
|
|
200
|
+
|
|
201
|
+
1. First, do this
|
|
202
|
+
2. Then, do that
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Required Fields
|
|
206
|
+
|
|
207
|
+
- `name`: Unique identifier (lowercase, hyphens allowed)
|
|
208
|
+
- `description`: Brief explanation of what the skill does
|
|
209
|
+
|
|
210
|
+
### Optional Fields
|
|
211
|
+
|
|
212
|
+
- `version`: Semantic version for the skill (e.g., `1.0.0`). Used for version validation when installing from a manifest.
|
|
213
|
+
|
|
214
|
+
### Skill Discovery
|
|
215
|
+
|
|
216
|
+
The CLI searches for skills in these locations within a repository:
|
|
217
|
+
|
|
218
|
+
- Root directory (if it contains `SKILL.md`)
|
|
219
|
+
- `skills/`
|
|
220
|
+
- `skills/.curated/`
|
|
221
|
+
- `skills/.experimental/`
|
|
222
|
+
- `skills/.system/`
|
|
223
|
+
- `.codex/skills/`
|
|
224
|
+
- `.claude/skills/`
|
|
225
|
+
- `.opencode/skill/`
|
|
226
|
+
- `.cursor/skills/`
|
|
227
|
+
- `.agent/skills/`
|
|
228
|
+
|
|
229
|
+
If no skills are found in standard locations, a recursive search is performed.
|
|
230
|
+
|
|
231
|
+
## Compatibility
|
|
232
|
+
|
|
233
|
+
Skills are generally compatible across agents since they follow a shared [Agent Skills specification](https://agentskills.io). However, some features may be agent-specific:
|
|
234
|
+
|
|
235
|
+
| Feature | OpenCode | Claude Code | Codex | Cursor | Antigravity |
|
|
236
|
+
|---------|----------|-------------|-------|--------|-------------|
|
|
237
|
+
| Basic skills | Yes | Yes | Yes | Yes | Yes |
|
|
238
|
+
| `allowed-tools` | Yes | Yes | Yes | Yes | Yes |
|
|
239
|
+
| `context: fork` | No | Yes | No | No | No |
|
|
240
|
+
| Hooks | No | Yes | No | No | No |
|
|
241
|
+
|
|
242
|
+
## Troubleshooting
|
|
243
|
+
|
|
244
|
+
### "No skills found"
|
|
245
|
+
|
|
246
|
+
Ensure the repository contains valid `SKILL.md` files with both `name` and `description` in the frontmatter.
|
|
247
|
+
|
|
248
|
+
### Skill not loading in agent
|
|
249
|
+
|
|
250
|
+
- Verify the skill was installed to the correct path
|
|
251
|
+
- Check the agent's documentation for skill loading requirements
|
|
252
|
+
- Ensure the `SKILL.md` frontmatter is valid YAML
|
|
253
|
+
|
|
254
|
+
### Permission errors
|
|
255
|
+
|
|
256
|
+
Ensure you have write access to the target directory.
|
|
257
|
+
|
|
258
|
+
## Related Links
|
|
259
|
+
|
|
260
|
+
- [Vercel Agent Skills Repository](https://github.com/vercel-labs/agent-skills)
|
|
261
|
+
- [Agent Skills Specification](https://agentskills.io)
|
|
262
|
+
- [OpenCode Skills Documentation](https://opencode.ai/docs/skills)
|
|
263
|
+
- [Claude Code Skills Documentation](https://code.claude.com/docs/en/skills)
|
|
264
|
+
- [Codex Skills Documentation](https://developers.openai.com/codex/skills)
|
|
265
|
+
- [Cursor Skills Documentation](https://cursor.com/docs/context/skills)
|
|
266
|
+
- [Antigravity Skills Documentation](https://antigravity.google/docs/skills)
|
|
267
|
+
|
|
268
|
+
## License
|
|
269
|
+
|
|
270
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|