From codex-toolkit
Provides canonical reference for Claude Code plugin schemas, frontmatter fields, hook events, and naming conventions. Injects into Codex audit prompts for artifact validation.
npx claudepluginhub xiaolai/codex-toolkit-for-claude --plugin codex-toolkitThis skill uses the workspace's default tool permissions.
> **Purpose**: This skill is the single source of truth for Claude Code artifact conventions. Audit commands inject this content into Codex's `developer-instructions` so Codex can accurately validate Claude Code artifacts despite having no native knowledge of the platform.
Validates Claude Code plugin artifacts against conventions for frontmatter schemas, hook events, naming, prompts, and references. Use when writing, reviewing, or linting plugins.
Validates Claude Code plugins for structure, manifest, frontmatter, tool invocations, and token budgets using Python scripts. Guides selection of components like skills, agents, MCP/LSP servers, hooks.
Guides creation, validation, and troubleshooting of Claude Code plugin.json files, including schema, required fields, and best practices.
Share bugs, ideas, or general feedback.
Purpose: This skill is the single source of truth for Claude Code artifact conventions. Audit commands inject this content into Codex's
developer-instructionsso Codex can accurately validate Claude Code artifacts despite having no native knowledge of the platform.Freshness: Last updated 2026-03-25 from context7 (
/websites/code_claude_en_plugins-reference,/websites/code_claude_en_plugins). Run/codex-toolkit:refresh-knowledgeto refresh.
Only name is strictly required. Version and description are strongly recommended but optional.
Required:
name (string): plugin identifier, kebab-case. Used for namespacing (e.g., plugin-dev:agent-creator)Recommended:
version (string): semver X.Y.Z. If also set in marketplace entry, plugin.json takes precedencedescription (string): brief purposeOptional metadata:
author (object): { "name": "string", "email": "string", "url": "string" }homepage (string): URL to plugin docsrepository (string): URL to source codelicense (string): SPDX identifier (e.g., "MIT", "Apache-2.0")keywords (string[]): discovery tagsComponent path fields (string, string[], or inline object):
commands — path(s) to command files. Default: ./commands/ (auto-discovered)agents — path(s) to agent files. Default: ./agents/ (auto-discovered)skills — path(s) to skill directories. Default: ./skills/ (auto-discovered)hooks — path to hooks config OR inline hooks object. Default: ./hooks/hooks.jsonmcpServers — path to MCP config OR inline object. Default: ./.mcp.jsonlspServers — path to LSP config. Default: ./.lsp.jsonoutputStyles — path to output style definitionsIf omitted, components are auto-discovered from default locations.
Location: commands/<name>.md (auto-discovered from commands/ directory)
Required fields:
description (string): shown in /help, must be specific and actionableOptional fields:
argument-hint (string): usage pattern (e.g., "<file> [--flag]")allowed-tools (string[]): restrict available tools. Omit for all toolsmodel (string): override session model (haiku, sonnet, opus)user-invocable (boolean): false for shared partials in commands/shared/Body: imperative instructions FOR Claude, not documentation TO user.
Location: commands/shared/<name>.md
Required:
user-invocable: falseReferenced by commands to eliminate boilerplate. Not shown in /help.
Location: agents/<name>.md (auto-discovered)
Official documented fields:
name (string): agent identifierdescription (string): what the agent does and when to invoke itWidely-used convention fields (not in official docs but used by all xiaolai plugins and many community plugins):
model (string): haiku, sonnet, opuscolor (string): UI color hint — cyan, blue, magenta, yellow, green, redtools (string[] or comma-separated): tools available to the agentskills (string[]): skills loaded into context, format plugin-name:skill-nameallowed-tools (string[]): alternative to toolsAgents can also embed inline hooks in frontmatter for PreToolUse/PostToolUse within their scope.
Body: system prompt defining mission, instructions, and output format. Best practice: include <example> blocks in description showing when/how to trigger.
Location: skills/<skill-name>/SKILL.md (or skills/<plugin-name>/<skill-name>/SKILL.md)
Required frontmatter:
name (string): skill identifierdescription (string): when/why to use — acts as trigger for auto-loadingOptional frontmatter:
version (string): semverglobs (string or string[]): file patterns that scope this skillBody: reference material. Keep under 500 lines for context efficiency.
Supporting files alongside SKILL.md:
references/ — detailed reference materialexamples/ — working code examplesscripts/ — utility scriptsSkills in commands/ directory work identically (legacy layout). Both are auto-discovered.
Location: hooks/hooks.json (can have multiple files: hooks.json, security-hooks.json, etc.), inline in plugin.json hooks field, or inline in agent frontmatter.
Valid event types:
PreToolUse — before a tool executes (can block via permission decision)PostToolUse — after a tool executes successfullyPostToolUseFailure — after a tool execution failsPermissionRequest — when tool permission is neededUserPromptSubmit — when user sends a messageStop — when Claude stops respondingSubagentStop — when a subagent completesSessionStart — when a session beginsSessionEnd — when a session endsPreCompact — before context compressionNotification — for notificationsInstructionsLoaded — after CLAUDE.md files are loadedNote: Event names are case-sensitive.
Hook types:
command — run a shell command, receives JSON on stdinprompt — evaluate a prompt with the LLMagent — spawn an agentic verifier for complex verification tasksHook output (for command type blocking decisions):
{
"hookSpecificOutput": {
"permissionDecision": "allow" | "deny",
"permissionDecisionReason": "explanation"
}
}
Matcher: regex pattern for tool name (e.g., "Bash", "Write|Edit", "mcp__.*")
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/format-code.sh"
}
]
}
]
}
}
Multiple hook config files are supported in the hooks/ directory.
{
"mcpServers": {
"server-name": {
"command": "executable",
"args": ["arg1", "arg2"],
"cwd": "${CLAUDE_PLUGIN_ROOT}",
"env": { "KEY": "value" }
}
}
}
Per-plugin marketplace (for claude plugin marketplace add):
{
"name": "marketplace-name",
"owner": { "name": "author-name" },
"plugins": [
{
"name": "plugin-name",
"source": { "source": "github", "repo": "owner/repo" },
"description": "...",
"version": "X.Y.Z",
"author": { "name": "..." },
"category": "developer-tools"
}
]
}
owner with name is required for marketplace validation.
Source types: github, git, url, npm, file, directory, hostPattern
plugin-name/
├── .claude-plugin/
│ ├── plugin.json # manifest (name required, rest optional)
│ └── marketplace.json # optional
├── commands/ # auto-discovered
│ ├── command-name.md
│ └── shared/ # non-invocable partials
│ └── partial-name.md
├── agents/ # auto-discovered
│ └── agent-name.md
├── skills/ # auto-discovered
│ └── skill-name/
│ ├── SKILL.md
│ ├── references/ # optional
│ ├── examples/ # optional
│ └── scripts/ # optional
├── hooks/ # can have multiple .json files
│ ├── hooks.json
│ └── security-hooks.json # additional hook configs
├── scripts/ # utility scripts
├── settings.json # default plugin settings (optional)
├── .mcp.json # optional MCP servers
├── .lsp.json # optional LSP servers
├── CLAUDE.md # project instructions
├── README.md
└── LICENSE
${CLAUDE_PLUGIN_ROOT} resolves to the plugin's root directory at runtime. Use it in all script paths for portability.
reading-assistant, codex-toolkit).md (audit-plugin.md).md (qc-coordinator.md)skill-name/SKILL.md or plugin-name/skill-name/SKILL.mdcodex-preflight.sh, parse_epub.py)settings.json at plugin root — default settings shipped with the plugin~/.claude/settings.json — global user settings{project}/.claude/settings.json — project settings (committed){project}/.claude/settings.local.json — local settings (gitignored).claude/<plugin-name>.local.md — per-plugin config with YAML frontmatter@ import syntax to reference other files.claude/, ~/.claude/, parent directoriesclaudeMdExcludes setting can ignore specific CLAUDE.md filesallowed-tools, least-privilege<example> blocks for triggeringdescription (required), paths (optional glob array)