Skip to content

wheel-included-skills: a tested build recipe and a wheel check (#31) - #34

Merged
thorwhalen merged 2 commits into
masterfrom
wheel-included-skills-recipe
Nov 23, 2026
Merged

thorwhalen merged 2 commits into
masterfrom
wheel-included-skills-recipe

Conversation

@thorwhalen

Copy link
Copy Markdown
Collaborator

The wheel-included-skills placement method (#8) as a tested recipe.

  • skill.wheel.wheel_skills_config(package, backend='hatch'|'setuptools') returns the pyproject.toml settings as a dict to merge. wheel_skills_snippet returns them as TOML text for a file that has no such table. hatch uses force-include from skills to <pkg>/_skills. setuptools declares <pkg>._skills as a subpackage whose directory is skills/.
  • check_wheel_skills(wheel, repo_root), also on the CLI as skill check-wheel-skills <wheel>, checks that every tracked skills/<name>/ file is in the wheel under <pkg>/_skills/<name>/, byte for byte. It also checks that each SKILL.md is in the wheel exactly once, that the repository holds each skill in one skills/ folder (the places gh skill discovers), and that no copy of the wheel folder is committed. It warns when a developer skill ships to users.
  • An end-to-end test builds a fixture wheel with hatchling (offline), checks it, and unpacks it onto sys.path, where find_package_skills (used by skill install-from-package) finds <pkg>/_skills. Regression tests cover a git-ignored file, a Finder .DS_Store, a fixture folder named like a skill, a symlinked skills/ copy, a stale wheel, a committed wheel folder, and a missing wheel.
  • skill-enable and the README document the method, including building through the sdist and the sdist needing skills/.

Adversarial review: no blockers. The 4 majors are fixed in the second commit: OS litter and git-ignored files no longer cause false fails or passes, duplicates count only skills/ folders, and there is a setuptools variant. Most minors are fixed too: linked folders are walked, audience is read with yaml, the CLI reports an unreadable wheel cleanly, the docs are corrected, and a mergeable config dict was added. One question stays open: whether gh skill follows symlinks is unverified, so the recipe copies and never links.

Local: ruff clean, pytest 264 passed.

Closes #31

- skill.wheel: wheel_skills_snippet (hatch force-include of skills/ into
  <pkg>/_skills) and check_wheel_skills (every skills/ file in the wheel byte
  for byte, each SKILL.md once, the repository holding each skill once, no
  committed copy of the wheel folder; warns on a developer skill that ships).
- CLI: skill check-wheel-skills <wheel>.
- An end-to-end test builds a fixture wheel with hatchling, checks it, and
  finds its skills with find_package_skills.
- skill-enable and the README document the method.

Closes #31
- Expect only what a build ships: tracked files (git ls-files) when in a
  git tree, never .DS_Store or cache folders; walk linked folders as the
  build does.
- Duplicates: only real skills/<name>/SKILL.md places (what gh skill
  discovers); skip environments and site-packages.
- setuptools variant (package-dir subpackage), and wheel_skills_config as a
  dict to merge; the snippet derives the same settings.
- audience read with yaml; the CLI reports an unreadable wheel cleanly;
  docs: build through the sdist, the sdist must include skills/.
@thorwhalen
thorwhalen merged commit 001e634 into master Nov 23, 2026
28 checks passed
@thorwhalen
thorwhalen deleted the wheel-included-skills-recipe branch November 23, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wheel-included-skills: a tested build recipe

1 participant