add-skill 0.0.1 → 1.0.0

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 ADDED
@@ -0,0 +1,192 @@
1
+ # add-skill
2
+
3
+ Install agent skills onto your coding agents from any git repository.
4
+
5
+ Supports [OpenCode](https://opencode.ai), [Claude Code](https://claude.ai/code), and [Codex](https://developers.openai.com/codex).
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # Install a skill interactively
11
+ npx add-skill openai/skills
12
+
13
+ # Install a specific skill
14
+ npx add-skill openai/skills --skill skill-creator
15
+
16
+ # Install globally (available in all projects)
17
+ npx add-skill openai/skills --skill linear -g
18
+ ```
19
+
20
+ ## What are Agent Skills?
21
+
22
+ 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`.
23
+
24
+ Skills let agents perform specialized tasks like:
25
+ - Generating release notes from git history
26
+ - Creating PRs following your team's conventions
27
+ - Integrating with external tools (Linear, Notion, etc.)
28
+
29
+ ## Usage
30
+
31
+ ### Source Formats
32
+
33
+ The `<source>` argument accepts multiple formats:
34
+
35
+ ```bash
36
+ # GitHub shorthand
37
+ npx add-skill openai/skills
38
+
39
+ # Full GitHub URL
40
+ npx add-skill https://github.com/openai/skills
41
+
42
+ # Direct path to a skill in a repo
43
+ npx add-skill https://github.com/openai/skills/tree/main/skills/.system/skill-creator
44
+
45
+ # GitLab URL
46
+ npx add-skill https://gitlab.com/org/repo
47
+
48
+ # Any git URL
49
+ npx add-skill git@github.com:openai/skills.git
50
+ ```
51
+
52
+ ### Options
53
+
54
+ | Option | Description |
55
+ |--------|-------------|
56
+ | `-g, --global` | Install to user directory instead of project |
57
+ | `-a, --agent <agents...>` | Target specific agents: `opencode`, `claude-code`, `codex` |
58
+ | `-s, --skill <skills...>` | Install specific skills by name |
59
+ | `-l, --list` | List available skills without installing |
60
+ | `-y, --yes` | Skip all confirmation prompts |
61
+ | `-V, --version` | Show version number |
62
+ | `-h, --help` | Show help |
63
+
64
+ ### Examples
65
+
66
+ ```bash
67
+ # List skills in a repository
68
+ npx add-skill openai/skills --list
69
+
70
+ # Install multiple specific skills
71
+ npx add-skill openai/skills --skill skill-creator --skill linear
72
+
73
+ # Install to specific agents
74
+ npx add-skill openai/skills -a claude-code -a opencode
75
+
76
+ # Non-interactive installation (CI/CD friendly)
77
+ npx add-skill openai/skills --skill linear -g -a claude-code -y
78
+
79
+ # Install all skills from a repo
80
+ npx add-skill openai/skills -y -g
81
+ ```
82
+
83
+ ## Installation Paths
84
+
85
+ Skills are installed to different locations depending on the agent and scope:
86
+
87
+ ### Project-level (default)
88
+
89
+ Installed in your current working directory. Commit these to share with your team.
90
+
91
+ | Agent | Path |
92
+ |-------|------|
93
+ | OpenCode | `.opencode/skill/<name>/` |
94
+ | Claude Code | `.claude/skills/<name>/` |
95
+ | Codex | `.codex/skills/<name>/` |
96
+
97
+ ### Global (`--global`)
98
+
99
+ Installed in your home directory. Available across all projects.
100
+
101
+ | Agent | Path |
102
+ |-------|------|
103
+ | OpenCode | `~/.config/opencode/skill/<name>/` |
104
+ | Claude Code | `~/.claude/skills/<name>/` |
105
+ | Codex | `~/.codex/skills/<name>/` |
106
+
107
+ ## Agent Detection
108
+
109
+ 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.
110
+
111
+ ## Creating Skills
112
+
113
+ Skills are directories containing a `SKILL.md` file with YAML frontmatter:
114
+
115
+ ```markdown
116
+ ---
117
+ name: my-skill
118
+ description: What this skill does and when to use it
119
+ ---
120
+
121
+ # My Skill
122
+
123
+ Instructions for the agent to follow when this skill is activated.
124
+
125
+ ## When to Use
126
+
127
+ Describe the scenarios where this skill should be used.
128
+
129
+ ## Steps
130
+
131
+ 1. First, do this
132
+ 2. Then, do that
133
+ ```
134
+
135
+ ### Required Fields
136
+
137
+ - `name`: Unique identifier (lowercase, hyphens allowed)
138
+ - `description`: Brief explanation of what the skill does
139
+
140
+ ### Skill Discovery
141
+
142
+ The CLI searches for skills in these locations within a repository:
143
+
144
+ - Root directory (if it contains `SKILL.md`)
145
+ - `skills/`
146
+ - `skills/.curated/`
147
+ - `skills/.experimental/`
148
+ - `skills/.system/`
149
+ - `.codex/skills/`
150
+ - `.claude/skills/`
151
+ - `.opencode/skill/`
152
+
153
+ If no skills are found in standard locations, a recursive search is performed.
154
+
155
+ ## Compatibility
156
+
157
+ Skills are generally compatible across agents since they follow a shared [Agent Skills specification](https://agentskills.io). However, some features may be agent-specific:
158
+
159
+ | Feature | OpenCode | Claude Code | Codex |
160
+ |---------|----------|-------------|-------|
161
+ | Basic skills | Yes | Yes | Yes |
162
+ | `allowed-tools` | Yes | Yes | Yes |
163
+ | `context: fork` | No | Yes | No |
164
+ | Hooks | No | Yes | No |
165
+
166
+ ## Troubleshooting
167
+
168
+ ### "No skills found"
169
+
170
+ Ensure the repository contains valid `SKILL.md` files with both `name` and `description` in the frontmatter.
171
+
172
+ ### Skill not loading in agent
173
+
174
+ - Verify the skill was installed to the correct path
175
+ - Check the agent's documentation for skill loading requirements
176
+ - Ensure the `SKILL.md` frontmatter is valid YAML
177
+
178
+ ### Permission errors
179
+
180
+ Ensure you have write access to the target directory.
181
+
182
+ ## Related Links
183
+
184
+ - [OpenCode Skills Documentation](https://opencode.ai/docs/skills/)
185
+ - [Claude Code Skills Documentation](https://code.claude.com/docs/en/skills)
186
+ - [Codex Skills Documentation](https://developers.openai.com/codex/skills/)
187
+ - [Agent Skills Specification](https://agentskills.io)
188
+ - [OpenAI Skills Repository](https://github.com/openai/skills)
189
+
190
+ ## License
191
+
192
+ MIT
package/bun.lock ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "workspaces": {
4
+ "": {
5
+ "name": "add-skill",
6
+ "devDependencies": {
7
+ "@types/bun": "latest",
8
+ },
9
+ "peerDependencies": {
10
+ "typescript": "^5",
11
+ },
12
+ },
13
+ },
14
+ "packages": {
15
+ "@types/bun": ["@types/bun@1.3.6", "", { "dependencies": { "bun-types": "1.3.6" } }, "sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA=="],
16
+
17
+ "@types/node": ["@types/node@25.0.8", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-powIePYMmC3ibL0UJ2i2s0WIbq6cg6UyVFQxSCpaPxxzAaziRfimGivjdF943sSGV6RADVbk0Nvlm5P/FB44Zg=="],
18
+
19
+ "bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="],
20
+
21
+ "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
22
+
23
+ "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node