@andysama/openskills 1.3.2

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/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2025 OpenSkills Contributors
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,535 @@
1
+ # OpenSkills
2
+
3
+ [![npm version](https://img.shields.io/npm/v/openskills.svg)](https://www.npmjs.com/package/openskills)
4
+ [![npm downloads](https://img.shields.io/npm/dm/openskills.svg)](https://www.npmjs.com/package/openskills)
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+
7
+ **The closest implementation matching Claude Code's skills system** — same prompt format, same marketplace, same folders, just using CLI instead of tools.
8
+
9
+ ```bash
10
+ npm i -g openskills
11
+ openskills install anthropics/skills
12
+ openskills sync
13
+ ```
14
+
15
+ > **Found this useful?** Follow [@nummanali](https://x.com/nummanali) for more AI tooling!
16
+
17
+ ---
18
+
19
+ ## What Is This?
20
+
21
+ OpenSkills brings **Anthropic's skills system** to all AI coding agents (Claude Code, Cursor, Windsurf, Aider).
22
+
23
+ **For Claude Code users:**
24
+ - Install skills from any GitHub repo, not just the marketplace
25
+ - Install from local paths or private git repos
26
+ - Share skills across multiple agents
27
+ - Version control your skills in your repo
28
+ - Symlink skills for local development
29
+
30
+ **For other agents (Cursor, Windsurf, Aider):**
31
+ - Get Claude Code's skills system universally
32
+ - Access Anthropic's marketplace skills via GitHub
33
+ - Use progressive disclosure (load skills on demand)
34
+
35
+ ---
36
+
37
+ ## How It Matches Claude Code Exactly
38
+
39
+ OpenSkills replicates Claude Code's skills system with **100% compatibility**:
40
+
41
+ - ✅ **Same prompt format** — `<available_skills>` XML with skill tags
42
+ - ✅ **Same marketplace** — Install from [anthropics/skills](https://github.com/anthropics/skills)
43
+ - ✅ **Same folders** — Uses `.claude/skills/` by default
44
+ - ✅ **Same SKILL.md format** — YAML frontmatter + markdown instructions
45
+ - ✅ **Same progressive disclosure** — Load skills on demand, not upfront
46
+
47
+ **Only difference:** Claude Code uses `Skill` tool, OpenSkills uses `openskills read <name>` CLI command.
48
+
49
+ **Advanced:** Use `--universal` flag to install to `.agent/skills/` for Claude Code + other agents sharing one AGENTS.md.
50
+
51
+ ---
52
+
53
+ ## Quick Start
54
+
55
+ ### 1. Install
56
+
57
+ ```bash
58
+ npm i -g openskills
59
+ ```
60
+
61
+ ### 2. Install Skills
62
+
63
+ ```bash
64
+ # Install from Anthropic's marketplace (interactive selection, default: project)
65
+ openskills install anthropics/skills
66
+
67
+ # Or install from any GitHub repo
68
+ openskills install your-org/custom-skills
69
+ ```
70
+
71
+ ### 3. Sync to AGENTS.md
72
+
73
+ _NOTE: You must have a pre-existing AGENTS.md file for sync to update._
74
+
75
+ ```bash
76
+ openskills sync
77
+ ```
78
+
79
+ Done! Your agent now has skills with the same `<available_skills>` format as Claude Code.
80
+
81
+ ---
82
+
83
+ ## How It Works (Technical Deep Dive)
84
+
85
+ ### Claude Code's Skills System
86
+
87
+ When you use Claude Code with skills installed, Claude's system prompt includes:
88
+
89
+ ```xml
90
+ <skills_instructions>
91
+ When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively.
92
+
93
+ How to use skills:
94
+ - Invoke skills using this tool with the skill name only (no arguments)
95
+ - When you invoke a skill, you will see <command-message>The "{name}" skill is loading</command-message>
96
+ - The skill's prompt will expand and provide detailed instructions
97
+
98
+ Important:
99
+ - Only use skills listed in <available_skills> below
100
+ - Do not invoke a skill that is already running
101
+ </skills_instructions>
102
+
103
+ <available_skills>
104
+ <skill>
105
+ <name>pdf</name>
106
+ <description>Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms...</description>
107
+ <location>plugin</location>
108
+ </skill>
109
+
110
+ <skill>
111
+ <name>xlsx</name>
112
+ <description>Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis...</description>
113
+ <location>plugin</location>
114
+ </skill>
115
+ </available_skills>
116
+ ```
117
+
118
+ **How Claude uses it:**
119
+ 1. User asks: "Extract data from this PDF"
120
+ 2. Claude scans `<available_skills>` → finds "pdf" skill
121
+ 3. Claude invokes: `Skill("pdf")`
122
+ 4. SKILL.md content loads with detailed instructions
123
+ 5. Claude follows instructions to complete task
124
+
125
+ ### OpenSkills' System (Identical Format)
126
+
127
+ OpenSkills generates the **exact same** `<available_skills>` XML in your AGENTS.md:
128
+
129
+ ```xml
130
+ <skills_system priority="1">
131
+
132
+ ## Available Skills
133
+
134
+ <!-- SKILLS_TABLE_START -->
135
+ <usage>
136
+ When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively.
137
+
138
+ How to use skills:
139
+ - Invoke: Bash("openskills read <skill-name>")
140
+ - The skill content will load with detailed instructions
141
+ - Base directory provided in output for resolving bundled resources
142
+
143
+ Usage notes:
144
+ - Only use skills listed in <available_skills> below
145
+ - Do not invoke a skill that is already loaded in your context
146
+ </usage>
147
+
148
+ <available_skills>
149
+
150
+ <skill>
151
+ <name>pdf</name>
152
+ <description>Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms...</description>
153
+ <location>project</location>
154
+ </skill>
155
+
156
+ <skill>
157
+ <name>xlsx</name>
158
+ <description>Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis...</description>
159
+ <location>project</location>
160
+ </skill>
161
+
162
+ </available_skills>
163
+ <!-- SKILLS_TABLE_END -->
164
+
165
+ </skills_system>
166
+ ```
167
+
168
+ **How agents use it:**
169
+ 1. User asks: "Extract data from this PDF"
170
+ 2. Agent scans `<available_skills>` → finds "pdf" skill
171
+ 3. Agent invokes: `Bash("openskills read pdf")`
172
+ 4. SKILL.md content is output to agent's context
173
+ 5. Agent follows instructions to complete task
174
+
175
+ ### Side-by-Side Comparison
176
+
177
+ | Aspect | Claude Code | OpenSkills |
178
+ |--------|-------------|------------|
179
+ | **System Prompt** | Built into Claude Code | In AGENTS.md |
180
+ | **Invocation** | `Skill("pdf")` tool | `openskills read pdf` CLI |
181
+ | **Prompt Format** | `<available_skills>` XML | `<available_skills>` XML (identical) |
182
+ | **Folder Structure** | `.claude/skills/` | `.claude/skills/` (identical) |
183
+ | **SKILL.md Format** | YAML + markdown | YAML + markdown (identical) |
184
+ | **Progressive Disclosure** | Yes | Yes |
185
+ | **Bundled Resources** | `references/`, `scripts/`, `assets/` | `references/`, `scripts/`, `assets/` (identical) |
186
+ | **Marketplace** | Anthropic marketplace | GitHub (anthropics/skills) |
187
+
188
+ **Everything is identical except the invocation method.**
189
+
190
+ ### The SKILL.md Format
191
+
192
+ Both use the exact same format:
193
+
194
+ ```markdown
195
+ ---
196
+ name: pdf
197
+ description: Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms.
198
+ ---
199
+
200
+ # PDF Skill Instructions
201
+
202
+ When the user asks you to work with PDFs, follow these steps:
203
+
204
+ 1. Install dependencies: `pip install pypdf2`
205
+ 2. Extract text using the extract_text.py script in scripts/
206
+ 3. For bundled resources, use the base directory provided in the skill output
207
+ 4. ...
208
+
209
+ [Detailed instructions that Claude/agent follows]
210
+ ```
211
+
212
+ **Progressive disclosure:** The full instructions load only when the skill is invoked, keeping your agent's context clean.
213
+
214
+ ---
215
+
216
+ ## Why CLI Instead of MCP?
217
+
218
+ **MCP (Model Context Protocol)** is Anthropic's protocol for connecting AI to external tools and data sources. It's great for:
219
+ - Database connections
220
+ - API integrations
221
+ - Real-time data fetching
222
+ - External service integration
223
+
224
+ **Skills (SKILL.md format)** are different — they're for:
225
+ - Specialized workflows (PDF manipulation, spreadsheet editing)
226
+ - Bundled resources (scripts, templates, references)
227
+ - Progressive disclosure (load instructions only when needed)
228
+ - Static, reusable patterns
229
+
230
+ **Why not implement skills via MCP?**
231
+
232
+ 1. **Skills are static instructions, not dynamic tools**
233
+ MCP is for server-client connections. Skills are markdown files with instructions.
234
+
235
+ 2. **No server needed**
236
+ Skills are just files. MCP requires running servers.
237
+
238
+ 3. **Universal compatibility**
239
+ CLI works with any agent (Claude Code, Cursor, Windsurf, Aider). MCP requires MCP support.
240
+
241
+ 4. **Follows Anthropic's design**
242
+ Anthropic created skills as SKILL.md files, not MCP servers. We're implementing their spec.
243
+
244
+ 5. **Simpler for users**
245
+ `openskills install anthropics/skills` vs "configure MCP server, set up authentication, manage server lifecycle"
246
+
247
+ **MCP and skills solve different problems.** OpenSkills implements Anthropic's skills spec (SKILL.md format) the way it was designed — as progressively-loaded markdown instructions.
248
+
249
+ ---
250
+
251
+ ## Claude Code Compatibility
252
+
253
+ You can use **both** Claude Code plugins and OpenSkills project skills together:
254
+
255
+ **In your `<available_skills>` list:**
256
+ ```xml
257
+ <skill>
258
+ <name>pdf</name>
259
+ <description>...</description>
260
+ <location>plugin</location> <!-- Claude Code marketplace -->
261
+ </skill>
262
+
263
+ <skill>
264
+ <name>custom-skill</name>
265
+ <description>...</description>
266
+ <location>project</location> <!-- OpenSkills from GitHub -->
267
+ </skill>
268
+ ```
269
+
270
+ They coexist perfectly. Claude invokes marketplace plugins via `Skill` tool, OpenSkills skills via CLI. No conflicts.
271
+
272
+ ### Advanced: Universal Mode for Multi-Agent Setups
273
+
274
+ **Problem:** If you use Claude Code + other agents (Cursor, Windsurf, Aider) with one AGENTS.md, installing to `.claude/skills/` can create duplicates with Claude Code's marketplace plugins.
275
+
276
+ **Solution:** Use `--universal` to install to `.agent/skills/` instead:
277
+
278
+ ```bash
279
+ openskills install anthropics/skills --universal
280
+ ```
281
+
282
+ This installs skills to `.agent/skills/` which:
283
+ - ✅ Works with all agents via AGENTS.md
284
+ - ✅ Doesn't conflict with Claude Code's native marketplace plugins
285
+ - ✅ Keeps Claude Code's `<available_skills>` separate from AGENTS.md skills
286
+
287
+ **When to use:**
288
+ - ✅ You use Claude Code + Cursor/Windsurf/Aider with one AGENTS.md
289
+ - ✅ You want to avoid duplicate skill definitions
290
+ - ✅ You prefer `.agent/` for infrastructure (keeps `.claude/` for Claude Code only)
291
+
292
+ **When not to use:**
293
+ - ❌ You only use Claude Code (default `.claude/skills/` is fine)
294
+ - ❌ You only use non-Claude agents (default `.claude/skills/` is fine)
295
+
296
+ **Priority order:**
297
+ OpenSkills searches 4 locations in priority order:
298
+ 1. `./.agent/skills/` (project universal)
299
+ 2. `~/.agent/skills/` (global universal)
300
+ 3. `./.claude/skills/` (project)
301
+ 4. `~/.claude/skills/` (global)
302
+
303
+ Skills with same name only appear once (highest priority wins).
304
+
305
+ ---
306
+
307
+ ## Commands
308
+
309
+ ```bash
310
+ openskills install <source> [options] # Install from GitHub, local path, or private repo
311
+ openskills sync [-y] [-o <path>] # Update AGENTS.md (or custom output)
312
+ openskills list # Show installed skills
313
+ openskills read <name> # Load skill (for agents)
314
+ openskills manage # Remove skills (interactive)
315
+ openskills remove <name> # Remove specific skill
316
+ ```
317
+
318
+ ### Flags
319
+
320
+ - `--global` — Install globally to `~/.claude/skills` (default: project install)
321
+ - `--universal` — Install to `.agent/skills/` instead of `.claude/skills/` (advanced)
322
+ - `-y, --yes` — Skip all prompts including overwrites (for scripts/CI)
323
+ - `-o, --output <path>` — Custom output file for sync (default: `AGENTS.md`)
324
+
325
+ ### Installation Modes
326
+
327
+ **Default (recommended):**
328
+ ```bash
329
+ openskills install anthropics/skills
330
+ # → Installs to ./.claude/skills (project, gitignored)
331
+ ```
332
+
333
+ **Global install:**
334
+ ```bash
335
+ openskills install anthropics/skills --global
336
+ # → Installs to ~/.claude/skills (shared across projects)
337
+ ```
338
+
339
+ **Universal mode (advanced):**
340
+ ```bash
341
+ openskills install anthropics/skills --universal
342
+ # → Installs to ./.agent/skills (for Claude Code + other agents)
343
+ ```
344
+
345
+ ### Install from Local Paths
346
+
347
+ ```bash
348
+ # Absolute path
349
+ openskills install /path/to/my-skill
350
+
351
+ # Relative path
352
+ openskills install ./local-skills/my-skill
353
+
354
+ # Home directory
355
+ openskills install ~/my-skills/custom-skill
356
+
357
+ # Install all skills from a directory
358
+ openskills install ./my-skills-folder
359
+ ```
360
+
361
+ ### Install from Private Git Repos
362
+
363
+ ```bash
364
+ # SSH (uses your SSH keys)
365
+ openskills install git@github.com:your-org/private-skills.git
366
+
367
+ # HTTPS (may prompt for credentials)
368
+ openskills install https://github.com/your-org/private-skills.git
369
+ ```
370
+
371
+ ### Sync Options
372
+
373
+ ```bash
374
+ # Sync to default AGENTS.md
375
+ openskills sync
376
+
377
+ # Sync to custom file (auto-creates if missing)
378
+ openskills sync --output .ruler/AGENTS.md
379
+ openskills sync -o custom-rules.md
380
+
381
+ # Non-interactive (for CI/CD)
382
+ openskills sync -y
383
+ ```
384
+
385
+ ### Interactive by Default
386
+
387
+ All commands use beautiful TUI by default:
388
+
389
+ **Install:**
390
+ ```bash
391
+ openskills install anthropics/skills
392
+ # → Checkbox to select which skills to install
393
+ # → Shows skill name, description, size
394
+ # → All checked by default
395
+ ```
396
+
397
+ **Sync:**
398
+ ```bash
399
+ openskills sync
400
+ # → Checkbox to select which skills to include in AGENTS.md
401
+ # → Pre-selects skills already in AGENTS.md
402
+ # → Empty selection removes skills section
403
+ ```
404
+
405
+ **Manage:**
406
+ ```bash
407
+ openskills manage
408
+ # → Checkbox to select which skills to remove
409
+ # → Nothing checked by default (safe)
410
+ ```
411
+
412
+ ---
413
+
414
+ ## Example Skills
415
+
416
+ From Anthropic's [skills repository](https://github.com/anthropics/skills):
417
+
418
+ - **xlsx** — Spreadsheet creation, editing, formulas, data analysis
419
+ - **docx** — Document creation with tracked changes and comments
420
+ - **pdf** — PDF manipulation (extract, merge, split, forms)
421
+ - **pptx** — Presentation creation and editing
422
+ - **canvas-design** — Create posters and visual designs
423
+ - **mcp-builder** — Build Model Context Protocol servers
424
+ - **skill-creator** — Detailed guide for authoring skills
425
+
426
+ Browse all: [github.com/anthropics/skills](https://github.com/anthropics/skills)
427
+
428
+ ---
429
+
430
+ ## Creating Your Own Skills
431
+
432
+ ### Minimal Structure
433
+
434
+ ```
435
+ my-skill/
436
+ └── SKILL.md
437
+ ---
438
+ name: my-skill
439
+ description: What this does and when to use it
440
+ ---
441
+
442
+ # Instructions in imperative form
443
+
444
+ When the user asks you to X, do Y...
445
+ ```
446
+
447
+ ### With Bundled Resources
448
+
449
+ ```
450
+ my-skill/
451
+ ├── SKILL.md
452
+ ├── references/
453
+ │ └── api-docs.md # Supporting documentation
454
+ ├── scripts/
455
+ │ └── process.py # Helper scripts
456
+ └── assets/
457
+ └── template.json # Templates, configs
458
+ ```
459
+
460
+ In your SKILL.md, reference resources:
461
+ ```markdown
462
+ 1. Read the API documentation in references/api-docs.md
463
+ 2. Run the process.py script from scripts/
464
+ 3. Use the template from assets/template.json
465
+ ```
466
+
467
+ The agent sees the base directory when loading the skill:
468
+ ```
469
+ Loading: my-skill
470
+ Base directory: /path/to/.claude/skills/my-skill
471
+
472
+ [SKILL.md content]
473
+ ```
474
+
475
+ ### Publishing
476
+
477
+ 1. Push to GitHub: `your-username/my-skill`
478
+ 2. Users install with: `openskills install your-username/my-skill`
479
+
480
+ ### Local Development with Symlinks
481
+
482
+ For active skill development, symlink your skill into the skills directory:
483
+
484
+ ```bash
485
+ # Clone a skills repo you're developing
486
+ git clone git@github.com:your-org/my-skills.git ~/dev/my-skills
487
+
488
+ # Symlink into your project's skills directory
489
+ mkdir -p .claude/skills
490
+ ln -s ~/dev/my-skills/my-skill .claude/skills/my-skill
491
+
492
+ # Now changes to ~/dev/my-skills/my-skill are immediately reflected
493
+ openskills list # Shows my-skill
494
+ openskills sync # Includes my-skill in AGENTS.md
495
+ ```
496
+
497
+ This approach lets you:
498
+ - Edit skills in your preferred location
499
+ - Keep skills under version control
500
+ - Test changes instantly without reinstalling
501
+ - Share skills across multiple projects via symlinks
502
+
503
+ ### Authoring Guide
504
+
505
+ Use Anthropic's skill-creator for detailed guidance:
506
+
507
+ ```bash
508
+ openskills install anthropics/skills
509
+ openskills read skill-creator
510
+ ```
511
+
512
+ This loads comprehensive instructions on:
513
+ - Writing effective skill descriptions
514
+ - Structuring instructions for agents
515
+ - Using bundled resources
516
+ - Testing and iteration
517
+
518
+ ---
519
+
520
+ ## Requirements
521
+
522
+ - **Node.js** 20.6+ (for ora dependency)
523
+ - **Git** (for cloning repositories)
524
+
525
+ ---
526
+
527
+ ## License
528
+
529
+ Apache 2.0
530
+
531
+ ## Attribution
532
+
533
+ Implements [Anthropic's Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills) specification.
534
+
535
+ **Not affiliated with Anthropic.** Claude, Claude Code, and Agent Skills are trademarks of Anthropic, PBC.