forked from bchanot/claude
1.4 KiB
1.4 KiB
paths
| paths | |||
|---|---|---|---|
|
mods/ — function-hooks plugins (Claude Code mods)
A mod lives in mods/<name>/ (.claude-plugin/plugin.json + hooks). It
loads through the tracked relative symlink skills/<name> -> ../mods/<name>
(~/.claude/skills links to skills/) as <name>@skills-dir, in place,
live at the next session or /reload-plugins. New mod: ln -s ../mods/<name> skills/<name> from the repo root (guard with [ -L ], a re-run nests a link).
Not CLAUDE_CODE_PLUGIN_DIRS (absolute path, settings env has no $HOME
expansion, settings.json is tracked), nor a local marketplace (add writes
an absolute path into settings.json).
- The engine lays
mods/<name>/tsconfig.jsonand.claude-plugin/types/; both are gitignored. - Optional user config:
~/.claude/<name>.json. Its"enabled": falseis the per-machine off switch (untracked)."<name>@skills-dir": falseinenabledPluginsalso works but lands in the TRACKED settings.json and dirties every machine's tree. - A dev copy of the same name (
--plugin-dir, hot-reload link in~/.claude/dev-mods/<session>/) shadows the skills-dir copy for that session: remove it before reading/reload-pluginsas a test of the link. - Tests:
make test suite=lib/tests/mods.test.sh(manifest, link,claude plugin validate,claude plugin test).doctor.shhas a Mods section.