plugin-forge
GitHub用于创建、脚手架生成或校验 Claude Code 插件的 Skill。支持生成符合规范的插件骨架,以及验证插件或整个市场是否符合内部规范(如标准库限制、钩子协议等)。
触发场景
安装
npx skills add s0912758806p/agentic-sop-to-work --skill plugin-forge -g -y
SKILL.md
Frontmatter
{
"name": "plugin-forge",
"description": "Use when creating, scaffolding, or linting a Claude Code plugin — generate a grammar-conformant plugin skeleton, or validate a plugin \/ whole marketplace against house invariants (manifest, frontmatter, stdlib-only, hook protocol, test harness). | 要新建 \/ scaffold 一個 Claude Code plugin,或 lint 既有 plugin \/ 整個 marketplace 是否符合房規時使用。",
"argument-hint": "lint <plugin-dir> | lint --all --strict | new <name>"
}
plugin-forge — lint + scaffold Claude Code plugins
Invoked as /plugin-forge:plugin-forge [args] — arguments: $ARGUMENTS. Let
ROOT="${CLAUDE_PLUGIN_ROOT}" (the sections below show the repo-relative paths used inside
this marketplace's checkout; the installed plugin's are under $ROOT):
lint <plugin-dir>→python3 "$ROOT/pluginforge/lint.py" <plugin-dir> [--strict]lint --all→python3 "$ROOT/pluginforge/lint.py" --all --strict(from the marketplace root)new <name>→python3 "$ROOT/pluginforge/scaffold.py" <name>
Present the lint findings (HARD then SOFT) verbatim; for scaffold, report the new dir + next steps.
Lint
- One plugin:
python3 plugins/plugin-forge/pluginforge/lint.py <plugin-dir> - Whole marketplace:
python3 plugins/plugin-forge/pluginforge/lint.py --all --strict --strictadds house invariants (stdlib-only, verify.py, test_no_third_party). Exits 1 on any HARD.- Always on:
vendored-core-drift(HARD) — a vendored_core/or other GENERATED file was hand-edited, or is out of date withshared/sopcore/. Fix: edit the source, runpython3 tools/sync_core.py.
Scaffold
python3 plugins/plugin-forge/pluginforge/scaffold.py <name>→ a skeleton that passeslint --strict, shipping the shared core as<pkg>/_core/.- Then add it to
marketplace.json+ CI and flesh out the TODOs.
The lint report is a DRAFT; a human decides. HARD = fails CI; SOFT = advisory.
版本历史
-
11ac66b
当前 2026-11-02 14:27
版本从0.2.0升级至0.3.0:新增 vendored-core-drift 硬规则、agents frontmatter 和 userConfig 形状校验;scaffold 改为仅 skills-only 并支持 exec-form 钩子;新增 strict SOFT commands-dir 检查。
- 248a01f 2026-07-05 14:55


