From ai-helpers
Claude Code extensibility and configuration reference: plugins, hooks, skills, subagents, MCP servers, output styles, memory, settings, and model configuration. Invoke whenever Claude Code itself is the subject — questions, configuration, building extensions, debugging, or understanding internals.
npx claudepluginhub xobotyi/cc-foundry --plugin ai-helpersThis skill uses the workspace's default tool permissions.
Authoritative reference for Claude Code extensibility and configuration. Use this skill when building, configuring, or
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
Authoritative reference for Claude Code extensibility and configuration. Use this skill when building, configuring, or debugging any Claude Code extension mechanism.
${CLAUDE_SKILL_DIR}/references/skills.md] Frontmatter fields, invocation control matrix, string
substitutions, dynamic context injection, subagent execution, nested discovery, sharing${CLAUDE_SKILL_DIR}/references/subagents.md] Built-in agents table, frontmatter fields, permission
modes, tool control, preloading skills, persistent memory, worktree isolation, CLI-defined agents, @-mention
invocation, --agent session mode, MCP scoping, effort/background fields, teams${CLAUDE_SKILL_DIR}/references/plugins.md] Plugin manifest schema, component paths,
CLAUDE_PLUGIN_DATA persistent directory, marketplace schema, official marketplace, LSP server configs, caching,
validation, CLI commands${CLAUDE_SKILL_DIR}/references/hooks.md] All 22 event details (input fields, output schemas, exit code
behavior), matcher patterns, hook types (command/http/prompt/agent), async hooks, decision control patterns, security${CLAUDE_SKILL_DIR}/references/mcp.md] Server installation (HTTP/SSE/stdio), scopes, OAuth
authentication, environment variable expansion, managed MCP config, tool search, plugin-provided servers${CLAUDE_SKILL_DIR}/references/memory.md] CLAUDE.md hierarchy and loading, @import syntax, auto memory
(storage, /memory command, settings), path-specific rules with globs, claudeMdExcludes, organization-level management${CLAUDE_SKILL_DIR}/references/model-config.md] Model aliases (including opus[1m]/sonnet[1m]),
effort levels (low/medium/high/max), extended context (1M), opusplan mode, availableModels/modelOverrides, custom
model option, third-party provider pinning, prompt caching env vars${CLAUDE_SKILL_DIR}/references/output-styles.md] Built-in styles, frontmatter fields,
keep-coding-instructions flag, comparison with CLAUDE.md/agents/skills${CLAUDE_SKILL_DIR}/references/settings.md] Scope hierarchy, permission rule syntax, sandbox config,
worktree settings, attribution settings, common settings table (50+ keys), hook configuration controls, file
suggestion settings, environment variables${CLAUDE_SKILL_DIR}/references/statusline.md] Configuration, JSON input schema with all fields,
ANSI colors, clickable links, caching, plugin delivery${CLAUDE_SKILL_DIR}/references/best-practices.md] Context management, verification patterns,
explore-plan-code workflow, CLAUDE.md authoring, session management, automation/scalingRead the relevant reference before making detailed changes. The rules below cover the decision framework; references provide field-level schemas and implementation details.
Plugin — Distributable package containing skills, agents, hooks, MCP servers, LSP servers, output styles, and
default settings. Has optional .claude-plugin/plugin.json manifest. Installed from marketplace or local path. Skills
namespaced as /plugin:skill. Two path variables: ${CLAUDE_PLUGIN_ROOT} (install dir, changes on update) and
${CLAUDE_PLUGIN_DATA} (persistent data dir, survives updates).
Hook — Deterministic automation triggered at 22 lifecycle events (tool use, session start/end, permission request, subagent lifecycle, teammate/task events, compaction, worktree, elicitation, instructions loading). Four types: command (shell), http (POST to URL), prompt (LLM decision), agent (multi-turn verification). Configured in settings, plugin, or skill/agent frontmatter.
MCP Server — External tool/resource provider via Model Context Protocol. Connects Claude to databases, APIs, services. Supports stdio, HTTP, SSE transports and OAuth authentication. Configured per-project, per-user, via plugin, or scoped to a specific subagent via inline definition.
Output Style — Persona/behavior modifier via system prompt changes. Affects how Claude responds without changing
capabilities. Built-in: Default, Explanatory, Learning. Custom styles exclude coding instructions unless
keep-coding-instructions: true.
CLAUDE.md — Project memory file providing persistent context about codebase, conventions, instructions. Hierarchy:
managed > user > project. Loaded automatically at session start. Supports @path imports (max depth 5). Modular rules
in .claude/rules/*.md with optional paths: frontmatter for file-scoped loading. Auto memory (MEMORY.md) stores
Claude's own learnings per project (first 200 lines loaded each session).
Subagent — Isolated context for delegated tasks. Built-in types: Explore (haiku, read-only), Plan (inherited model,
read-only), general-purpose (inherited model, all tools). Custom agents in .claude/agents/. Supports persistent
memory, worktree isolation, effort override, background execution, scoped MCP servers, and tool restrictions via tools
or disallowedTools. Invocable via delegation, @-mention, or --agent flag (session-wide). Subagents cannot spawn
other subagents. Agent teams coordinate multiple agents across separate sessions.
Settings — Configuration hierarchy controlling permissions, model, hooks, behavior, sandbox, plugins, and more. Scopes: managed > CLI args > local > project > user. Managed settings support server-managed, MDM/plist/registry, and file-based delivery.
Use these rules when deciding how to extend Claude Code. Each mechanism serves a different purpose; choosing wrong causes friction or failure.
Use CLAUDE.md for persistent project context that applies to every session: coding conventions, repo structure, build commands, team practices. It loads automatically — no invocation needed. Keep it concise; bloated CLAUDE.md causes instruction drift.
Use skills for reusable domain expertise or workflows that load on-demand. Skills load only when relevant, keeping context clean when not needed. Two content patterns:
context: fork), manual
invocation (disable-model-invocation: true).Use subagents for isolated delegated work with tool restrictions or when output is verbose and should not consume
main context. Custom agents in .claude/agents/ get their own system prompt, tool set, and permissions. Subagents
cannot spawn other subagents.
Use hooks for deterministic automation that must always happen — formatting after edits, blocking writes to protected paths, injecting context at session start. Unlike CLAUDE.md instructions (advisory), hooks are guaranteed to run.
Use MCP servers for connecting to external services: databases, APIs, issue trackers. MCP is the integration layer — use it when Claude needs tools or resources from outside the local environment.
Use output styles when you need to change how Claude communicates (tone, format, persona) without changing its capabilities. Styles modify the system prompt and are always active once selected.
Use plugins to package and distribute any combination of the above as a single installable unit.
When creating a skill, the content pattern determines frontmatter:
context: inline, disable-model-invocation: false. Trigger: auto
or manual.context: fork, disable-model-invocation: true. Trigger: manual
only.Reference content runs inline so Claude uses it alongside conversation context. Task content runs in a subagent — the skill content becomes the subagent's prompt, and it has no access to conversation history.
disable-model-invocation: true — user: yes, Claude: no. Neither description nor full skill loaded.user-invocable: false — user: no, Claude: yes. Description always loaded; full skill when invoked.user-invocable: false hides from / menu but does not block the Skill tool. To block programmatic invocation
entirely, use disable-model-invocation: true.
Skill descriptions have a character budget: 2% of context window (fallback 16,000 chars). Run /context to check for
excluded skills.
Explore agent (haiku)Plan agent (inherited model)general-purpose agent.claude/agents/context: fork + agent fieldclaude --agent <name> or agent setting in .claude/settings.jsonSkills with context: fork write the task in the skill and pick an agent type. Custom subagents get their own system
prompt and load skills as reference content. Use custom subagents when the agent needs a persistent identity, tool
restrictions, or persistent memory across sessions.
Invocation methods: automatic delegation (Claude decides), @-mention (guarantees specific agent), --agent flag
(session-wide). Restrict which agents can be spawned with Agent(type1, type2) in tools or deny with Agent(name) in
permissions.deny.
command — deterministic check (lint, validate, format). Timeout: 600s. Supports async: true for background.http — POST event JSON to a URL. Non-2xx = non-blocking error. Block via 2xx + JSON decision body. Supports
header env var interpolation with allowedEnvVars.prompt — LLM judgment on hook input data alone. Timeout: 30s. Returns {ok, reason} JSON.agent — LLM judgment that needs file inspection or commands. Timeout: 60s. Same response schema as prompt.Command hooks are the default. Use http hooks for external service integration. Use prompt hooks when the decision requires understanding intent (not just pattern matching). Use agent hooks when verification requires reading files or running commands. Not all events support all types — prompt/agent hooks are limited to 8 events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, Stop, SubagentStop, TaskCompleted).
All matching hooks run in parallel (identical handlers deduplicated). Exit code 2 blocks the operation (for blocking events).
~/.claude/settings.json.claude/settings.json.claude/settings.local.jsonPrecedence: managed > CLI args > local > project > user. Permission evaluation order: deny > ask > allow (first match wins).
~/.claude/skills/<name>/SKILL.md.claude/skills/<name>/SKILL.md<plugin>/skills/<name>/SKILL.mdplugin-name/
├── .claude-plugin/
│ └── plugin.json # Manifest (optional)
├── skills/
│ └── skill-name/
│ ├── SKILL.md
│ └── references/
├── agents/ # Custom subagents
├── hooks/
│ └── hooks.json
├── output-styles/
├── settings.json # Default settings (agent key only)
├── .mcp.json
├── .lsp.json
└── README.md
SessionStart — session begins/resumes. Cannot block. Command only.InstructionsLoaded — CLAUDE.md or rules file loaded into context. Cannot block. Command only.UserPromptSubmit — before prompt processing. Can block.PreToolUse — before tool executes. Can block. Supports updatedInput.PermissionRequest — permission dialog shown. Can block. Supports updatedPermissions.PostToolUse — after tool success. Cannot block (but decision: "block" feeds reason to Claude).PostToolUseFailure — after tool failure. Cannot block.Notification — notification sent. Cannot block. Command only.SubagentStart — subagent spawned. Cannot block. Command only.SubagentStop — subagent finishes. Can block.Stop — Claude finishes responding. Can block.StopFailure — turn ended due to API error. Cannot block. Output ignored. Command only.TeammateIdle — teammate going idle. Can block.TaskCompleted — task marked complete. Can block.ConfigChange — config file changes. Can block (except policy_settings).WorktreeCreate — worktree being created. Replaces default git behavior. Must print path. Command only.WorktreeRemove — worktree being removed. Cannot block. Command only.PreCompact — before compaction. Cannot block. Command only.PostCompact — after compaction completes. Cannot block. Command only.Elicitation — MCP server requests user input. Can block. Command only.ElicitationResult — after user responds to MCP elicitation. Can block. Command only.SessionEnd — session terminates. Cannot block. Command only. Timeout: 1.5s default.~/.claude/settings.json. Not shared..claude/settings.json. Shared via Git..claude/settings.local.json. Not shared.~/.claude/CLAUDE.md. Personal, all projects.~/.claude/rules/*.md. Personal, all projects../CLAUDE.md or .claude/CLAUDE.md. Team via VCS..claude/rules/*.md. Team via VCS. Supports paths: frontmatter for file-scoped loading.~/.claude/projects/<project>/memory/. Personal, per project. First 200 lines of MEMORY.md loaded
each session.More specific memory takes precedence. CLAUDE.md in parent directories loads automatically; child directories load on
demand when working in those paths. Use @path in CLAUDE.md to import files (max depth 5). Use claudeMdExcludes in
settings to skip irrelevant CLAUDE.md files in monorepos.
This skill provides the SDK reference (what exists, how it works). The engineering skills provide design guidance (how to build it well):
prompt-engineering — instruction design techniques for any AI artifactskill-engineering — SKILL.md design, description formulas, content architecturesubagent-engineering — agent prompt design, tool scoping, team coordinationoutput-style-engineering — persona definition, tone examples, behavioral rules