Files
Holocron/plugins/kyberforge/docs/research/docs/claude-code-plugins/api-reference.md
T
Defame1297andClaude Sonnet 4.6 3e52636da6 docs(kyberforge): fill marketplace and plugin gaps in Claude Code and Copilot research docs
## Why
The initial research pass focused on agent definitions. An audit identified
critical and minor gaps in both doc sets around plugin publishing, marketplace
registration, and the Copilot extensibility model.

## Implementation Notes
Claude Code gaps filled: end-to-end publish walkthrough (scaffold → validate →
tag → host → register), CLI vs in-session command surface equivalence, all six
marketplace source URL formats, plugin update/upgrade lifecycle, interactive
plugin manager UI, private marketplace auth, `commands` vs `skills/` distinction.

Copilot gaps filled: discovered that the GitHub App-based Copilot Extensions
track was sunset November 2025. Created copilot-extensions.md as historical
reference (deprecated, with MCP servers as the current replacement path).
Documented the agent vs. skillset extension type distinction, OAuth install
flow, and VS Code Chat Participants as the surviving @mention mechanism.
overview.md updated with a "Which Track to Use" decision table covering all
four active tracks plus the deprecated one.

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-06-27 15:40:53 +00:00

6.9 KiB

topic, source_keys
topic source_keys
api-reference
context7-websites-code-claude
claude-code-plugins-docs
claude-code-subagents-docs

Plugin Manifest Fields (plugin.json)

Field Type Required Description
name string Yes (for namespacing) Unique plugin identifier; prefix for skill names
displayName string No Human-readable name shown in plugin manager
version string No If omitted, git commit SHA is used
description string No Shown in plugin manager
author object No { name, email, url }
homepage string No Documentation URL
repository string No Source repository URL
license string No SPDX license identifier
keywords string[] No Search/discovery tags
skills string No Path to skills directory (default: ./skills/)
commands string[] No Legacy: explicit list of .md command file paths (prefer skills/)
agents string[] No Explicit list of agent file paths
hooks string No Path to hooks.json
mcpServers string No Path to MCP server config
lspServers string No Path to .lsp.json
outputStyles string No Path to output styles directory
experimental.themes string No Path to themes directory
experimental.monitors string No Path to monitors.json
dependencies array No Plugin dependencies; string or { name, version }

Agent Frontmatter Fields

Field Type Required Plugin subagent? Description
name string Yes Yes Unique, lowercase + hyphens; hooks receive as agent_type
description string Yes Yes Tells Claude when to delegate; "use proactively" triggers auto-invocation
tools string / list No Yes Allowlist; Agent(t1,t2) restricts spawnable subagent types
disallowedTools string / list No Yes Denylist; applied before tools; supports mcp__* glob patterns
model string No Yes sonnet/opus/haiku/fable alias, full model ID, or inherit
effort string / number No Yes low/medium/high/xhigh/max or numeric
maxTurns integer No Yes Max agentic turns before stopping
permissionMode string No No default/acceptEdits/auto/dontAsk/bypassPermissions/plan
skills list No Yes Skill names to preload into context at startup
mcpServers object / list No No Inline server defs or string references to configured servers
hooks object No No Per-agent PreToolUse/PostToolUse/Stop handlers
memory string No Yes user/project/local; enables MEMORY.md persistence
background boolean No Yes Force background execution (default: false)
isolation string No Yes worktree runs in isolated git worktree
color string No Yes UI color: red/blue/green/yellow/purple/orange/pink/cyan
initialPrompt string No Yes Auto-submitted first user turn when agent is main session thread

Fields marked No in the "Plugin subagent?" column are silently ignored when the agent file lives in a plugin's agents/ directory.

CLI Flags

Flag Description
--plugin-dir <path> Load a plugin directory or .zip archive for this session
--plugin-url <url> Load a plugin from a URL-hosted zip
--agents '<json>' Define session-only subagents as JSON (uses prompt not markdown body)
--agent <name> Run entire session as the named subagent
--disallowedTools 'Agent(name)' Block specific subagents

Multiple --plugin-dir flags are supported for loading multiple plugins.

CLI Commands (terminal)

Run these outside a session, from any terminal. These are the same operations as the in-session /plugin commands — use whichever surface is available.

Command Description
claude plugin init <name> Scaffold a new plugin under ~/.claude/skills/<name>/
claude plugin list [--enabled|--disabled] List installed plugins with version, source, and enabled status
claude plugin validate [<path>] Validate a plugin dir or marketplace dir (.); --strict promotes warnings to errors
claude plugin marketplace add <source> Add a marketplace; accepts GitHub shorthand, git URL, remote JSON URL, or local path
claude plugin tag [--push] [--dry-run] [--force] Tag a plugin release as {name}--v{version} and optionally push to remote

claude plugin marketplace add source formats:

Format Example Notes
GitHub shorthand owner/repo GitHub only. Pin: owner/repo@ref
HTTPS git URL https://gitlab.com/company/plugins.git Any git host. Pin: append #ref
SSH git URL [email protected]:company/plugins.git Any git host. Pin: append #ref
Remote JSON URL https://example.com/marketplace.json Must point directly to a marketplace.json file
Local directory ./my-marketplace Directory containing marketplace.json
Local JSON file ./path/to/marketplace.json Direct path to marketplace.json

In-Session Commands

Run these inside a running Claude Code session. The /plugin subcommands are equivalent to the claude plugin CLI subcommands above.

Command Description
/reload-plugins Pick up plugin file changes without restarting the session
/plugin Open the interactive plugin manager (Discover / Installed / Marketplaces / Errors tabs)
/plugin install <name>@<marketplace> Install a plugin from a configured marketplace
/plugin list [--enabled|--disabled] List all installed plugins
/plugin update [<name>] Update one or all installed plugins
/plugin marketplace add <source> Add a marketplace source (same formats as CLI above)
/plugin validate [<path>] Validate plugin or marketplace directory
/agents Open the agent management UI (Running + Library tabs)
/fork <directive> Spawn a fork subagent inheriting full conversation history
@agent-<name> Invoke a specific subagent for one task
@agent-<plugin>:<name> Invoke a scoped plugin subagent for one task

Environment Variables

Variable Description
CLAUDE_CODE_SUBAGENT_MODEL Override model for all subagents
CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS=1 Remove built-ins in non-interactive/SDK mode
CLAUDE_CODE_FORK_SUBAGENT=1 Enable fork mode (experimental; also forces all spawns background)
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1 Disable background task functionality
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE Apply to subagent auto-compaction

Subagent Transcript Storage

Subagent transcripts are stored at:

~/.claude/projects/{project}/{sessionId}/subagents/agent-{agentId}.jsonl

Cleanup period is controlled by the cleanupPeriodDays setting (default 30 days).