skillctl 0.1.0__tar.gz

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.
Files changed (51) hide show
  1. skillctl-0.1.0/.github/workflows/ci.yml +28 -0
  2. skillctl-0.1.0/.github/workflows/publish.yml +29 -0
  3. skillctl-0.1.0/.gitignore +13 -0
  4. skillctl-0.1.0/CHANGELOG.md +36 -0
  5. skillctl-0.1.0/LICENSE +21 -0
  6. skillctl-0.1.0/PKG-INFO +380 -0
  7. skillctl-0.1.0/README.md +338 -0
  8. skillctl-0.1.0/pyproject.toml +69 -0
  9. skillctl-0.1.0/skillctl/__init__.py +3 -0
  10. skillctl-0.1.0/skillctl/animation.py +326 -0
  11. skillctl-0.1.0/skillctl/cli.py +1820 -0
  12. skillctl-0.1.0/skillctl/config.py +174 -0
  13. skillctl-0.1.0/skillctl/discovery/__init__.py +0 -0
  14. skillctl-0.1.0/skillctl/discovery/enrichment.py +209 -0
  15. skillctl-0.1.0/skillctl/discovery/github.py +173 -0
  16. skillctl-0.1.0/skillctl/discovery/local.py +72 -0
  17. skillctl-0.1.0/skillctl/discovery/ranking.py +42 -0
  18. skillctl-0.1.0/skillctl/discovery/registry.py +548 -0
  19. skillctl-0.1.0/skillctl/importer/__init__.py +0 -0
  20. skillctl-0.1.0/skillctl/importer/git_ops.py +67 -0
  21. skillctl-0.1.0/skillctl/importer/linker.py +43 -0
  22. skillctl-0.1.0/skillctl/learn/__init__.py +93 -0
  23. skillctl-0.1.0/skillctl/learn/content/anatomy.md +114 -0
  24. skillctl-0.1.0/skillctl/learn/content/examples/api-patterns.md +107 -0
  25. skillctl-0.1.0/skillctl/learn/content/examples/sql-standards.md +114 -0
  26. skillctl-0.1.0/skillctl/learn/content/organize.md +102 -0
  27. skillctl-0.1.0/skillctl/learn/content/write.md +80 -0
  28. skillctl-0.1.0/skillctl/learn/loader.py +178 -0
  29. skillctl-0.1.0/skillctl/learn/renderer.py +780 -0
  30. skillctl-0.1.0/skillctl/lint/__init__.py +346 -0
  31. skillctl-0.1.0/skillctl/manifest.py +77 -0
  32. skillctl-0.1.0/skillctl/output.py +117 -0
  33. skillctl-0.1.0/skillctl/renderables.py +265 -0
  34. skillctl-0.1.0/skillctl/scaffold/__init__.py +0 -0
  35. skillctl-0.1.0/skillctl/scaffold/creator.py +69 -0
  36. skillctl-0.1.0/skillctl/scaffold/templates/SKILL.md.j2 +50 -0
  37. skillctl-0.1.0/skillctl/setup.py +179 -0
  38. skillctl-0.1.0/skillctl/theme.py +46 -0
  39. skillctl-0.1.0/skillctl/utils/__init__.py +0 -0
  40. skillctl-0.1.0/skillctl/utils/frontmatter.py +27 -0
  41. skillctl-0.1.0/tests/__init__.py +0 -0
  42. skillctl-0.1.0/tests/conftest.py +77 -0
  43. skillctl-0.1.0/tests/test_cli.py +438 -0
  44. skillctl-0.1.0/tests/test_config.py +80 -0
  45. skillctl-0.1.0/tests/test_discovery.py +116 -0
  46. skillctl-0.1.0/tests/test_frontmatter.py +47 -0
  47. skillctl-0.1.0/tests/test_importer.py +104 -0
  48. skillctl-0.1.0/tests/test_learn.py +174 -0
  49. skillctl-0.1.0/tests/test_lint.py +224 -0
  50. skillctl-0.1.0/tests/test_manifest.py +54 -0
  51. skillctl-0.1.0/tests/test_scaffold.py +91 -0
@@ -0,0 +1,28 @@
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
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: pip install -e ".[dev]"
26
+
27
+ - name: Run tests
28
+ run: pytest tests/ -v
@@ -0,0 +1,29 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ id-token: write
9
+
10
+ jobs:
11
+ publish:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
+
22
+ - name: Install build tools
23
+ run: pip install build
24
+
25
+ - name: Build package
26
+ run: python -m build
27
+
28
+ - name: Publish to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .pytest_cache/
10
+ .venv/
11
+ *.so
12
+ .DS_Store
13
+ .claude/
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-03-16)
4
+
5
+ Initial release.
6
+
7
+ ### Commands (12)
8
+
9
+ - `search` — find skills in registries and locally with scored ranking
10
+ - `install` — clone from GitHub + symlink into skills dir
11
+ - `list` — show installed skills with timestamps
12
+ - `create` — scaffold a new skill from template
13
+ - `update` — pull latest for git-installed skills
14
+ - `remove` — uninstall with reference-counted clones
15
+ - `info` — skill details (local or GitHub)
16
+ - `config` — view/set configuration
17
+ - `registry` — add, remove, list, reset trusted registries
18
+ - `schema` — dump CLI schema for agent self-discovery
19
+ - `learn` — interactive guide to writing skills (anatomy, write, organize, examples)
20
+ - `lint` — score and validate a skill against best practices (0-100)
21
+
22
+ ### Features
23
+
24
+ - **Registry-first discovery**: searches `anthropics/skills` and `vercel-labs/agent-skills` by default
25
+ - **Custom registries**: `skillctl registry add myorg/skills` with validation
26
+ - **LLM-enriched search**: generates keywords, short descriptions, and categories via Claude Haiku or GPT-5 mini
27
+ - **SHA-based incremental cache**: only re-enriches skills whose content changed
28
+ - **Three-layer search**: synonyms + scored ranking + LLM keywords
29
+ - **Agent-friendly JSON**: `--json` on every command with `next_actions`, `--fields` mask, `--quiet` mode
30
+ - **Monorepo support**: `--path` flag for installing skills from subdirectories
31
+ - **Reference-counted clones**: shared monorepo clones preserved when removing one skill
32
+ - **Input validation**: regex patterns on repo/slug, `expected_pattern` in JSON errors
33
+ - **Design system**: semantic Rich theme, custom renderables, Calvin S ASCII logo
34
+ - **First-run onboarding**: interactive setup with sensible defaults
35
+ - **Lazy imports**: fast startup (~120ms for non-network commands)
36
+ - **118 tests passing**
skillctl-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Deval Shah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,380 @@
1
+ Metadata-Version: 2.4
2
+ Name: skillctl
3
+ Version: 0.1.0
4
+ Summary: The package manager for agent skills. Search, install, lint SKILL.md files. Zero-config CLI.
5
+ Project-URL: Homepage, https://github.com/dvlshah/skillctl
6
+ Project-URL: Repository, https://github.com/dvlshah/skillctl
7
+ Project-URL: Issues, https://github.com/dvlshah/skillctl/issues
8
+ Project-URL: Changelog, https://github.com/dvlshah/skillctl/blob/main/CHANGELOG.md
9
+ Author: Deval
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: agent,claude,cli,codex,package-manager,skills
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries
23
+ Classifier: Topic :: System :: Software Distribution
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: httpx>=0.24.0
26
+ Requires-Dist: jinja2>=3.1.0
27
+ Requires-Dist: pyyaml>=6.0
28
+ Requires-Dist: rich>=13.0.0
29
+ Requires-Dist: typer[all]>=0.9.0
30
+ Provides-Extra: anthropic
31
+ Requires-Dist: anthropic>=0.40.0; extra == 'anthropic'
32
+ Provides-Extra: dev
33
+ Requires-Dist: anthropic>=0.40.0; extra == 'dev'
34
+ Requires-Dist: openai>=2.0.0; extra == 'dev'
35
+ Requires-Dist: pytest>=7.0; extra == 'dev'
36
+ Provides-Extra: enrich
37
+ Requires-Dist: anthropic>=0.40.0; extra == 'enrich'
38
+ Requires-Dist: openai>=2.0.0; extra == 'enrich'
39
+ Provides-Extra: openai
40
+ Requires-Dist: openai>=2.0.0; extra == 'openai'
41
+ Description-Content-Type: text/markdown
42
+
43
+ <div align="center">
44
+
45
+ <h1>skill<em>ctl</em></h1>
46
+
47
+ <p><strong>The package manager for agent skills.</strong></p>
48
+
49
+ <p>Search, install, and manage SKILL.md files.<br>
50
+ Stateless, zero-config, and token-efficient.</p>
51
+
52
+ [![PyPI](https://img.shields.io/pypi/v/skillctl)](https://pypi.org/project/skillctl/)
53
+ [![Python 3.10+](https://img.shields.io/pypi/pyversions/skillctl)](https://pypi.org/project/skillctl/)
54
+ [![License: MIT](https://img.shields.io/pypi/l/skillctl)](LICENSE)
55
+ [![CI](https://github.com/dvlshah/skillctl/actions/workflows/ci.yml/badge.svg)](https://github.com/dvlshah/skillctl/actions/workflows/ci.yml)
56
+
57
+ </div>
58
+
59
+ <br>
60
+
61
+ - [x] **Zero tokens when idle** — stateless CLI, no server process, no protocol overhead
62
+ - [x] **One command to install** — `git clone` → symlink → registered, done in seconds
63
+ - [x] **Agent-native** — every command supports `--json` with `next_actions` guidance
64
+ - [x] **Works today** — Claude Code, Codex, and any agent that reads markdown
65
+
66
+ <br>
67
+
68
+ ## Quickstart (2 min)
69
+
70
+ ### 1. Install
71
+
72
+ ```
73
+ pip install skillctl
74
+ ```
75
+
76
+ ### 2. Find a skill
77
+
78
+ ```bash
79
+ $ skillctl search "pdf"
80
+
81
+ ● pdf registry Create, edit, and extract content from PDFs ★ 0
82
+ ○ pdf-to-markdown github Convert PDF files to clean markdown ★ 89
83
+ ○ pdf-ocr github OCR extraction from scanned PDFs ★ 67
84
+ ```
85
+
86
+ ### 3. Install it
87
+
88
+ ```bash
89
+ $ skillctl install anthropics/skills --path skills/pdf
90
+
91
+ ✓ Cloned anthropics/skills → ~/.skillctl/repos/anthropics__skills
92
+ ✓ Linked → ~/.claude/skills/pdf
93
+ ✓ Registered in manifest
94
+ ```
95
+
96
+ Your agent picks it up immediately — no restart, no config change.
97
+
98
+ <br>
99
+
100
+ ## The problem
101
+
102
+ Every AI agent runtime uses skills — markdown files that define what an agent can do. But skills live scattered across GitHub repos, local folders, and team drives. Developers copy-paste skill files manually and hope they work.
103
+
104
+ There's no `npm install` for skills.
105
+
106
+ ## The solution
107
+
108
+ skillctl is a package manager purpose-built for agent skills.
109
+
110
+ ```
111
+ skillctl search "excel" → finds xlsx skill (via LLM-enriched keywords)
112
+ skillctl install ... → git clone → symlink → registered
113
+ ~/.claude/skills/xlsx/ → agent picks it up automatically
114
+ ```
115
+
116
+ <br>
117
+
118
+ ## Using with coding agents
119
+
120
+ skillctl installs skills as symlinks into directories your agent already reads. No plugin, no integration, no restart.
121
+
122
+ **Claude Code**
123
+
124
+ ```bash
125
+ skillctl config set skills_dir ~/.claude/skills # default — already set
126
+ skillctl install anthropics/skills --path skills/pdf
127
+ # Claude Code picks it up on the next message — the /pdf skill appears automatically
128
+ ```
129
+
130
+ **OpenAI Codex**
131
+
132
+ ```bash
133
+ skillctl config set skills_dir ~/.codex/skills
134
+ skillctl install anthropics/skills --path skills/pdf
135
+ # Codex reads the skills directory on session start
136
+ ```
137
+
138
+ **Any agent with bash access** can use skillctl directly — the CLI follows the same `search → install → use` pattern agents know from `pip`, `npm`, and `gh`:
139
+
140
+ ```bash
141
+ # An agent can do this autonomously:
142
+ skillctl search "data analysis" --json --fields=slug,installed
143
+ skillctl install anthropics/skills --path skills/xlsx -y --json
144
+ cat ~/.claude/skills/xlsx/SKILL.md # agent reads and follows the instructions
145
+ ```
146
+
147
+ > [!NOTE]
148
+ > skillctl is designed **agent-first**. Every command supports `--json` with guided `next_actions`, `--quiet` for piping, `--yes` to skip prompts, and `skillctl schema` for runtime self-discovery. Agents don't need documentation — they can introspect the CLI.
149
+
150
+ <br>
151
+
152
+ ## Why CLI, not MCP
153
+
154
+ Most agent tooling burns tokens while idle. skillctl costs zero.
155
+
156
+ | | CLI (skillctl) | MCP Server |
157
+ |---|---|---|
158
+ | **Tokens when idle** | 0 | Constant |
159
+ | **Setup** | `pip install` | Config, auth, daemon |
160
+ | **Agent compatibility** | Every LLM knows CLI | Protocol-specific |
161
+ | **Statefulness** | Stateless | Stateful process |
162
+
163
+ <br>
164
+
165
+ ## Commands
166
+
167
+ <details open>
168
+ <summary><strong>Find & install</strong></summary>
169
+
170
+ ```bash
171
+ skillctl search "pdf" # Search registries + local
172
+ skillctl search "pdf" --source=github # Broad GitHub search
173
+ skillctl install user/repo # Full repo as a skill
174
+ skillctl install user/repo --path skills/pdf # Subdirectory from monorepo
175
+ skillctl install user/repo --dry-run # Preview without executing
176
+ ```
177
+
178
+ </details>
179
+
180
+ <details open>
181
+ <summary><strong>Manage</strong></summary>
182
+
183
+ ```bash
184
+ skillctl list # Show installed skills
185
+ skillctl list --quiet # Bare names (for piping)
186
+ skillctl info my-skill # Detailed skill card
187
+ skillctl update my-skill # Pull latest from git
188
+ skillctl update --all # Update everything
189
+ skillctl remove my-skill # Uninstall (ref-counted clones)
190
+ ```
191
+
192
+ </details>
193
+
194
+ <details open>
195
+ <summary><strong>Create & validate</strong></summary>
196
+
197
+ ```bash
198
+ skillctl create my-skill --name "My Skill" --desc "Does X"
199
+ skillctl lint my-skill # Score 0-100 with fix suggestions
200
+ ```
201
+
202
+ ```
203
+ my-skill Score: 65/100
204
+
205
+ █████████████████████░░░░░░░░░ 65%
206
+
207
+ ✓ Has name, description, and tags in frontmatter
208
+ ✓ Has 'When to Use' trigger section
209
+ ✗ Missing anti-patterns section +15 pts
210
+ ✗ No code examples +20 pts
211
+ ```
212
+
213
+ </details>
214
+
215
+ <details open>
216
+ <summary><strong>Learn</strong></summary>
217
+
218
+ ```bash
219
+ skillctl learn # Topic index
220
+ skillctl learn anatomy # The 5 layers of a great skill
221
+ skillctl learn write # Writing for AI comprehension
222
+ skillctl learn organize # Directory structure & naming
223
+ skillctl learn examples # Browse well-written reference skills
224
+ ```
225
+
226
+ </details>
227
+
228
+ <details>
229
+ <summary><strong>Registries</strong></summary>
230
+
231
+ ```bash
232
+ skillctl registry # List configured registries
233
+ skillctl registry add org/repo # Add (validates skills exist)
234
+ skillctl registry remove org/repo
235
+ skillctl registry reset # Reset to defaults
236
+ ```
237
+
238
+ Default registries: `anthropics/skills`, `vercel-labs/agent-skills`
239
+
240
+ </details>
241
+
242
+ <details>
243
+ <summary><strong>Configuration</strong></summary>
244
+
245
+ ```bash
246
+ skillctl config # Show current config
247
+ skillctl config set skills_dir ~/skills # Change skills directory
248
+ skillctl config set registries "org/repo1,org/repo2"
249
+ ```
250
+
251
+ </details>
252
+
253
+ <br>
254
+
255
+ ## Agent mode
256
+
257
+ Every command supports `--json`. Responses include `next_actions` so agents can chain commands without hallucinating:
258
+
259
+ ```bash
260
+ $ skillctl search "pdf" --json --fields=slug,installed
261
+ ```
262
+
263
+ ```json
264
+ {
265
+ "results": [
266
+ {"slug": "pdf", "installed": false},
267
+ {"slug": "pdf-to-markdown", "installed": false}
268
+ ],
269
+ "next_actions": [
270
+ "skillctl install anthropics/skills --path skills/pdf -y --json",
271
+ "skillctl info pdf --json"
272
+ ]
273
+ }
274
+ ```
275
+
276
+ ```bash
277
+ $ skillctl schema # Full CLI introspection — agents discover commands at runtime
278
+ ```
279
+
280
+ <br>
281
+
282
+ ## How install works
283
+
284
+ ```
285
+ skillctl install anthropics/skills --path skills/pdf
286
+
287
+ ├─ git clone → ~/.skillctl/repos/anthropics__skills/
288
+ ├─ symlink → ~/.claude/skills/pdf → (clone)/skills/pdf
289
+ └─ register → ~/.skillctl/manifest.json
290
+ ```
291
+
292
+ - **Shared clones** — installing two skills from the same repo uses one clone
293
+ - **Ref-counted removal** — shared clones are kept until the last skill is removed
294
+ - **Atomic updates** — `git pull` on the clone updates all skills from that repo
295
+
296
+ <br>
297
+
298
+ ## Search
299
+
300
+ Search uses a three-layer system:
301
+
302
+ 1. **Synonym expansion** — "excel" finds `xlsx`, "figma" finds `frontend-design`
303
+ 2. **Scored ranking** — slug > keywords > name > tags > description
304
+ 3. **LLM enrichment** — generates search keywords at index time (optional, cached with SHA invalidation)
305
+
306
+ > [!NOTE]
307
+ > Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` to enable LLM enrichment. Runs once per skill, costs ~$0.0005 each, cached with content-addressed SHA invalidation.
308
+
309
+ <br>
310
+
311
+ ## SKILL.md format
312
+
313
+ Skills are markdown files with YAML frontmatter. Run `skillctl learn anatomy` for the full breakdown.
314
+
315
+ ```yaml
316
+ ---
317
+ name: sql-standards
318
+ description: SQL coding standards for our team
319
+ tags: [sql, standards]
320
+ ---
321
+ ```
322
+
323
+ ```markdown
324
+ ## When to Use This Skill
325
+ Use when the user asks to write or review SQL.
326
+
327
+ ## Core Principles
328
+ - Always use UPPERCASE for SQL keywords
329
+ - Never use SELECT *
330
+
331
+ ## Common Mistakes to Avoid
332
+ - ✗ SELECT * FROM users → ✓ SELECT id, name FROM users
333
+
334
+ ## Examples
335
+ ```
336
+
337
+ <br>
338
+
339
+ ## Command reference
340
+
341
+ | Command | Description |
342
+ |---|---|
343
+ | `search` | Find skills across registries, GitHub, and local directories |
344
+ | `install` | Clone from GitHub + symlink into skills dir |
345
+ | `list` | Show installed skills with source and timestamps |
346
+ | `create` | Scaffold a new skill with SKILL.md template |
347
+ | `update` | Pull latest for git-installed skills |
348
+ | `remove` | Uninstall with reference-counted clones |
349
+ | `info` | Skill details — author, tags, source, path |
350
+ | `lint` | Score skill quality 0-100 with fix suggestions |
351
+ | `learn` | Interactive guide to writing great skills |
352
+ | `config` | View/set configuration |
353
+ | `registry` | Manage trusted skill registries |
354
+ | `schema` | Full CLI schema for agent self-discovery |
355
+
356
+ <br>
357
+
358
+ ## Contributing
359
+
360
+ The easiest way to contribute is to pick an issue with the `good first issue` tag.
361
+
362
+ ```bash
363
+ git clone https://github.com/dvlshah/skillctl.git
364
+ cd skillctl
365
+ pip install -e ".[dev]"
366
+ pytest
367
+ ```
368
+
369
+ Bug report? [Open an issue](https://github.com/dvlshah/skillctl/issues). Feature request? [Open an issue](https://github.com/dvlshah/skillctl/issues).
370
+
371
+ <br>
372
+
373
+ > [!TIP]
374
+ > If skillctl saves you time, star the repo — it helps other developers find it.
375
+
376
+ <br>
377
+
378
+ ## License
379
+
380
+ MIT