/plugin-forge:plugin-forgefrom plugin-forge
Multi-host plugin manager (Claude Code, Codex, agy, hermes, grok). Use when the user asks to create a plugin, scaffold a plugin, check or doctor a plugin, validate a local install, publish a plugin, or register it in a marketplace (including Korean phrasings such as "플러그인 만들어", "플러그인 점검", "마켓 등록"). Scaffolds, checks, install-validates, and ships plugins using the manifest pattern established by toefl-prep and byoh: root plugin.json for agy, plugin.yaml for hermes, .claude-plugin for claude, .codex-plugin for codex, .grok-plugin for grok, plus directory symlinks for host discovery.
Ships in plugin-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Scaffold a new plugin in the five-host layout (claude, codex, agy, hermes, grok), check its manifests, validate a local install, and ship it to GitHub and a marketplace.
Engine:
${CLAUDE_PLUGIN_ROOT}/scripts/forge.pyis the single source of truth. Every host follows this skill and callsforge.pydirectly per the mapping below. This plugin ships no slash commands: the skill is the only interface, so there is no second spec to drift.
| File | Host |
|---|---|
plugin.json (root) | agy |
plugin.yaml (root) | hermes (YAML manifest plus register(ctx) in __init__.py) |
.claude-plugin/plugin.json | Claude Code (skills/agents/mcpServers) |
.claude-plugin/marketplace.json | Claude marketplace (source "./") |
.codex-plugin/plugin.json | Codex (interface block). This folder holds only plugin.json; the catalog is separate |
.agents/plugins/marketplace.json | Codex standalone catalog. create writes a "./" local source (codex-cli 0.152.1 installs the repo root directly; no plugins/<name> bundle is created) |
.grok-plugin/plugin.json | grok (xAI Grok Build) metadata manifest. Components (skills/, agents/) are read natively from the plugin root, so no discovery symlink is needed. Only flat path keys work ("skills": "./skills/"); a components object is ignored (measured on 1.0.13). Grok reads ONE manifest — root plugin.json wins over .grok-plugin/plugin.json (measured 1.0.13, bisect) — and honors its hooks path key; the .grok-plugin/hooks.json file loads only when the winning manifest declares it. Root hooks/hooks.json is auto-scanned ADDITIVELY in all cases, so it double-loads when any manifest also declares hooks. Hook schema is Claude-compatible (same events and matcher) minus the async field, and GROK_PLUGIN_ROOT is injected. xAI catalog reference |
.grok-plugin/marketplace.json | grok catalog. create does not generate one (there is no sha to pin before the first push). A standalone catalog is valid with a remote url+sha source: a standalone catalog pinning its own repo HEAD is listed by the browser (measured 1.0.13, plugin_count=1). A local "." self-reference is not listed (same version, 0), so doctor WARNs on it; a subdirectory local source is structurally validated only, which does not guarantee display |
.claude/skills, .codex/skills, .hermes/skills | Directory symlinks to ../skills for local discovery. Never copies: do not duplicate skills |
agents/*.md (root) | Agent source of truth (Claude markdown format) |
.claude/agents | Directory symlink to ../agents |
.codex-plugin/agents/<n>.toml | Codex-native TOML conversion (name, description, developer_instructions). .codex/agents symlinks to this folder. Never link the markdown directly |
mcp_config.json (root) | Single MCP source, agy spec filename (Antigravity plugin spec). claude declares mcpServers: ["./mcp_config.json"] in its manifest, codex declares mcpServers: "./mcp_config.json", agy auto-discovers it at the root (no wiring), grok gets a root .mcp.json file symlink to mcp_config.json (the name the grok spec reads), and hermes has no MCP file convention. Never create a root mcp.json: no host reads it. A .mcp.json in a plugin that did not select grok is legacy wiring and WARNs |
Plugin root: the plugin root is the directory that contains
.claude-plugin/plugin.json, not.claude-plugin/itself. Manifestskills,agents, andmcpServerspaths resolve against that root, so"skills": "./skills/"points at the rootskills/directory and is correct even though there are no skills inside.claude-plugin/.
| User intent | Action (call forge.py directly) |
|---|---|
| create a plugin, scaffold a new plugin | forge.py create <name> --owner LOGIN --hosts claude,codex,agy,hermes,grok --desc "..." |
| check a plugin, doctor, validate manifests | forge.py doctor [PATH] [--fix] |
| validate the install, does it load locally | forge.py install <PATH> --host all |
| publish, push it to GitHub | forge.py publish [PATH] --owner LOGIN |
| also register it in a hub marketplace | forge.py publish [PATH] --owner LOGIN --marketplace OWNER/REPO |
The GitHub owner and the hub catalog have no defaults. Pass
--owner LOGINor setPLUGIN_FORGE_OWNER. When empty, create writes aYOUR_GITHUB_USERplaceholder and publish refuses. The hub (--marketplace OWNER/REPOorPLUGIN_FORGE_MARKETPLACE) is optional: a generated plugin installs from its own repo (claude/codex plugin marketplace add owner/name,grok plugin install owner/name --trust).
--marketplace OWNER/REPOupdates the chosen hub's per-host manifests. Each host reads a different file:.claude-plugin/marketplace.json(claude),.agents/plugins/marketplace.json(codex, which also needspluginManifest,policy, andcategoryfields),.grok-plugin/marketplace.json(grok, which requires a 40-character sha pin: registered or refreshed from the pushed HEAD sha, skipped on a dry run, and created when the file is missing; the catalognameandownerderive from the hub repo, and a new entry prefers the keywords and category from the plugin's.grok-plugin/plugin.json), and.hermes/<name>/plugin.yaml(hermes, one file per plugin; a plugin without a rootplugin.yamlgets no stub and is skipped with a WARN, while an existing entry still has its version refreshed). A hub carrying only the Claude file makescodex plugin addfail with not found in marketplace. Standalone distribution needs no hub at all.grok sha pin operations rule: re-run
publish --marketplaceafter every upstream push so the hub catalog sha advances. While the sha points at an old commit,grok plugin updatekeeps fetching that pinned commit, so no amount of pushing changes what gets reinstalled (reproduced when epic-harness stayed pinned at 561e206 and every reinstall pulled the stale version). forge publish refreshes both sha and version on an existing entry, and also re-pins.grok-plugin/plugin-index.json(the browser cache holding the same sha/version pair per plugin) when the hub ships one. That index is never created when absent, since a generated entry would lack thecomponentsskill listing the browser reads.
commands/ directory, and create scaffolds none.forge.py per the intent mapping above.forge.py only. Do not reintroduce slash commands: a command file restates the skill's arguments, checklists, and host lists, so adding one host then needs N+1 edits and one always gets missed (this happened during the five-host migration, when four command files each needed a manual fix and one was still wrong).forge.py create <name> [--owner LOGIN] [--hosts claude,codex,agy,hermes,grok] [--desc "..."] [--dir PATH]
--owner (or PLUGIN_FORGE_OWNER): GitHub user or org. No default. When empty, manifests and the README get YOUR_GITHUB_USER and a WARN.--hosts selects a subset (default: all five). Manifests for unselected hosts are omitted.plugin.yaml (YAML) plus an __init__.py with a register(ctx) stub. hermes uses a YAML manifest rather than JSON, and the plugin directory must contain __init__.py (Hermes plugin spec).skills/<name>/SKILL.md is the source of truth, and the discovery directory symlinks for the selected hosts (.claude/skills to ../skills, and so on) are generated automatically. Add skills only under the root skills/: the host folders are links and follow along. A real copy makes doctor WARN, and --fix restores the link.agents/<n>.md (Claude format). The codex variant must be rewritten as Codex-native TOML (.codex-plugin/agents/<n>.toml with name, description, developer_instructions). doctor checks md-to-toml coverage in both directions..grok-plugin/plugin.json with flat path keys (skills, agents, plus a documentation-only hooks pointer at root hooks/hooks.json). It does not write a .grok-plugin/marketplace.json: a standalone self-catalog with a local "." source is not listed by the grok browser (measured 1.0.13, plugin_count=0). Ship grok plugins through a hub sha pin (publish --marketplace) or direct install (grok plugin install owner/repo --trust). When shipping hooks, put grok's file at .grok-plugin/hooks.json and declare "hooks": "./.grok-plugin/hooks.json" in the WINNING grok manifest (root plugin.json if present, else .grok-plugin/plugin.json). Do NOT keep a root hooks/hooks.json: grok auto-scans it additively and Claude/Codex default to it, so hosts double-load..codex-plugin/plugin.json and a standalone .agents/plugins/marketplace.json. The catalog local path is "./" (the repo root; codex-cli 0.152.1 installs it directly). No plugins/<name> bundle exists. doctor --fix restores a missing catalog and rewrites stale ./plugins/<name> paths to "./".--mcp: for an MCP server plugin, also writes a root mcp_config.json stub and the host wiring (claude and codex manifest declarations, and a .mcp.json file symlink for grok).# Host comment per host, one copy-pasteable command per line. Never a markdown table, in the stub or in any later rewrite. This also covers a README written for a plugin packaged without create (doctor WARNs on a table under the Install heading).0.1.0; doctor never assigns one. On a release, bump every shipped manifest to the same version (plugin.json, plugin.yaml, .claude-plugin/plugin.json, .codex-plugin/plugin.json, .grok-plugin/plugin.json) before tagging, then re-pin the hub (see the grok sha rule above): each host reads only its own file, so a missed manifest leaves that host on the old version and its update check keeps reporting "updatable" forever. The generated AGENTS.md carries this two-step checklist.plugin.json over .grok-plugin/plugin.json. The root file is agy's manifest, but grok reads it first and only falls back to .grok-plugin when the root is absent (measured on 1.0.13: obscura-plugin shipped name "obscura-plugin" at the root and "obscura" under .grok-plugin, and grok plugin list printed the root value; llm-transpile, which ships no root manifest, resolved from .grok-plugin). A release that bumps only .grok-plugin therefore leaves grok serving the old version with no error, which is why doctor FAILs on that pair rather than WARNing.$schema, required fields (name, version, description), and name consistency (the top-level name in a marketplace.json is the market name and is exempt). hermes validates plugin.yaml through a stdlib key extractor, with no PyYAML dependency. The grok catalog (.grok-plugin/marketplace.json) is checked per entry: a remote source needs a 40-character hex sha plus url, a local source needs an existing path. Absence is not a WARN, since create no longer generates one. This is structural validation only and is separate from actual browser display: a standalone self-catalog can be structurally valid and still go unlisted (measured 1.0.13). The Codex catalog (.agents/plugins/marketplace.json) is checked for a local path that starts with ./, is not the repo root ("." or "./"), and exists, plus the presence of policy and category. A .codex-plugin/marketplace.json WARNs because Codex does not read it. A catalog name is a market id and is never compared against the plugin name. A .lsp.json, if present, is checked for JSON validity only (the schema is undocumented). Versions that disagree across the shipped manifests (plugin.json, plugin.yaml, .claude-plugin/plugin.json, .codex-plugin/plugin.json, .grok-plugin/plugin.json) WARN with the per-file values, since a missed bump leaves that host serving the old version..claude/skills, .codex/skills, and .hermes/skills to ../skills; .claude/agents to ../agents; .codex/agents to ../.codex-plugin/agents. A real directory (a duplicate) WARNs, and --fix deletes it and restores the link. Codex TOML against root md coverage is checked too.
2c. MCP wiring: when a root mcp_config.json exists, its JSON validity and the claude and codex manifest declarations are checked, and --fix wires them. Legacy wiring (.mcp.json plus a codex symlink) WARNs and --fix migrates it. A root mcp.json is a FAIL, since no host reads it.skills (directory), agents (file array), and mcpServers (file) paths must exist relative to the plugin root. A declared but missing path is a FAIL.hooks/hooks.json: FAIL when grok is not selected (default for both claude and codex). When grok is selected this is a WARN — grok auto-scans the root file additively, so any manifest-declared path on top of it double-loads. JSON validity only, because xAI does not document the event schema."hooks.json" resolves to the agy file and FAILs.Notification, agy has only five events).{"<name>": {...}}); claude and codex use {"hooks": {...}}.register_hook name in the hermes __init__.py must appear in VALID_HOOKS (a typo is silently ignored at runtime, so it WARNs).--owner, PLUGIN_FORGE_OWNER, or a git origin is available, gh api checks whether the repo exists under that account. The hub registration check runs only with --marketplace OWNER/REPO or PLUGIN_FORGE_MARKETPLACE; without either, it is skipped.| Host | Hook file | Notes |
|---|---|---|
| claude | .claude-plugin/hooks.json | Declared through the manifest hooks field |
| codex | .codex-plugin/hooks.json | Declared through the manifest hooks field. No Notification; use PermissionRequest |
| agy | hooks.json (root) | Forced: the agy manifest schema is additionalProperties:false, so no path can be declared |
| grok | .grok-plugin/hooks.json | Declared through the winning grok manifest's hooks field (root plugin.json wins over .grok-plugin/plugin.json) |
| hermes | (no file), ctx.register_hook(name, fn) in __init__.py | Programmatic registration. The handler is called as fn(**kwargs) |
hermes does have hooks: 23 entries in VALID_HOOKS, including pre_approval_request and post_approval_response, making it the only one of the five hosts with first-class approval events. An incorrect name is logged as a warning and then silently ignored, so doctor checks the names. Real plugins pass names from a collection (EVENTS, HOOK_STATES), which literal-argument matching never catches, so doctor scans for hook-shaped strings in the file heuristically and reports INFO when it cannot decide.
Only claude substitutes ${CLAUDE_PLUGIN_ROOT}. codex and claude install into versioned directories (cache/<market>/<plugin>/<version>/), so a hook command on another host that points at a bundled script by absolute path has to resolve the version segment at runtime. agy does not use a version directory.
skills/ and agents/ are the single source of truth, and host discovery paths are always directory-level symlinks. Copying skills per host (the toefl-prep style real copy) is forbidden and is an established recurring bug. Codex agents are the one exception: they are converted to TOML, not linked.plugin-forge is itself built in the five-host layout. Run forge.py doctor against this repo and against toefl-prep to confirm the checks hold (both pass with 0 FAIL).
plugin-forge's own .grok-plugin/marketplace.json pins this repo's HEAD through a remote url+sha source, which has to be re-pinned every release. Display is measured: a local "." self-reference was unlisted (1.0.13, plugin_count=0), and after the switch to remote url+sha it reached plugin_count=1. A standalone url-pinned catalog is therefore a valid distribution path, alongside hub sha pin registration (publish --marketplace) and direct install. Note that catalog_loaded=true tracks plugin-index.json rich catalogs, so false on a standalone catalog is normal.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub epicsagas/plugin-forge --plugin plugin-forge