Repository navigation
feat: crewlore as a Claude Code plugin, from the same source as lore install - #23
Merged
Merged
Conversation
…arketplace `/plugin marketplace add srijansk/crewlore` then `/plugin install crewlore@crewlore` gives Claude Code the `/lore` skill (as `/crewlore:lore`) and the three hooks that `lore install --hooks` writes. - `.claude-plugin/marketplace.json` at the repository root lists one plugin, `./plugins/crewlore`, so an install copies that directory (three files, 12 KB) and not the repository. - `plugins/crewlore/.claude-plugin/plugin.json` is metadata only; `plugins/crewlore/skills/lore/SKILL.md` and `plugins/crewlore/hooks/hooks.json` are generated by `scripts/export_plugin.py` (`lore.claude_plugin`) from `SKILL_MD` and the installer's hook entries, through `hook_groups()`, the shared chokepoint `install_hooks` now uses, so the plugin and the installer cannot disagree. `tests/unit/test_claude_plugin.py` fails when a committed file drifts from the generator, when the skill differs from what `lore install` writes, when a hook differs from what `lore install --hooks` writes, or when the manifest's version lags the package. - The plugin bundles no Python: the hooks run the same `HOOK_SHELL` command (`lore` on PATH, exit 0 whatever happens, only the hook's own JSON passed on), so `pipx install crewlore` is still needed. README and CHANGELOG say so, and say to pick one of the two install routes, since Claude Code runs a plugin's copy of a hook separately from a settings file's copy. - The plugin and the marketplace file stay out of the sdist, like the other repo-only files. - CONTRIBUTING.md gains a Releasing section: the version bump, the CHANGELOG heading, `uv lock`, the plugin export (the test insists on it), the gates, the commit on main, CI, then the annotated tag that runs release.yml. Verified with claude 2.1.248: `claude plugin validate` passes, plain and `--strict`, on the marketplace root and on `plugins/crewlore`; under an isolated CLAUDE_CONFIG_DIR, marketplace add + install + details report version 0.5.2, Skills (1) lore and Hooks (3) PreToolUse, UserPromptSubmit, SessionStart, with the installed copy holding only the three plugin files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ion-agreement test, release note) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What
crewlore can now be installed into Claude Code as a plugin, with no Python bundled:
The plugin is the same
/loreskill (invoked as/crewlore:lore) and the same three hooks thatlore install --hookswrites, so the two are two ways to the same files: pick one. It still needspipx install crewlore, because the skill and the hooks run thelorecommand.How it stays in sync
.claude-plugin/marketplace.jsonat the repo root points atplugins/crewlore/, which holds.claude-plugin/plugin.json,skills/lore/SKILL.mdandhooks/hooks.json. An install copies exactly those three files (12 KB), not the repository.src/lore/claude_plugin.py(uv run python scripts/export_plugin.py) from the installer's ownSKILL_MDand a newhook_groups()thatinstall_hooksnow also uses.tests/unit/test_claude_plugin.pyfails when a committed file drifts from the generator, when the plugin skill differs from whatlore installwrites, when the hooks differ from whatinstall_hookswrites, or when the manifest version differs fromlore.__version__(and pyproject from__version__).Verification
claude plugin validate(2.1.248), plain and--strict, on the marketplace root and onplugins/crewlore.CLAUDE_CONFIG_DIR: marketplace add → install → list shows 0.5.2 enabled; details list the skill and the three hooks; the installed copy is the three files; the real~/.claudeis byte-identical before and after./plugin update crewlore@crewlore, the plugin files ship in the sdist so its tests pass, a version-agreement test, the release note). It also measured that a user with bothlore install --hooksand the plugin gets each hook twice per event (double context, double usage counts, no corruption), which is why the README says to pick one.🤖 Generated with Claude Code