-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Describe the feature
Note: these tools should take into account different clients as needed (Cursor, Claude Code,...) and their respective schemas differences,...
Enhance the tools/ folder with a coherent set of scripts or CLI tools that support the plugin and skill lifecycle:
-
Validate plugin structure — A tool that checks a plugin directory (and optionally the whole repo) against the expected layout: e.g.
plugins/<name>/.claude-plugin/plugin.json,plugins/<name>/.mcp.jsonif present,skills/<skill-name>/SKILL.md, correct frontmatter and schema compliance, and cross-references (marketplace ↔ plugin, plugin ↔ skills). This can extend or wrap existingvalidate-cross-refs.cjsand lint/manifest checks. -
Bump plugin and marketplace version — A tool to bump version numbers in a single plugin (e.g.
plugin.jsonand any other versioned manifests) and/or in the marketplace manifest (.claude-plugin/marketplace.json) for a given plugin entry, following semver (patch/minor/major). Avoids manual edits and reduces mistakes. -
Generate a new plugin — A generator (e.g.
node tools/generate-plugin.cjs my-plugin-name) that scaffolds a new plugin directory:plugins/<name>/.claude-plugin/plugin.json,plugins/<name>/.mcp.json(optional),plugins/<name>/README.mdstub, and optionally a first skill or placeholder, so contributors can start from a consistent structure. -
Generate a new skill — A generator (e.g.
node tools/generate-skill.cjs my-skill-nameor scoped to a plugin) that scaffoldsskills/<name>/SKILL.mdwith valid frontmatter (name,description) and optionalreferences/placeholder, matching the repo’s skill-frontmatter schema and design guidelines.
All tools must be exposed as mise tasks (e.g. mise run plugin:validate, mise run plugin:bump, mise run plugin:new, mise run skill:new) so CI and contributors use the same interface.
Use Case
- Consistency: New plugins and skills often miss required files or use wrong structure. A validator and generators reduce variation and help contributors get it right the first time.
- Less manual work: Version bumps across plugin.json and marketplace.json are error-prone; a single command (e.g.
mise run plugin:bump patch deploy-on-aws) is safer and faster. - Onboarding: “Run this to create a new plugin/skill” is easier to document and script than “copy this folder and edit these 5 files.”
- CI and pre-commit: A single “validate plugin structure” command can be run in CI and locally (e.g. pre-commit) so structural regressions are caught early.
Proposed Solution
-
Validate plugin structure
- Add (or extend) a script, e.g.
tools/validate-plugin-structure, that:- Takes a path (plugin dir or repo root).
- Checks directory layout (
.claude-plugin/plugin.json,skills/*/SKILL.md, optional.mcp.json). - Validates manifests against
schemas/plugin.schema.json,schemas/skill-frontmatter.schema.json,schemas/mcp.schema.json. - Reuses or reimplements existing
validate-cross-refs.cjsfor marketplace/plugin/skill cross-refs. - Exits with non-zero and clear errors if something is wrong.
- Add a mise task, e.g.
plugin:validateorlint:plugin-structure, that runs this (and optionallylint:manifests+lint:cross-refs).
- Add (or extend) a script, e.g.
-
Bump plugin / marketplace version
- Add
tools/bump-version(or similar) with usage like:bump-version patch plugins/deploy-on-aws— bumpsplugins/deploy-on-aws/.claude-plugin/plugin.jsonand the matching entry in.claude-plugin/marketplace.jsonto the next patch.- Optional:
bump-version minor marketplacefor marketplace metadata version only.
- Implement by parsing JSON, updating version with semver logic (or a small library), and writing back. Ensure formatting is preserved (e.g. no extra newlines).
- Expose as
mise run plugin:bump(orversion:bump) with args passed through.
- Add
-
Generate new plugin
- Add
tools/generate-plugin <name>that:- Creates
plugins/<name>/with.claude-plugin/plugin.json(minimal valid manifest), optional.mcp.jsonstub, andREADME.mdwith standard sections from DESIGN_GUIDELINES or from a template. - Optionally creates
skills/<first-skill>/SKILL.mdstub. - Uses schema defaults or minimal valid values so the result passes
validate-plugin-structureandlint:manifests.
- Creates
- Document in DEVELOPMENT_GUIDE; add mise task
plugin:newthat runs the generator.
- Add
-
Generate new skill
- Add
tools/generate-skill <name> [--plugin path]that:- Creates
skills/<name>/SKILL.mdwith YAML frontmatter (name,descriptionplaceholder) that satisfiesskill-frontmatter.schema.jsonand design guidelines (e.g. description length). - Optionally creates
references/.gitkeepor a shortreferences/defaults.mdplaceholder.
- Creates
- If
--pluginis given, create the skill under that plugin path; otherwise assume repo root or prompt. - Add mise task
skill:new.
- Add
-
Documentation
- Update DEVELOPMENT_GUIDE (and optionally README) to describe the new tools and mise tasks. Add a short “Creating a new plugin” / “Adding a new skill” section that points to these commands.
Other Information
- Existing tools:
tools/validate-cross-refs.cjs,tools/markdownlint-frontmatter.cjs,tools/markdownlint-skill-length.cjs. The new validator should compose with these rather than duplicate logic. - Schemas:
schemas/plugin.schema.json,schemas/marketplace.schema.json,schemas/mcp.schema.json,schemas/skill-frontmatter.schema.json. Generators must output schema-valid JSON/YAML. - DESIGN_GUIDELINES and directory structure (e.g.
plugins/<name>/.claude-plugin/plugin.json,skills/<skill>/SKILL.md,references/) should be the single source of truth for what “valid” looks like; the validator and generators should align with that. - Prefer no new runtime dependencies where possible; use Node built-ins or existing dev deps. If a semver helper is needed, consider a small dependency or a minimal implementation.
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change