skill-enable
Skill1 starsChanged 6 months agoMITView on GitHub
Ship a Python package's AI agent skills with `pip install` — and decide WHICH skills to ship. Use when the user asks how to include skills in their package distribution, make skills available after `pip install`, ship SKILL.md files with their package, set up `{pkg}/data/skills/`, configure package-data, add a skills installer/convenience function, or says "how do users get my skills after pip install", "ship skills with my package", "distribute skills", "package skills", or "enable skills in my library". Also trigger when working on pyproject.toml and the project has skills to distribute. The overall layout decision (where real files live, the `.claude/skills/` symlink bridge, spec compliance) is owned by **skill-package-setup**; this skill covers the pip-distribution mechanics and audience classification.
- Deletes or force-pushes
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- thorwhalen/skillword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- thorwhalen/skill★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- skill-buildSkill
- skill-docsSkill
- skill-manageSkill
- skill-package-setupSkill
- skill-syncSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
Not every skill should ship with pip install.
- Distinctive: line 135
Verify the wheel actually contains them:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill enablement — shipping skills via pip
How to ship a package's consumer skills with pip install your-package, and
how to decide which skills qualify. Layout and spec compliance are owned by the
skill-package-setup skill — read it first if you haven't picked a layout.
Where pip-shipped skills go (and why it just works)
Shipping skills in the wheel is opt-in: the default placement method is
repo-skills(top-levelskills/, installed withgh skill install). This section is thepackage-data-skillsmethod, for when the maintainer wants skills in the wheel (misc/docs/skill-placement-methods.md, addaix/skill#8).
To ride along with pip install, skill files must live inside the importable
package: {pkg}/data/skills/<name>/. That's the only place a wheel reliably
ships non-code data.
Bonus: {pkg}/data/skills/ is also a first-class gh skill source —
gh skill discovers any non-hidden **/skills/*/SKILL.md, and {pkg}/data/skills/
contains a skills/ dir under the non-hidden prefix {pkg}/data/. So one real
location serves both channels: pip install <pkg> (bundled, offline) and
gh skill install <owner>/<repo> <name> (cross-agent). Claude Code reads neither
directly, so commit a relative symlink per skill in .claude/skills/ (the bridge
that skill-package-setup sets up).
Use
{pkg}/data/skills/only when you actually want skills in the wheel. Pure dev/maintainer skills belong in top-levelskills/instead (skill-package-setup rule). Never put the same skill in both —gh skillwould report duplicates.
Step 1: decide which skills to ship (audience classification)
Not every skill should ship with pip install. Two audiences:
- Consumer skills (
metadata.audience: users) — help people use the package. These ship ({pkg}/data/skills/). E.g. "how to search for skills", "how to build storage interfaces with dol". - Contributor skills (
metadata.audience: developers) — help people develop/contribute. These stay in top-levelskills/and do NOT ship. E.g. "run the test suite", "set up the dev environment", "CI/CD workflow".
Some serve both — mark metadata.audience: both.
Spec note:
audienceis not a top-level spec field — put it undermetadata:. A bare top-levelaudience:failsgh skill publishvalidation.
How to classify
If the skill has metadata.audience, respect it. Otherwise infer from name,
description, and body:
Developer-only signals — if most apply and no consumer signals do →
developers:
- Name contains:
dev,debug,ci,lint,contrib,internal,test,setup-dev,release - Description: "contribute to", "develop the package", "maintain the codebase", "internal tooling", "run the test suite", "CI/CD pipeline for this project", "set up a development environment"
- Body primarily references: dev setup (virtualenv, editable installs),
running tests (pytest/tox/nox), linting/formatting (ruff/black/mypy), git/PR
workflow, CI config (
.github/workflows/), release processes, contributor-only internals - Only makes sense with the repo checked out — not just the installed package
Consumer signals — if any apply, likely for users:
- Description focuses on what users do with the package: "use this skill when", "how to search/build/configure"
- Body references the public API available after
pip install - Works for someone who only has the installed package (no repo checkout)
When in doubt, include it — classify users unless clearly developer-only.
Applying it
Ship only consumer skills (users/both) from {pkg}/data/skills/; keep
developer-only skills in top-level skills/. For each excluded skill, tell the user:
"Keeping
{name}in top-levelskills/(not pip-shipped) — classified developer-only because {reason}. To ship it anyway, setmetadata.audience: both."
Step 2: layout (delegate to skill-package-setup)
your-package/
├── your_pkg/
│ └── data/skills/ ← pip-shipped consumer skills (real files)
│ ├── your-pkg-feature-a/SKILL.md
│ └── your-pkg-feature-b/
│ ├── SKILL.md
│ └── references/api-guide.md
├── skills/ ← dev/maintainer skills (real files, not shipped)
│ └── your-pkg-dev-task/SKILL.md
├── .claude/skills/ ← relative symlinks into BOTH of the above
│ ├── your-pkg-feature-a -> ../../your_pkg/data/skills/your-pkg-feature-a
│ └── your-pkg-dev-task -> ../../skills/your-pkg-dev-task
├── pyproject.toml
└── README.md(skill-package-setup's runbook has the exact git mv + symlink commands.)
Step 3: include the data in the distribution
Hatchling (most thorwhalen repos):
[tool.hatch.build.targets.wheel]
include = ["your_pkg/data/*"] # or rely on hatchling's implicit your_pkg/** inclusionSetuptools:
[tool.setuptools.package-data]
your_pkg = ["data/skills/**/*"]Verify the wheel actually contains them:
python -m build --wheel >/dev/null && unzip -l dist/*.whl | grep -i skillswheel-included-skills (real files in top-level skills/, copied into the wheel at
build time; decision record addaix/skill#8, recipe #31). hatchling:
[tool.hatch.build.targets.wheel.force-include]
"skills" = "your_pkg/_skills"setuptools: a setup.py beside pyproject.toml (which keeps the metadata), declaring the skills folder as a subpackage whose directory is skills/ while keeping package discovery. pyproject.toml alone cannot do both: an explicit [tool.setuptools] packages = [...] list turns discovery off and every subpackage is left out of the wheel, and [tool.setuptools.packages.find] ignores a package-dir entry for a package it does not find (addaix/skill#44). Remove every [tool.setuptools] packages, packages.find, package-dir and package-data entry from pyproject.toml and move it into the setup.py: each one overrides the same setup.py setting, and the skills are silently dropped (skill check-wheel-skills names the table). setuptools prints a "Package would be ignored" notice for skill folders named like identifiers; they still ship as package data.
# setup.py: keeps package discovery and adds skills/ to the wheel as your_pkg/_skills
from setuptools import find_packages, setup
setup(
packages=find_packages(include=["your_pkg", "your_pkg.*"]) + ["your_pkg._skills"],
package_dir={"your_pkg._skills": "skills"},
package_data={"your_pkg._skills": ["**/*"]},
)(For a src/ layout: find_packages(where="src", ...) and add "": "src" to package_dir.)
skill.wheel_skills_snippet('your_pkg', backend=...) prints these, and
skill.wheel_skills_config(...) gives the hatchling one as a dict to merge into a pyproject.toml that
already has those tables. The copy exists only in the wheel: never commit
your_pkg/_skills/, and never make it a symlink (whether gh skill follows one is
unverified). Everything tracked in skills/ ships, developer skills included, so keep
<pkg>-dev-… skills out of this method's repos or accept that users see them. The sdist
must contain skills/ too (an sdist only-include that leaves it out fails the build with
"Forced include not found"). Build the way a release does, through the sdist, and check the
newest wheel:
rm -rf dist && python -m build && skill check-wheel-skills dist/*.whlIt fails unless every tracked skills/<name>/ file is in the wheel under
your_pkg/_skills/<name>/ byte for byte, each SKILL.md is in the wheel once, and the
repository holds each skill in one skills/ folder, and every subpackage of your_pkg is in
the wheel too; it warns about a developer skill that ships, and about a tests subpackage left
out. After pip install your-package, skill install-from-package your-package --agent
claude-code finds your_pkg/_skills.
Step 4: document install (README)
gh skill is the primary, cross-agent path; pip is the bundled/offline path:
## Skills (AI agent integration)
# Cross-agent (any host), versioned:
gh skill install your-org/your-repo your-pkg-feature-a --agent claude-code
# Or use the skills bundled with the pip package (offline):
pip install your-package
skill link-skills "$(python -c 'import your_pkg, os; print(os.path.join(your_pkg.__path__[0], "data", "skills"))')"Step 5 (optional): convenience helpers
# your_pkg/__init__.py or your_pkg/skills.py
from pathlib import Path
def skills_dir() -> Path:
"""Return the path to this package's bundled skills directory."""
return Path(__file__).parent / "data" / "skills"Then a CLI installer:
def install_skills(target: str = ""):
"""Install this package's bundled AI agent skills."""
from skill import link_skills
from your_pkg import skills_dir
link_skills(str(skills_dir()), target=target)And/or entry-point registration so skill search finds them pre-link:
[project.entry-points."skill.skill_packs"]
your-pkg = "your_pkg:skills_dir"Common pitfalls
- Forgetting package-data — declare it (Step 3) or the wheel omits the skills;
test with
pip install -e .+ theunzip -lcheck. - Hardcoding paths — use
Path(__file__).parent/importlib.resources. - Same skill in two real locations —
gh skillreports duplicates. One real location per skill (skill-package-setup rule). - Top-level
audience:— must bemetadata.audienceorgh skill publishrejects it. - Shipping dev-only skills — they clutter users' skill lists; keep them in
top-level
skills/, not{pkg}/data/skills/. - Large reference files bloat the wheel — keep references lean or fetch on demand.
Related
- skill-package-setup — the canonical layout & spec authority (read first).
- skill-docs — generate the README "Skills" section.
- skill-build / skill-creator — author skill content.
- skill-sync — keep shipped skills in sync with the code they document.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

