feat(cli): add sm skills for installing bundled agent skills - #64
Merged
Merged
Conversation
Three new skill packs cover testing, locales/i18n, and the cross-module registries (menu/permissions/feature flags/events), filling the obvious gaps in the existing skill set. The CLI grows a `skills` subgroup with three commands: * `sm skills list` — show every bundled skill + its trigger description * `sm skills add [names...]` — copy skills into ./.claude/skills/ (or `-g` for ~/.claude/skills, or `--dest` for any path); `--symlink` for in-place dev, `--force` to overwrite existing dirs * `sm skills update [names...]` — re-pull. With no names, only updates skills already present at the destination. The bundle is the same source as the repo-root /skills/ tree (so `npx skills add antosubash/simple_module_python` keeps working): a symlink at simple_module_cli/skills points at /skills/ for editable installs, and Hatch `force-include` copies the real files into the wheel for `pip install simple_module_cli` users. https://claude.ai/code/session_016vjREbURssi81LjqhDpi4L
* `_GLOBAL_DIR` was captured at module import via `Path.home() / ".claude" / "skills"`, so HOME overrides (CI, sudo, Docker entrypoints) didn't take effect for the running process. The test exposed this exactly — it had to monkey-patch both `Path.home` and the cached constant. Resolve home lazily inside `_resolve_dest`. * `install_skill` returned action codes as bare strings (`"wrote"` / `"updated"` / `"skipped"`) and `add_skills` keyed a `counts` dict off the same literals — a typo in either place silently produced KeyError. Replace with an `Action` StrEnum. * `_read_description`'s "any line containing a colon ends the value" heuristic mis-fires on prose like ``Triggers on Foo: bar``. Use YAML's actual continuation rule (lines that start with whitespace are folded into the value) instead. Add regression tests for both folded continuations and prose-with-colon. https://claude.ai/code/session_016vjREbURssi81LjqhDpi4L
antosubash
marked this pull request as ready for review
April 30, 2026 10:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
simple-module-testing— rootconftest.pyfixtures (db_session,app,authenticated_client), the alembic-stamp trick, single-test runs, e2e/Playwright.simple-module-locales—locale_dirs(), namespace conventions, CLDR plurals, the Zod-in-hook rule, SM013–SM016.simple-module-registries—register_menu_items/register_permissions/register_feature_flags/register_event_handlerswith realistic snippets and thepublishvspublish_nowaitdistinction.sm skillssubcommand group:sm skills list— print every bundled skill with its trigger description.sm skills add [names...]— install into./.claude/skills/(default),~/.claude/skills/(-g), or any--dest. Skips existing dirs unless--force. Optional--symlinkfor skill devs iterating in-tree.sm skills update [names...]— re-pull. With no names, only updates skills already present at the destination, so re-running it is safe and predictable./skills/stays the source of truth (sonpx skills add antosubash/simple_module_pythonkeeps working).simple_module_cli/skillsis a symlink to../../../skills— editable installs andimportlib.resourcesresolve the bundle without copying.force-includecopies the real files into the wheel andexcludekeeps the symlink out of the package, so a plainpip install simple_module_cliships the skills with no duplicate-entry warnings.Test plan
uv run pytest framework/cli/tests— 84 passed (18 new tests cover list / add / update / unknown / skip-vs-force / symlink /--global/ real bundle integrity).uv run ruff check framework/cli/— clean.uv run ruff format --check framework/cli/— clean.uv run python scripts/check_file_size.py— no file exceeds 300 lines.uvx --from build pyproject-build --wheel framework/cli— wheel includes 10 skill dirs atsimple_module_cli/skills/<name>/SKILL.md, no duplicate-name warnings.sm skills list,sm skills add ...,sm skills add ...again (skipped),sm skills update(force-overwrite),sm skills add does-not-exist(errors with available list).https://claude.ai/code/session_016vjREbURssi81LjqhDpi4L
Generated by Claude Code