agent-skill-installer 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 (29) hide show
  1. agent_skill_installer-0.1.0/LICENSE +21 -0
  2. agent_skill_installer-0.1.0/MANIFEST.in +8 -0
  3. agent_skill_installer-0.1.0/PKG-INFO +402 -0
  4. agent_skill_installer-0.1.0/README.md +379 -0
  5. agent_skill_installer-0.1.0/docs/images/ui-install-source.svg +216 -0
  6. agent_skill_installer-0.1.0/examples/README.md +64 -0
  7. agent_skill_installer-0.1.0/examples/api-install/install_demo_skill.py +68 -0
  8. agent_skill_installer-0.1.0/examples/api-install/skill/SKILL.md +6 -0
  9. agent_skill_installer-0.1.0/examples/demo-installer/MANIFEST.in +1 -0
  10. agent_skill_installer-0.1.0/examples/demo-installer/README.md +17 -0
  11. agent_skill_installer-0.1.0/examples/demo-installer/pyproject.toml +22 -0
  12. agent_skill_installer-0.1.0/examples/demo-installer/src/demo_agent_skill/__init__.py +5 -0
  13. agent_skill_installer-0.1.0/examples/demo-installer/src/demo_agent_skill/__main__.py +7 -0
  14. agent_skill_installer-0.1.0/examples/demo-installer/src/demo_agent_skill/_skill/SKILL.md +7 -0
  15. agent_skill_installer-0.1.0/examples/demo-installer/src/demo_agent_skill/_skill/scripts/hello.py +9 -0
  16. agent_skill_installer-0.1.0/examples/demo-installer/src/demo_agent_skill/cli.py +19 -0
  17. agent_skill_installer-0.1.0/pyproject.toml +37 -0
  18. agent_skill_installer-0.1.0/setup.cfg +4 -0
  19. agent_skill_installer-0.1.0/src/agent_skill_installer/__init__.py +25 -0
  20. agent_skill_installer-0.1.0/src/agent_skill_installer/__main__.py +2332 -0
  21. agent_skill_installer-0.1.0/src/agent_skill_installer/cli.py +3448 -0
  22. agent_skill_installer-0.1.0/src/agent_skill_installer/config.py +240 -0
  23. agent_skill_installer-0.1.0/src/agent_skill_installer/installer.py +1782 -0
  24. agent_skill_installer-0.1.0/src/agent_skill_installer.egg-info/PKG-INFO +402 -0
  25. agent_skill_installer-0.1.0/src/agent_skill_installer.egg-info/SOURCES.txt +27 -0
  26. agent_skill_installer-0.1.0/src/agent_skill_installer.egg-info/dependency_links.txt +1 -0
  27. agent_skill_installer-0.1.0/src/agent_skill_installer.egg-info/entry_points.txt +2 -0
  28. agent_skill_installer-0.1.0/src/agent_skill_installer.egg-info/requires.txt +2 -0
  29. agent_skill_installer-0.1.0/src/agent_skill_installer.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Omry Yadan
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,8 @@
1
+ include LICENSE
2
+ include README.md
3
+ graft docs
4
+ graft examples
5
+ prune examples/demo-installer/build
6
+ prune examples/demo-installer/dist
7
+ prune examples/demo-installer/src/demo_agent_skill.egg-info
8
+ global-exclude *.py[cod]
@@ -0,0 +1,402 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-skill-installer
3
+ Version: 0.1.0
4
+ Summary: Generic installer core for projects that distribute agent skills
5
+ Author: Omry Yadan
6
+ License-Expression: MIT
7
+ Keywords: agents,skills,installer,codex,claude
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Software Development
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: omegaconf>=2.3.0
21
+ Requires-Dist: textual>=0.89.0
22
+ Dynamic: license-file
23
+
24
+ # Agent Skill Installer
25
+
26
+ `agent-skill-installer` provides the `agent-skill-installer` command and the
27
+ `agent_skill_installer` Python package for projects that distribute agent
28
+ skills. The command can install skills from PyPI wheels, GitHub archives, or
29
+ local `SKILL.md` directories; the library exposes the same installer machinery
30
+ for custom integrations.
31
+
32
+ The core is intentionally project-neutral. It does not ship a skill and does
33
+ not know about any specific skill package.
34
+
35
+ ## Currently Supported Agents
36
+
37
+ - Codex
38
+ - Claude Code
39
+
40
+ ## Examples
41
+
42
+ The `examples/` directory contains runnable integration examples:
43
+
44
+ - [`examples/demo-installer/`](https://github.com/omry/agent-skill-installer/blob/main/examples/README.md#demo-installer-package)
45
+ is a complete skill-carrying Python package with a bundled demo skill and a
46
+ project-specific CLI wrapper.
47
+ - [`examples/api-install/`](https://github.com/omry/agent-skill-installer/blob/main/examples/README.md#api-install-script)
48
+ shows how to install and uninstall a skill directly through the Python API
49
+ without exposing a package CLI.
50
+
51
+ See [`examples/README.md`](https://github.com/omry/agent-skill-installer/blob/main/examples/README.md)
52
+ for the files to inspect and the commands to run.
53
+
54
+ ## What It Provides
55
+
56
+ - Codex and Claude Code install targets.
57
+ - `global` and `repo` scopes.
58
+ - Bundled skill copy installs.
59
+ - Editable installs from a local checkout containing `skill/SKILL.md` or a root
60
+ `SKILL.md`.
61
+ - PyPI wheel installs that extract only the project skill payload.
62
+ - GitHub archive installs from repository root, `skill/`, or an explicit tree
63
+ path.
64
+ - Install manifests for ownership checks and uninstall cleanup.
65
+ - Discoverability hook blocks with project-specific markers.
66
+ - A generic console app with a text UI, no-UI mode, and reusable CLI functions
67
+ for custom tools.
68
+
69
+ ## Command Usage
70
+
71
+ Run the generic UI and choose an external source:
72
+
73
+ ```bash
74
+ agent-skill-installer
75
+ ```
76
+
77
+ ![Interactive install source picker](docs/images/ui-install-source.svg)
78
+
79
+ The generic command installs from local repos or skill directories, PyPI
80
+ packages, and GitHub repos. Use `--no-ui` for scripts.
81
+
82
+ When you run the interactive command from a development checkout that contains
83
+ `SKILL.md` or `skill/SKILL.md`, the UI shows the local repo or skill directory
84
+ source first and uses that detected path as the default. This is the fastest
85
+ development-mode path for testing a skill before publishing it.
86
+
87
+ Install a published skill package by extracting its bundled skill payload from a
88
+ wheel:
89
+
90
+ ```bash
91
+ agent-skill-installer --no-ui install \
92
+ --pypi-package your-skill-package \
93
+ --pypi-version 1.2.3 \
94
+ --agent all \
95
+ --scope global
96
+ ```
97
+
98
+ The interactive PyPI package and GitHub URL prompts remember the 10 most recent
99
+ successful installs for each source in
100
+ `~/.agent-skill-installer/recent-installations.json` and offer them in
101
+ filterable dropdowns. If that state file cannot be read, the installer ignores
102
+ it and continues with an empty recent list.
103
+
104
+ After a PyPI package and version are selected in the UI, the installer downloads
105
+ the wheel to a temporary directory and validates that it contains a bundled
106
+ `SKILL.md`. The final install reuses that same downloaded wheel.
107
+
108
+ Install directly from GitHub without cloning:
109
+
110
+ ```bash
111
+ agent-skill-installer --no-ui install \
112
+ --github-url https://github.com/OWNER/REPO/tree/main/skill \
113
+ --agent codex \
114
+ --scope repo
115
+ ```
116
+
117
+ Install a local repo or skill directory:
118
+
119
+ ```bash
120
+ agent-skill-installer --no-ui install \
121
+ --local-repo ./your-skill-package \
122
+ --skill-name your-skill-package \
123
+ --agent codex \
124
+ --scope repo
125
+ ```
126
+
127
+ Uninstall a skill installed by the generic command:
128
+
129
+ ```bash
130
+ agent-skill-installer --no-ui uninstall \
131
+ --skill-name your-skill-package \
132
+ --agent codex \
133
+ --scope repo
134
+ ```
135
+
136
+ ## Library Usage
137
+
138
+ Projects may also import `Installer` directly for tests, custom tooling, or
139
+ applications that want to drive installation themselves:
140
+
141
+ ```python
142
+ from agent_skill_installer import Installer, SkillProject
143
+
144
+ PROJECT = SkillProject(
145
+ package_name="your-skill-package",
146
+ import_name="your_skill_package",
147
+ version="1.2.3",
148
+ skill_name="your-skill-package",
149
+ description="Use this skill for my project workflows.",
150
+ )
151
+
152
+ Installer(PROJECT).install(["codex"], "global")
153
+ Installer(PROJECT).install(["claude"], "repo")
154
+ Installer(PROJECT).uninstall(["codex"], "global")
155
+ ```
156
+
157
+ By default, bundled installs read skill files from
158
+ `your_skill_package/_skill` inside the project package. Tests or development tools
159
+ can point `bundled_skill_source` at a filesystem directory.
160
+
161
+ ## Use In Your Skill Package
162
+
163
+ `agent-skill-installer` can install directly from generic sources, so a skill
164
+ package does not need to expose its own installer command. Packages that still
165
+ want a project-specific command may wrap the shared CLI helpers.
166
+
167
+ ### Package Layout
168
+
169
+ A typical setuptools project looks like this:
170
+
171
+ ```text
172
+ your-skill-package/
173
+ MANIFEST.in
174
+ pyproject.toml
175
+ src/
176
+ your_skill_package/
177
+ __init__.py
178
+ cli.py
179
+ _skill/
180
+ SKILL.md
181
+ agents/
182
+ openai.yaml
183
+ scripts/
184
+ helper.py
185
+ ```
186
+
187
+ The bundled skill directory must contain `SKILL.md`. By default, the installer
188
+ looks for that directory at `your_skill_package/_skill`, where `your_skill_package` is
189
+ the `SkillProject.import_name` value and `_skill` is the default
190
+ `SkillProject.bundled_skill_path`.
191
+
192
+ ### Package Configuration
193
+
194
+ The skill package should depend on this library and include the bundled skill
195
+ files in its wheel:
196
+
197
+ ```toml
198
+ [build-system]
199
+ requires = ["setuptools>=77"]
200
+ build-backend = "setuptools.build_meta"
201
+
202
+ [project]
203
+ name = "your-skill-package"
204
+ version = "1.2.3"
205
+ description = "Install the your-skill-package skill for supported agents"
206
+ readme = "README.md"
207
+ requires-python = ">=3.10"
208
+ dependencies = [
209
+ "agent-skill-installer>=0.1.0",
210
+ ]
211
+
212
+ [tool.setuptools.packages.find]
213
+ where = ["src"]
214
+
215
+ [tool.setuptools]
216
+ include-package-data = true
217
+ ```
218
+
219
+ For setuptools, include the bundled skill payload with `MANIFEST.in`:
220
+
221
+ ```text
222
+ recursive-include src/your_skill_package/_skill *
223
+ ```
224
+
225
+ If you use another build backend, configure the equivalent package-data rule so
226
+ the built wheel contains `your_skill_package/_skill/SKILL.md` and any related skill
227
+ files.
228
+
229
+ ### Project Metadata
230
+
231
+ Put the project version somewhere importable by the wrapper:
232
+
233
+ ```python
234
+ """My agent skill package."""
235
+
236
+ __version__ = "1.2.3"
237
+ ```
238
+
239
+ If you want a project-specific wrapper, create a file such as
240
+ `src/your_skill_package/cli.py`:
241
+
242
+ ```python
243
+ from __future__ import annotations
244
+
245
+ from agent_skill_installer import SkillProject
246
+ from agent_skill_installer.cli import main as installer_main
247
+
248
+ from . import __version__
249
+
250
+
251
+ PROJECT = SkillProject(
252
+ package_name="your-skill-package",
253
+ import_name="your_skill_package",
254
+ version=__version__,
255
+ skill_name="your-skill-package",
256
+ description="Use this skill for my project workflows.",
257
+ )
258
+
259
+
260
+ def main(argv=None) -> int:
261
+ return installer_main(argv, project=PROJECT)
262
+ ```
263
+
264
+ The most important fields are:
265
+
266
+ | Field | Purpose |
267
+ | --- | --- |
268
+ | `package_name` | Distribution name and manifest ownership name. Usually the PyPI project name. |
269
+ | `import_name` | Import package that contains the bundled skill files. |
270
+ | `version` | Version recorded in install manifests and shown by the CLI. Keep it aligned with the package version. |
271
+ | `skill_name` | Installed skill directory name and default discoverability trigger. |
272
+ | `description` | Text used in default discoverability hook blocks. |
273
+ | `bundled_skill_path` | Package-relative bundled skill directory. Defaults to `_skill`. |
274
+ | `bundled_skill_source` | Optional filesystem directory for tests or custom development tooling. |
275
+ | `pypi_project_name` | Optional PyPI project name when it differs from `package_name`. |
276
+ | `hook_blocks` | Optional per-agent custom discoverability blocks keyed by `codex` or `claude`. |
277
+ | `manifest_package_aliases` | Optional old package names accepted when migrating existing installs. |
278
+ | `marker_slug_override` | Optional discoverability marker slug for preserving hook markers during renames. |
279
+
280
+ ### Local Development
281
+
282
+ Install directly from a local repo or skill directory while developing:
283
+
284
+ ```bash
285
+ agent-skill-installer --no-ui install \
286
+ --local-repo ./your-skill-package \
287
+ --skill-name your-skill-package \
288
+ --agent all \
289
+ --scope repo
290
+ agent-skill-installer --no-ui uninstall \
291
+ --skill-name your-skill-package \
292
+ --agent all \
293
+ --scope repo
294
+ ```
295
+
296
+ Use `--scope repo` from inside the repository where the agent should discover
297
+ the skill, or pass `--repo PATH`.
298
+
299
+ The interactive generic command also detects local development sources. From a
300
+ directory containing `SKILL.md` or `skill/SKILL.md`, run:
301
+
302
+ ```bash
303
+ agent-skill-installer
304
+ ```
305
+
306
+ The first install source option will be local development mode, with the local
307
+ skill path already selected as the default.
308
+
309
+ ### Installed Paths
310
+
311
+ The installer supports these targets:
312
+
313
+ | Agent | Scope | Skill directory | Hook file |
314
+ | --- | --- | --- | --- |
315
+ | Codex | `repo` | `<repo>/.codex/skills/<skill_name>` | `<repo>/AGENTS.md` |
316
+ | Codex | `global` | `~/.codex/skills/<skill_name>` | `~/.codex/AGENTS.md` |
317
+ | Claude Code | `repo` | `<repo>/.claude/skills/<skill_name>` | `<repo>/CLAUDE.md` |
318
+ | Claude Code | `global` | `~/.claude/skills/<skill_name>` | `~/.claude/CLAUDE.md` |
319
+
320
+ Each install writes a manifest owned by the package. The manifest lets later
321
+ installs replace only owned files and lets uninstall remove the skill,
322
+ discoverability block, and directories the installer created.
323
+
324
+ ### PyPI Release Flow
325
+
326
+ After publishing your skill package to PyPI, users can install the bundled skill
327
+ directly from the published wheel:
328
+
329
+ ```bash
330
+ agent-skill-installer --no-ui install \
331
+ --pypi-package your-skill-package \
332
+ --agent all \
333
+ --scope global
334
+ ```
335
+
336
+ Pin a specific published wheel version when desired:
337
+
338
+ ```bash
339
+ agent-skill-installer --no-ui install \
340
+ --pypi-package your-skill-package \
341
+ --pypi-version 1.2.3 \
342
+ --agent all \
343
+ --scope global
344
+ ```
345
+
346
+ That mode downloads the named wheel and extracts only the bundled skill payload,
347
+ without installing that downloaded wheel into the current Python environment.
348
+
349
+ ### GitHub Source Installs
350
+
351
+ The generic command can also install the skill payload directly from a GitHub
352
+ archive:
353
+
354
+ ```bash
355
+ agent-skill-installer --no-ui install \
356
+ --github-url https://github.com/example/your-skill-package \
357
+ --agent all \
358
+ --scope global
359
+ ```
360
+
361
+ By default this uses the `main` ref and looks for either `skill/SKILL.md` or a
362
+ root `SKILL.md`. For a specific ref or nested skill directory, use either a tree
363
+ URL or explicit flags:
364
+
365
+ ```bash
366
+ agent-skill-installer --no-ui install \
367
+ --github-url https://github.com/example/your-skill-package/tree/v1/packages/skill \
368
+ --agent codex \
369
+ --scope repo
370
+
371
+ agent-skill-installer --no-ui install \
372
+ --github-url https://github.com/example/your-skill-package \
373
+ --github-ref v1 \
374
+ --github-path packages/skill \
375
+ --agent codex \
376
+ --scope repo
377
+ ```
378
+
379
+ Before release, a minimal package check is:
380
+
381
+ ```bash
382
+ python -m build
383
+ python -m twine check dist/*
384
+ python -m pip install dist/your_skill_package-1.2.3-py3-none-any.whl
385
+ ```
386
+
387
+ Then verify the generic command against the published package:
388
+
389
+ ```bash
390
+ agent-skill-installer --version
391
+ agent-skill-installer --no-ui install \
392
+ --pypi-package your-skill-package --pypi-version 1.2.3 \
393
+ --agent codex --scope repo
394
+ agent-skill-installer --no-ui uninstall \
395
+ --skill-name your-skill-package --agent codex --scope repo
396
+ ```
397
+
398
+ ## Status
399
+
400
+ This is a standalone, generic installer. Skill packages can rely on the
401
+ `agent-skill-installer` command directly, or use the Python APIs for custom
402
+ integration.