/acc:claude-code-knowledgefrom acc
Reference for Claude Code component formats, paths, and configuration. Useful when creating or auditing commands, agents, skills, hooks, memory, plugins, or settings.
Ships in acc. 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.
Read when SKILL.md points to them.
| Type | Path | Invocation | Context Cost |
|---|---|---|---|
| Command | .claude/commands/name.md | /name args | Loaded on invocation |
| Agent | .claude/agents/name.md | Task(subagent_type) | Loaded into subagent context |
| Skill | .claude/skills/name/SKILL.md | Auto or /name | Loaded by description match |
| Hook | .claude/settings.json | Automatic on event | Zero (shell script) |
| Rules | .claude/rules/*.md | Auto-loaded always | Always in system prompt |
| Memory | CLAUDE.md (various levels) | Auto-loaded always | Always in system prompt |
Path: .claude/commands/name.md
Invocation: /name or /name arguments
---
description: Required. What the command does.
allowed-tools: Optional. Restrict tools (comma-separated).
model: Optional. opus/sonnet/haiku — or alias from settings.
argument-hint: Optional. Hint shown in autocomplete.
---
Command instructions here.
Use $ARGUMENTS for full argument string.
Use $ARGUMENTS[0], $ARGUMENTS[1] for positional args.
Use $1, $2 as shorthand for $ARGUMENTS[N].
Use ${CLAUDE_SESSION_ID} for session identifier.
Key rules:
.claude/skills/name/SKILL.md with user-invocable: true.claude/commands/sub/name.md → /sub/nameSLASH_COMMAND_TOOL_CHAR_BUDGET (default 15000 chars)Path: .claude/agents/name.md
Invocation: Task tool with subagent_type="name"
---
name: agent-name # required, matches filename without .md
description: Required. When to use. "PROACTIVELY" for auto-invoke.
tools: Optional. All by default. Comma-separated.
disallowedTools: Optional. Denylist complement to tools.
model: Optional. opus | sonnet | haiku | inherit
permissionMode: Optional. default | plan | acceptEdits | auto | dontAsk | bypassPermissions | delegate
skills: Optional. Auto-load skills (comma-separated inline list).
hooks: Optional. Lifecycle hooks scoped to this agent.
memory: Optional. user | project | local — CLAUDE.md scope to load.
---
Agent system prompt here.
Permission modes:
default — ask user for each tool useacceptEdits — auto-allow file edits, ask for othersplan — read-only exploration, no writesdontAsk — run without asking, within sandboxdelegate — inherit parent permissionsbypassPermissions — skip all permission checks (dangerous)Built-in subagent types: Explore, Plan, general-purpose, Bash, statusline-setup, claude-code-guide
Execution: foreground (blocks) or background (run_in_background: true). Resume via agent ID.
Scope priority: CLI --agents flag > project .claude/agents/ > user ~/.claude/agents/ > plugin agents
Path: .claude/skills/name/SKILL.md
Invocation: /name (if user-invocable) or auto-loaded by agent/description match
---
name: skill-name # lowercase, hyphens, max 64 chars
description: Required. What and when. Max 1024 chars.
allowed-tools: Optional. Restrict tools.
model: Optional. Model override when skill is active.
context: Optional. "fork" for isolated subagent execution.
agent: Optional. Which subagent type to run in (Explore, Plan, etc).
hooks: Optional. Lifecycle hooks scoped to this skill.
disable-model-invocation: true # only user can invoke
user-invocable: false # only Claude can invoke
---
Skill instructions here.
Use $ARGUMENTS, $ARGUMENTS[N], $N for user input.
Use !`command` for dynamic context injection (shell output inserted).
Folder structure:
skill-name/
├── SKILL.md # required, max 500 lines
├── references/ # large content extracted here
├── scripts/ # executable code
└── assets/ # templates, resources
Invocation control matrix:
disable-model-invocation | user-invocable | Who can invoke |
|---|---|---|
| false (default) | true (default) | Both user and Claude |
| true | true | User only (via /name) |
| false | false | Claude only (auto-load) |
| true | false | Nobody (disabled) |
Path: .claude/settings.json (or agent/skill frontmatter hooks: field)
Verified against Claude Code 2.1.233 with claude plugin validate — an unknown event name is
rejected as hooks.<Name>: Invalid key in record, so this list is checked, not remembered.
| Group | Events (matcher support noted where applicable) |
|---|---|
| Tool execution | PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, PermissionRequest, PermissionDenied — all take a tool-name matcher |
| Turn lifecycle | UserPromptSubmit, UserPromptExpansion, Stop, StopFailure |
| Agents & tasks | SubagentStart, SubagentStop, TeammateIdle, TaskCreated, TaskCompleted |
| Session | SessionStart, SessionEnd, Setup |
| Context | PreCompact, PostCompact, Notification, MessageDisplay |
| Environment | FileChanged, CwdChanged, DirectoryAdded, ConfigChange, InstructionsLoaded, WorktreeCreate, WorktreeRemove |
| MCP | Elicitation, ElicitationResult |
Blocking is done with exit code 2 (exit 1 is a non-blocking error). PreToolUse may also
return JSON with permissionDecision: "deny". See references/hooks-reference.md for per-event
payloads and blocking semantics.
Never generate these — they do not exist. A hook registered under an invented name silently
never fires, and claude plugin validate rejects the plugin with Invalid key in record:
| Invented name | Use instead |
|---|---|
ToolError | PostToolUseFailure |
PreUserInput | UserPromptSubmit |
PostUserInput | Stop |
{"type": "command", "command": "./script.sh"}
{"type": "prompt", "prompt": "Check if output is safe"}
{"type": "agent", "agent": "validator-agent"}
| Code | Behavior |
|---|---|
| 0 | Allow (continue) |
| 2 | Block (deny tool use, PreToolUse only) |
| Other | Log warning, continue |
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{"type": "command", "command": "php -l $CLAUDE_FILE_PATH", "async": false}
]
}
]
}
}
Matcher patterns: exact name, | OR, regex. MCP tools: mcp__server__tool.
For comprehensive hooks reference see references/hooks-reference.md.
| Level | Location | Scope |
|---|---|---|
| Managed | System dirs (enterprise) | Organization-wide |
| User | ~/.claude/CLAUDE.md | All user projects |
| User rules | ~/.claude/rules/*.md | All user projects |
| Project | CLAUDE.md (project root) | This project |
| Project rules | .claude/rules/*.md | This project |
| Local | CLAUDE.local.md (project root, auto-gitignored) | This machine only |
| Nested | src/CLAUDE.md, tests/CLAUDE.md | Subdirectory context |
.claude/rules/*.md — modular rules, always loaded into system prompt.
Path-specific rules via paths frontmatter:
---
paths:
- src/Domain/**
- src/Application/**
---
These rules apply only when working with files matching the glob patterns above.
@path/to/file.md # relative to current file
@/absolute/path.md # absolute path
@~/user/path.md # home directory
Import recursion limit: 5 hops max.
/memory — view and edit memory files/init — generate initial CLAUDE.md from project analysisFor full reference see references/memory-and-rules.md.
Path: .claude-plugin/plugin.json (plugin root)
{
"name": "my-plugin",
"description": "What this plugin provides",
"version": "1.0.0",
"author": "Name",
"repository": "https://github.com/user/repo"
}
Plugin structure. Only the manifests live inside .claude-plugin/; every component directory
sits at the plugin root, next to it — not inside it:
my-plugin/ # plugin root
├── .claude-plugin/
│ ├── plugin.json # manifest (required)
│ └── marketplace.json # only when this repo is also a marketplace
├── commands/ # namespaced as /plugin:command
├── agents/ # available as subagent_type "plugin:agent"
├── skills/<name>/SKILL.md # namespaced as /plugin:skill
├── hooks/hooks.json # plugin-scoped hooks
├── .mcp.json # MCP servers (or an "mcpServers" key in plugin.json)
└── .lsp.json # LSP server config
Putting commands/ or skills/ inside .claude-plugin/ makes them invisible — the loader looks
for them at the plugin root.
Namespaced invocation: /plugin-name:skill-name
Installation sources: GitHub, Git URL, NPM, File path, Directory.
For full reference see references/plugins-reference.md.
{
"permissions": {
"allow": ["Read", "Glob", "Grep"],
"deny": ["Bash(rm *)"],
"ask": ["Write", "Edit"]
}
}
Specifier patterns:
| Pattern | Example | Matches |
|---|---|---|
Tool | Read | All Read calls |
Tool(literal) | Bash(npm test) | Exact command |
Tool(glob) | Read(src/**) | Gitignore-style glob |
Tool(domain:) | WebFetch(domain:api.example.com) | Domain filter |
mcp__server__tool | mcp__github__create_issue | MCP tool |
Task(agent) | Task(ddd-auditor) | Specific subagent |
Evaluation order: deny → ask → allow (deny wins over allow)
For full reference see references/settings-and-permissions.md.
Config: .mcp.json (project root) or in settings.json
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-name"],
"env": {"API_KEY": "..."}
}
}
}
Tool naming: mcp__servername__toolname
Scope hierarchy: project .mcp.json > user settings > plugin .mcp.json
Permission: enableAllProjectMcpServers, allowedMcpServers, deniedMcpServers in settings.
Hierarchy: managed > CLI args > local > project > user
| Level | Location |
|---|---|
| User | ~/.claude/settings.json |
| Project | .claude/settings.json |
| Local | .claude/settings.local.json (gitignored) |
| Managed | Enterprise system dirs |
Key settings areas: permissions, hooks, sandbox, MCP, model config, context management, attribution.
For full schema reference see references/settings-and-permissions.md.
When to use which component type:
| Goal | Best Component | Reason |
|---|---|---|
| Reusable saved prompt | Command | User invokes, low context cost |
| Complex analysis in isolation | Agent | Separate context window |
| Knowledge base / templates | Skill | Auto-loaded, shared across agents |
| Auto-trigger on events | Hook | Zero context cost, shell execution |
| Project-wide instructions | CLAUDE.md | Always in context |
| Path-specific rules | Rules (.claude/rules/) | Conditional loading |
| Distributable extension | Plugin | Namespaced, installable |
| External tool integration | MCP | Standardized protocol |
| Component | Context Budget Impact |
|---|---|
| CLAUDE.md + rules | Always loaded (~500 lines recommended max) |
| Skills (auto-loaded) | Loaded when description matches (~15K chars budget) |
| Skills (by agent) | Loaded into agent's context window |
| Agents | Separate context window (no parent cost) |
| Hooks (command type) | Zero context cost (shell execution) |
| Hooks (prompt/agent type) | Uses context for LLM evaluation |
| MCP tools | Tool descriptions always in context |
| Plugins | Components loaded per their type rules |
Run in parallel:
1. Task: researcher — study architecture
2. Task: security-scanner — check security
3. Task: performance-analyzer — check performance
Wait for all and combine results.
SKILL.md — brief instructions (max 500 lines)
references/ — details loaded when needed
scripts/ — execute without reading into context
1. researcher → studies the task
2. planner → creates plan based on research
3. implementer → implements the plan
4. reviewer → reviews implementation
coordinator (opus) → delegates via Task tool
├── auditor-1 (sonnet, parallel)
├── auditor-2 (sonnet, parallel)
└── generator (sonnet, sequential after audit)
Coordinator uses TaskCreate/TaskUpdate for progress tracking.
Package as .claude-plugin/ → publish to GitHub/NPM
Users install: enabledPlugins in settings
Skills namespaced: /plugin-name:skill-name
description is filled and specific.claude/commands/*.md$ARGUMENTS used if argument-hint definedmodel specified consciously (opus for complex, haiku for fast)name and description are filledname matches filename (without .md)tools are minimally necessarydisallowedTools used if most tools needed except fewmodel chosen consciouslypermissionMode appropriate for taskskills: is comma-separated inline list (not YAML array)TaskCreate, TaskUpdate in toolstask-progress-knowledge in skillsname is lowercase with hyphens, matches folder namedescription < 1024 characters, explains "when to use"SKILL.md < 500 linesreferences/context: fork if needs isolated execution.claude/skills/name/SKILL.mdmatcher is correct tool/agent name or patterncommand script exists and is executableasync: true only for non-blocking operationsCLAUDE.md < 500 lines (recommended).claude/rules/*.md for modular rulesCLAUDE.local.md in .gitignore@imports resolve (max 5 hops)paths frontmatter uses valid glob patternssettings.jsonsettings.local.json is gitignoredDetailed documentation for specific areas:
references/hooks-reference.md (opens in a new tab)references/memory-and-rules.md (opens in a new tab)references/plugins-reference.md (opens in a new tab)references/settings-and-permissions.md (opens in a new tab)references/skills-advanced.md (opens in a new tab)references/subagents-advanced.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin acc283 skills in this plugin
/access-control-knowledgeAccess Control knowledge base. Provides ACL, RBAC, ABAC, ReBAC models, multi-tenancy patterns, and PHP implementations (Symfony Voters, Laravel Gates) for security audits and generation./adr-knowledgeAction-Domain-Responder pattern knowledge base. Provides patterns, antipatterns, and PHP-specific guidelines for ADR (web-specific MVC alternative) audits./adr-templateGenerates Architecture Decision Records (ADR) for PHP projects. Creates structured decision documentation with context, decision, and consequences.Other plugins' skills for the same job