agentboot 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/persona-request.md +62 -0
- package/.github/ISSUE_TEMPLATE/quality-feedback.md +67 -0
- package/.github/workflows/cla.yml +25 -0
- package/.github/workflows/validate.yml +49 -0
- package/.idea/agentboot.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/CLA.md +98 -0
- package/CLAUDE.md +230 -0
- package/CONTRIBUTING.md +168 -0
- package/LICENSE +191 -0
- package/NOTICE +4 -0
- package/PERSONAS.md +156 -0
- package/README.md +172 -0
- package/agentboot.config.json +207 -0
- package/bin/agentboot.js +17 -0
- package/core/gotchas/README.md +35 -0
- package/core/instructions/baseline.instructions.md +133 -0
- package/core/instructions/security.instructions.md +186 -0
- package/core/personas/code-reviewer/SKILL.md +175 -0
- package/core/personas/code-reviewer/persona.config.json +11 -0
- package/core/personas/security-reviewer/SKILL.md +233 -0
- package/core/personas/security-reviewer/persona.config.json +11 -0
- package/core/personas/test-data-expert/SKILL.md +234 -0
- package/core/personas/test-data-expert/persona.config.json +10 -0
- package/core/personas/test-generator/SKILL.md +262 -0
- package/core/personas/test-generator/persona.config.json +10 -0
- package/core/traits/audit-trail.md +182 -0
- package/core/traits/confidence-signaling.md +172 -0
- package/core/traits/critical-thinking.md +129 -0
- package/core/traits/schema-awareness.md +132 -0
- package/core/traits/source-citation.md +174 -0
- package/core/traits/structured-output.md +199 -0
- package/docs/ci-cd-automation.md +548 -0
- package/docs/claude-code-reference/README.md +21 -0
- package/docs/claude-code-reference/agentboot-coverage.md +484 -0
- package/docs/claude-code-reference/feature-inventory.md +906 -0
- package/docs/cli-commands-audit.md +112 -0
- package/docs/cli-design.md +924 -0
- package/docs/concepts.md +1117 -0
- package/docs/config-schema-audit.md +121 -0
- package/docs/configuration.md +645 -0
- package/docs/delivery-methods.md +758 -0
- package/docs/developer-onboarding.md +342 -0
- package/docs/extending.md +448 -0
- package/docs/getting-started.md +298 -0
- package/docs/knowledge-layer.md +464 -0
- package/docs/marketplace.md +822 -0
- package/docs/org-connection.md +570 -0
- package/docs/plans/architecture.md +2429 -0
- package/docs/plans/design.md +2018 -0
- package/docs/plans/prd.md +1862 -0
- package/docs/plans/stack-rank.md +261 -0
- package/docs/plans/technical-spec.md +2755 -0
- package/docs/privacy-and-safety.md +807 -0
- package/docs/prompt-optimization.md +1071 -0
- package/docs/test-plan.md +972 -0
- package/docs/third-party-ecosystem.md +496 -0
- package/domains/compliance-template/README.md +173 -0
- package/domains/compliance-template/traits/compliance-aware.md +228 -0
- package/examples/enterprise/agentboot.config.json +184 -0
- package/examples/minimal/agentboot.config.json +46 -0
- package/package.json +63 -0
- package/repos.json +1 -0
- package/scripts/cli.ts +1069 -0
- package/scripts/compile.ts +1000 -0
- package/scripts/dev-sync.ts +149 -0
- package/scripts/lib/config.ts +137 -0
- package/scripts/lib/frontmatter.ts +61 -0
- package/scripts/sync.ts +687 -0
- package/scripts/validate.ts +421 -0
- package/tests/REGRESSION-PLAN.md +705 -0
- package/tests/TEST-PLAN.md +111 -0
- package/tests/cli.test.ts +705 -0
- package/tests/pipeline.test.ts +608 -0
- package/tests/validate.test.ts +278 -0
- package/tsconfig.json +62 -0
|
@@ -0,0 +1,906 @@
|
|
|
1
|
+
# Claude Code Feature Inventory
|
|
2
|
+
|
|
3
|
+
Complete reference of every Claude Code feature, configuration option, and capability.
|
|
4
|
+
Last verified: March 2026.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. CLAUDE.md System
|
|
9
|
+
|
|
10
|
+
### File Locations & Precedence (highest to lowest)
|
|
11
|
+
|
|
12
|
+
| Priority | Location | Scope | Shared | Excludable |
|
|
13
|
+
|----------|----------|-------|--------|------------|
|
|
14
|
+
| 1 | Managed policy paths (see below) | Organization | IT-deployed | No |
|
|
15
|
+
| 2 | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Project | Yes (git) | Yes |
|
|
16
|
+
| 3 | Parent directory CLAUDE.md files (walk up tree) | Ancestors | Varies | Yes |
|
|
17
|
+
| 4 | `~/.claude/CLAUDE.md` | User | No | Yes |
|
|
18
|
+
| 5 | Subdirectory CLAUDE.md files | Lazy-loaded | Varies | Yes |
|
|
19
|
+
|
|
20
|
+
Managed policy paths:
|
|
21
|
+
- macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`
|
|
22
|
+
- Linux/WSL: `/etc/claude-code/CLAUDE.md`
|
|
23
|
+
- Windows: `C:\Program Files\ClaudeCode\CLAUDE.md`
|
|
24
|
+
|
|
25
|
+
### @import Syntax
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
@path/to/file.md # Relative to importing file
|
|
29
|
+
@./docs/api.md # Explicit relative
|
|
30
|
+
@../shared/standards.md # Parent traversal
|
|
31
|
+
@~/preferences.md # Home directory
|
|
32
|
+
@/absolute/path/file.md # Absolute path
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Max recursion depth: **5 levels**
|
|
36
|
+
- First external import triggers approval dialog; can decline permanently
|
|
37
|
+
- Imported files expand inline at load time
|
|
38
|
+
- Relative paths resolve from the **importing file's location**, not cwd
|
|
39
|
+
|
|
40
|
+
### Behavioral Notes
|
|
41
|
+
|
|
42
|
+
- Target **under 200 lines** per file (longer = higher context cost, lower adherence)
|
|
43
|
+
- Specific, concrete instructions outperform vague goals
|
|
44
|
+
- Full CLAUDE.md content **survives compaction** — re-injected fresh after `/compact`
|
|
45
|
+
- Subdirectory CLAUDE.md files are **lazy-loaded** when Claude reads files in that directory
|
|
46
|
+
|
|
47
|
+
### claudeMdExcludes
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"claudeMdExcludes": [
|
|
52
|
+
"**/monorepo/CLAUDE.md",
|
|
53
|
+
"/home/user/monorepo/other-team/.claude/rules/**"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- Glob patterns matched against absolute file paths
|
|
59
|
+
- Configurable at any settings layer
|
|
60
|
+
- **Cannot exclude managed policy CLAUDE.md**
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. Settings System
|
|
65
|
+
|
|
66
|
+
### Configuration Scopes (highest to lowest precedence)
|
|
67
|
+
|
|
68
|
+
| Scope | Location | Shared | Override |
|
|
69
|
+
|-------|----------|--------|---------|
|
|
70
|
+
| Managed | System paths (see §1) | IT-deployed | Cannot be overridden |
|
|
71
|
+
| CLI flags | Session | No | Session only |
|
|
72
|
+
| Local project | `.claude/settings.local.json` | No (gitignored) | Per-machine |
|
|
73
|
+
| Shared project | `.claude/settings.json` | Yes (git) | Per-project |
|
|
74
|
+
| User | `~/.claude/settings.json` | No | All projects |
|
|
75
|
+
|
|
76
|
+
### Complete Settings Fields
|
|
77
|
+
|
|
78
|
+
```jsonc
|
|
79
|
+
{
|
|
80
|
+
// Model & behavior
|
|
81
|
+
"defaultModel": "sonnet|opus|haiku|inherit|<full-model-id>",
|
|
82
|
+
"model": "claude-opus-4-6",
|
|
83
|
+
"agent": "agent-name", // Set main agent for session
|
|
84
|
+
"effort": "low|medium|high|max",
|
|
85
|
+
"defaultMode": "default|acceptEdits|dontAsk|bypassPermissions|plan",
|
|
86
|
+
"skipDangerousModePermissionPrompt": true,
|
|
87
|
+
|
|
88
|
+
// Permissions
|
|
89
|
+
"permissions": {
|
|
90
|
+
"allow": ["Bash(npm run *)", "Read", "WebFetch(domain:example.com)"],
|
|
91
|
+
"ask": ["Edit"],
|
|
92
|
+
"deny": ["Bash(git push *)", "Agent(Explore)"]
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
// Memory
|
|
96
|
+
"autoMemoryEnabled": true,
|
|
97
|
+
"autoMemoryDirectory": "~/custom-memory-dir",
|
|
98
|
+
"claudeMdExcludes": ["pattern"],
|
|
99
|
+
|
|
100
|
+
// Environment
|
|
101
|
+
"env": {
|
|
102
|
+
"DEBUG": "true",
|
|
103
|
+
"NODE_ENV": "development"
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
// Working directories
|
|
107
|
+
"additionalDirectories": ["../shared", "/absolute/path"],
|
|
108
|
+
|
|
109
|
+
// Hooks
|
|
110
|
+
"disableAllHooks": false,
|
|
111
|
+
"hooks": { /* see §6 */ },
|
|
112
|
+
|
|
113
|
+
// Plugins
|
|
114
|
+
"enabledPlugins": ["plugin-name"],
|
|
115
|
+
"extraKnownMarketplaces": ["https://github.com/user/marketplace"],
|
|
116
|
+
"strictKnownMarketplaces": false,
|
|
117
|
+
|
|
118
|
+
// File suggestions
|
|
119
|
+
"autoIncludeFilesInPrompts": true,
|
|
120
|
+
|
|
121
|
+
// Sandboxing
|
|
122
|
+
"sandbox": {
|
|
123
|
+
"enabled": false,
|
|
124
|
+
"mode": "strict|moderate|permissive",
|
|
125
|
+
"readPaths": ["/tmp", "~/.ssh/**"],
|
|
126
|
+
"writePaths": ["/tmp"],
|
|
127
|
+
"allowedDomains": ["example.com", "*.trusted.com"]
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
// Attribution
|
|
131
|
+
"contributionAttribution": {
|
|
132
|
+
"userEmail": "user@example.com"
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
// Managed-only settings
|
|
136
|
+
"disableBypassPermissionsMode": "disable",
|
|
137
|
+
"allowManagedPermissionRulesOnly": false,
|
|
138
|
+
"allowManagedHooksOnly": false,
|
|
139
|
+
"allowManagedMcpServersOnly": false,
|
|
140
|
+
"blockedMarketplaces": ["untrusted-source"],
|
|
141
|
+
"allow_remote_sessions": true,
|
|
142
|
+
"forceLoginMethod": "oauth|sso|email",
|
|
143
|
+
"forceLoginOrgUUID": "uuid-here"
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Permission Rule Syntax
|
|
148
|
+
|
|
149
|
+
**Bash:**
|
|
150
|
+
- Exact: `Bash(npm run build)`
|
|
151
|
+
- Wildcards: `Bash(npm run *)`, `Bash(git * main)`
|
|
152
|
+
- Space before `*` enforces word boundary: `Bash(ls *)` matches `ls -la` but not `lsof`
|
|
153
|
+
- Shell operator aware: `Bash(safe *)` won't allow `safe && dangerous`
|
|
154
|
+
|
|
155
|
+
**Read/Edit path patterns:**
|
|
156
|
+
- Project-relative: `Edit(/src/**/*.ts)` → `<project>/src/**/*.ts`
|
|
157
|
+
- Home: `Read(~/.zshrc)`
|
|
158
|
+
- Absolute: `Edit(//tmp/file.txt)` → `/tmp/file.txt`
|
|
159
|
+
- CWD-relative: `Read(src/*.js)` or `Read(./src/*.js)`
|
|
160
|
+
- Gitignore glob patterns: `*` (single dir), `**` (recursive)
|
|
161
|
+
|
|
162
|
+
**Other tools:**
|
|
163
|
+
- WebFetch: `WebFetch(domain:example.com)`
|
|
164
|
+
- MCP: `mcp__server-name`, `mcp__server__tool-name`, `mcp__server__.*`
|
|
165
|
+
- Agent: `Agent(Explore)`, `Agent(my-agent)`
|
|
166
|
+
- Skill: `Skill(name)`, `Skill(name *)`
|
|
167
|
+
|
|
168
|
+
**Evaluation order:** deny → ask → allow (first match wins). Deny always takes precedence.
|
|
169
|
+
|
|
170
|
+
### Permission Modes
|
|
171
|
+
|
|
172
|
+
| Mode | Behavior |
|
|
173
|
+
|------|----------|
|
|
174
|
+
| `default` | Standard prompts for each action |
|
|
175
|
+
| `acceptEdits` | Auto-accept file edits for session |
|
|
176
|
+
| `dontAsk` | Auto-deny unless pre-approved in allow list |
|
|
177
|
+
| `plan` | Read-only — no file edits or commands |
|
|
178
|
+
| `bypassPermissions` | Skip prompts (except `.git`, `.claude`, `.vscode`, `.idea`) |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 3. Agent System
|
|
183
|
+
|
|
184
|
+
### File Format: `.claude/agents/{name}/CLAUDE.md`
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
---
|
|
188
|
+
name: agent-id # Required (lowercase, hyphens, max 64 chars)
|
|
189
|
+
description: When to delegate to this agent # Required
|
|
190
|
+
tools: Read, Grep, Glob, Bash # Optional: tool allowlist
|
|
191
|
+
disallowedTools: Write, Edit, Agent # Optional: tool denylist
|
|
192
|
+
model: sonnet|opus|haiku|inherit|<id> # Optional (default: inherit)
|
|
193
|
+
permissionMode: default|acceptEdits|... # Optional
|
|
194
|
+
maxTurns: 50 # Optional: agentic turn limit
|
|
195
|
+
skills: # Optional: preload skill content
|
|
196
|
+
- skill-name
|
|
197
|
+
mcpServers: # Optional: scoped MCP servers
|
|
198
|
+
server-name:
|
|
199
|
+
type: stdio
|
|
200
|
+
command: npx
|
|
201
|
+
args: ["-y", "package"]
|
|
202
|
+
existing-server: {} # Reference existing by name
|
|
203
|
+
hooks: # Optional: agent-specific hooks
|
|
204
|
+
PreToolUse:
|
|
205
|
+
- matcher: "Bash"
|
|
206
|
+
hooks:
|
|
207
|
+
- type: command
|
|
208
|
+
command: "./scripts/validate.sh"
|
|
209
|
+
memory: user|project|local # Optional: persistent memory scope
|
|
210
|
+
background: true|false # Optional: run as background task
|
|
211
|
+
isolation: worktree # Optional: git worktree isolation
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
Agent system prompt in markdown.
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Storage Locations (priority order)
|
|
218
|
+
|
|
219
|
+
1. `--agents` CLI flag (session only, JSON)
|
|
220
|
+
2. `.claude/agents/{name}/CLAUDE.md` (project, committed)
|
|
221
|
+
3. `~/.claude/agents/{name}/CLAUDE.md` (user, all projects)
|
|
222
|
+
4. Plugin's `agents/` directory
|
|
223
|
+
|
|
224
|
+
### Built-in Agents
|
|
225
|
+
|
|
226
|
+
| Agent | Purpose | Default Tools |
|
|
227
|
+
|-------|---------|---------------|
|
|
228
|
+
| `Explore` | Fast codebase exploration | Read, Glob, Grep, Bash, LSP |
|
|
229
|
+
| `Plan` | Architecture and planning | Read, Glob, Grep, Bash, LSP, WebFetch, WebSearch |
|
|
230
|
+
| `general-purpose` | Multi-step tasks | All tools except Agent |
|
|
231
|
+
| `Bash` | Shell command execution | Bash only |
|
|
232
|
+
| `statusline-setup` | Status line config | Read, Edit |
|
|
233
|
+
| `Claude Code Guide` | CC documentation Q&A | Glob, Grep, Read, WebFetch, WebSearch |
|
|
234
|
+
|
|
235
|
+
### Invocation Methods
|
|
236
|
+
|
|
237
|
+
1. **Automatic delegation** — Claude matches task to agent `description`
|
|
238
|
+
2. **@-mention** — `@"agent-name (agent)"` guarantees delegation
|
|
239
|
+
3. **CLI flag** — `claude --agent agent-name`
|
|
240
|
+
4. **Settings** — `"agent": "agent-name"` in settings.json
|
|
241
|
+
5. **Natural language** — name the agent; Claude may delegate
|
|
242
|
+
|
|
243
|
+
### Context Behavior
|
|
244
|
+
|
|
245
|
+
- Each invocation creates **fresh context** (unless resumed via SendMessage)
|
|
246
|
+
- CLAUDE.md files still load in subagent context
|
|
247
|
+
- Preloaded skills injected at startup
|
|
248
|
+
- Subagents **cannot spawn other subagents** (no nesting)
|
|
249
|
+
- Main conversation compaction doesn't affect subagent transcripts
|
|
250
|
+
- Subagent transcripts: `~/.claude/projects/{project}/{sessionId}/subagents/agent-{agentId}.jsonl`
|
|
251
|
+
|
|
252
|
+
### Memory Scope
|
|
253
|
+
|
|
254
|
+
| Scope | Directory | Shared |
|
|
255
|
+
|-------|-----------|--------|
|
|
256
|
+
| `user` | `~/.claude/agent-memory/{name}/` | No (cross-project) |
|
|
257
|
+
| `project` | `.claude/agent-memory/{name}/` | Yes (git) |
|
|
258
|
+
| `local` | `.claude/agent-memory-local/{name}/` | No (gitignored) |
|
|
259
|
+
|
|
260
|
+
First 200 lines of agent's `MEMORY.md` loaded at startup. Read/Write/Edit tools auto-enabled when memory is set.
|
|
261
|
+
|
|
262
|
+
### Background Agents
|
|
263
|
+
|
|
264
|
+
- Set `background: true` in frontmatter or press `Ctrl+B` while running
|
|
265
|
+
- Prompt for permissions upfront; auto-deny unlisted tools
|
|
266
|
+
- Run concurrently with main session
|
|
267
|
+
- `AskUserQuestion` calls fail silently; agent continues
|
|
268
|
+
|
|
269
|
+
### Worktree Isolation
|
|
270
|
+
|
|
271
|
+
- Set `isolation: worktree` in frontmatter
|
|
272
|
+
- Agent gets isolated copy of repo (git worktree)
|
|
273
|
+
- Auto-cleaned if agent makes no changes
|
|
274
|
+
- If changes made, worktree path and branch returned
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## 4. Skills System
|
|
279
|
+
|
|
280
|
+
### File Format: `.claude/skills/{name}/SKILL.md`
|
|
281
|
+
|
|
282
|
+
```yaml
|
|
283
|
+
---
|
|
284
|
+
name: skill-name # Optional (defaults to directory name)
|
|
285
|
+
description: When to use this skill # Recommended (auto-invoke trigger)
|
|
286
|
+
argument-hint: "[version] [environment]" # Optional: CLI autocomplete hint
|
|
287
|
+
disable-model-invocation: false # Optional: user-only trigger
|
|
288
|
+
user-invocable: true # Optional: hide from / menu
|
|
289
|
+
allowed-tools: Read, Grep, Bash # Optional: tool allowlist
|
|
290
|
+
model: sonnet|opus|haiku|inherit # Optional: override model
|
|
291
|
+
context: fork # Optional: run in isolated subagent
|
|
292
|
+
agent: Explore|Plan|general-purpose|{name} # Optional: subagent type (requires context: fork)
|
|
293
|
+
hooks: # Optional: skill-specific hooks
|
|
294
|
+
PreToolUse:
|
|
295
|
+
- matcher: "Bash"
|
|
296
|
+
hooks: [...]
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
Skill instructions.
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### String Substitutions
|
|
303
|
+
|
|
304
|
+
| Placeholder | Expands To |
|
|
305
|
+
|-------------|-----------|
|
|
306
|
+
| `$ARGUMENTS` | All arguments passed to skill |
|
|
307
|
+
| `$ARGUMENTS[N]` or `$N` | Specific argument by index (0-based) |
|
|
308
|
+
| `${CLAUDE_SESSION_ID}` | Current session ID |
|
|
309
|
+
| `${CLAUDE_SKILL_DIR}` | Directory containing SKILL.md |
|
|
310
|
+
|
|
311
|
+
### Dynamic Context Injection
|
|
312
|
+
|
|
313
|
+
Syntax: `` !`command` `` (backticks around shell command)
|
|
314
|
+
|
|
315
|
+
- Executed **before** Claude sees skill content
|
|
316
|
+
- Output replaces the placeholder inline
|
|
317
|
+
- Claude sees the result, not the command
|
|
318
|
+
- Example: `` !`gh pr diff` `` fetches live PR data at invocation time
|
|
319
|
+
|
|
320
|
+
### Supporting Files
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
.claude/skills/my-skill/
|
|
324
|
+
├── SKILL.md # Required
|
|
325
|
+
├── reference.md # Optional: detailed docs (on-demand)
|
|
326
|
+
├── examples.md # Optional: usage examples
|
|
327
|
+
└── scripts/
|
|
328
|
+
└── helper.py # Optional: executable scripts
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Storage Locations
|
|
332
|
+
|
|
333
|
+
1. Enterprise: Managed settings (all users)
|
|
334
|
+
2. Personal: `~/.claude/skills/{name}/SKILL.md`
|
|
335
|
+
3. Project: `.claude/skills/{name}/SKILL.md`
|
|
336
|
+
4. Plugin: `{plugin}/skills/{name}/SKILL.md`
|
|
337
|
+
|
|
338
|
+
### Invocation Control
|
|
339
|
+
|
|
340
|
+
| Config | User can `/invoke` | Claude auto-invokes |
|
|
341
|
+
|--------|-------------------|-------------------|
|
|
342
|
+
| Default | Yes | Yes (via description match) |
|
|
343
|
+
| `disable-model-invocation: true` | Yes | No |
|
|
344
|
+
| `user-invocable: false` | No | Yes |
|
|
345
|
+
|
|
346
|
+
### Bundled Skills
|
|
347
|
+
|
|
348
|
+
| Skill | Trigger |
|
|
349
|
+
|-------|---------|
|
|
350
|
+
| `/batch <instruction>` | Large-scale parallel changes (5-30 worktrees) |
|
|
351
|
+
| `/claude-api` | Auto-triggered with anthropic/SDK imports |
|
|
352
|
+
| `/debug [description]` | Troubleshoot via debug log |
|
|
353
|
+
| `/loop [interval] <prompt>` | Recurring prompts |
|
|
354
|
+
| `/simplify [focus]` | Review changes with 3 parallel agents |
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## 5. Rules System
|
|
359
|
+
|
|
360
|
+
### File Format: `.claude/rules/{topic}.md`
|
|
361
|
+
|
|
362
|
+
```yaml
|
|
363
|
+
---
|
|
364
|
+
paths: # Optional glob patterns
|
|
365
|
+
- "src/api/**/*.ts"
|
|
366
|
+
- "src/**/*.{ts,tsx}"
|
|
367
|
+
- "*.md"
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
Rule content in markdown.
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Behavior
|
|
374
|
+
|
|
375
|
+
- Rules **without** `paths:` — loaded at session start (always active)
|
|
376
|
+
- Rules **with** `paths:` — loaded on-demand when Claude reads matching files
|
|
377
|
+
- Supports brace expansion: `*.{ts,tsx,js}`
|
|
378
|
+
- Supports `**` recursive glob
|
|
379
|
+
|
|
380
|
+
### Storage & Priority
|
|
381
|
+
|
|
382
|
+
| Location | Scope | Priority |
|
|
383
|
+
|----------|-------|----------|
|
|
384
|
+
| `.claude/rules/` | Project | Higher |
|
|
385
|
+
| `~/.claude/rules/` | User (all projects) | Lower |
|
|
386
|
+
|
|
387
|
+
- Symlinks supported for sharing rules across projects
|
|
388
|
+
- Subdirectory `.claude/rules/` auto-discovered recursively
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## 6. Hooks System (25 Events)
|
|
393
|
+
|
|
394
|
+
### All Hook Events
|
|
395
|
+
|
|
396
|
+
| Event | Matcher | Fires When | Exit 2 Blocks |
|
|
397
|
+
|-------|---------|------------|---------------|
|
|
398
|
+
| `SessionStart` | startup, resume, clear, compact | Session begins/resumes | No |
|
|
399
|
+
| `SessionEnd` | clear, logout, prompt_input_exit, bypass_permissions_disabled, other | Session terminates | No |
|
|
400
|
+
| `InstructionsLoaded` | session_start, nested_traversal, path_glob_match, include, compact | CLAUDE.md/rules loaded | No |
|
|
401
|
+
| `UserPromptSubmit` | (none) | Before processing user prompt | **Yes** |
|
|
402
|
+
| `PreToolUse` | Tool name | Before tool execution | **Yes** |
|
|
403
|
+
| `PostToolUse` | Tool name | After tool succeeds | No |
|
|
404
|
+
| `PostToolUseFailure` | Tool name | After tool fails | No |
|
|
405
|
+
| `PermissionRequest` | Tool name | Permission dialog appears | **Yes** |
|
|
406
|
+
| `Stop` | (none) | Claude finishes response | **Yes** |
|
|
407
|
+
| `StopFailure` | rate_limit, authentication_failed, billing_error, invalid_request, server_error, max_output_tokens, unknown | Turn ends with API error | No |
|
|
408
|
+
| `SubagentStart` | Agent type name | Subagent spawned | No |
|
|
409
|
+
| `SubagentStop` | Agent type name | Subagent finishes | **Yes** |
|
|
410
|
+
| `Notification` | permission_prompt, idle_prompt, auth_success, elicitation_dialog | Notification sent | No |
|
|
411
|
+
| `TeammateIdle` | (none) | Agent team teammate idle | No |
|
|
412
|
+
| `TaskCompleted` | (none) | Task marked complete | No |
|
|
413
|
+
| `ConfigChange` | user_settings, project_settings, local_settings, policy_settings, skills | Config file changes | **Yes** |
|
|
414
|
+
| `PreCompact` | manual, auto | Before context compaction | No |
|
|
415
|
+
| `PostCompact` | manual, auto | After compaction completes | No |
|
|
416
|
+
| `WorktreeCreate` | (none) | Worktree creation initiated | **Yes** |
|
|
417
|
+
| `WorktreeRemove` | (none) | Worktree removal | No |
|
|
418
|
+
| `Elicitation` | MCP server name | MCP requests user input | **Yes** |
|
|
419
|
+
| `ElicitationResult` | MCP server name | User responds to elicitation | **Yes** |
|
|
420
|
+
|
|
421
|
+
### Hook Types
|
|
422
|
+
|
|
423
|
+
**Command hook:**
|
|
424
|
+
```json
|
|
425
|
+
{
|
|
426
|
+
"type": "command",
|
|
427
|
+
"command": "script.sh",
|
|
428
|
+
"timeout": 600,
|
|
429
|
+
"async": false,
|
|
430
|
+
"statusMessage": "Running validation..."
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**HTTP hook:**
|
|
435
|
+
```json
|
|
436
|
+
{
|
|
437
|
+
"type": "http",
|
|
438
|
+
"url": "http://localhost:8080/hooks",
|
|
439
|
+
"headers": {"Authorization": "Bearer $TOKEN"},
|
|
440
|
+
"allowedEnvVars": ["TOKEN"],
|
|
441
|
+
"timeout": 30
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
**Prompt hook (LLM evaluation):**
|
|
446
|
+
```json
|
|
447
|
+
{
|
|
448
|
+
"type": "prompt",
|
|
449
|
+
"prompt": "Evaluate whether this is safe: $ARGUMENTS",
|
|
450
|
+
"model": "haiku",
|
|
451
|
+
"timeout": 30
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Agent hook (subagent with tools):**
|
|
456
|
+
```json
|
|
457
|
+
{
|
|
458
|
+
"type": "agent",
|
|
459
|
+
"prompt": "Analyze: $ARGUMENTS",
|
|
460
|
+
"model": "inherit",
|
|
461
|
+
"timeout": 60
|
|
462
|
+
}
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Hook Input (stdin JSON)
|
|
466
|
+
|
|
467
|
+
```json
|
|
468
|
+
{
|
|
469
|
+
"session_id": "uuid",
|
|
470
|
+
"transcript_path": "/path/to/transcript.jsonl",
|
|
471
|
+
"cwd": "/current/directory",
|
|
472
|
+
"permission_mode": "default",
|
|
473
|
+
"hook_event_name": "PreToolUse",
|
|
474
|
+
"agent_id": "subagent-id",
|
|
475
|
+
"agent_type": "agent-name"
|
|
476
|
+
}
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
Additional fields vary by event (tool_name, tool_input for PreToolUse; response for Stop; etc.).
|
|
480
|
+
|
|
481
|
+
### Hook Output (stdout JSON)
|
|
482
|
+
|
|
483
|
+
```json
|
|
484
|
+
{
|
|
485
|
+
"continue": true,
|
|
486
|
+
"stopReason": "message if continue=false",
|
|
487
|
+
"suppressOutput": false,
|
|
488
|
+
"systemMessage": "injected warning",
|
|
489
|
+
"decision": "block|allow|deny|ask",
|
|
490
|
+
"reason": "explanation",
|
|
491
|
+
"hookSpecificOutput": { }
|
|
492
|
+
}
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### Exit Codes
|
|
496
|
+
|
|
497
|
+
| Code | Meaning |
|
|
498
|
+
|------|---------|
|
|
499
|
+
| 0 | Success — process JSON output |
|
|
500
|
+
| 2 | Block action — show stderr to user |
|
|
501
|
+
| Other | Non-blocking error — show in verbose mode |
|
|
502
|
+
|
|
503
|
+
### Matcher Patterns for MCP Tools
|
|
504
|
+
|
|
505
|
+
- `mcp__<server>__<tool>` — exact match
|
|
506
|
+
- `mcp__memory__.*` — all tools from memory server
|
|
507
|
+
- `mcp__.*__write.*` — write operations from any server
|
|
508
|
+
|
|
509
|
+
### Configuration Locations
|
|
510
|
+
|
|
511
|
+
- `~/.claude/settings.json` (user)
|
|
512
|
+
- `.claude/settings.json` (project, shared)
|
|
513
|
+
- `.claude/settings.local.json` (project, local)
|
|
514
|
+
- Managed policy settings
|
|
515
|
+
- Plugin `hooks/hooks.json`
|
|
516
|
+
- Agent/Skill frontmatter `hooks:` field
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
## 7. MCP System
|
|
521
|
+
|
|
522
|
+
### Configuration: `.mcp.json`
|
|
523
|
+
|
|
524
|
+
```json
|
|
525
|
+
{
|
|
526
|
+
"mcpServers": {
|
|
527
|
+
"server-name": {
|
|
528
|
+
"type": "http|sse|stdio|ws",
|
|
529
|
+
"url": "https://example.com/mcp",
|
|
530
|
+
"command": "/path/to/server",
|
|
531
|
+
"args": ["--arg1", "value"],
|
|
532
|
+
"env": {"KEY": "${ENV_VAR:-default}"},
|
|
533
|
+
"headers": {"Authorization": "Bearer ${TOKEN}"},
|
|
534
|
+
"oauth": {
|
|
535
|
+
"clientId": "id",
|
|
536
|
+
"clientSecret": "secret",
|
|
537
|
+
"callbackPort": 8080,
|
|
538
|
+
"authServerMetadataUrl": "https://auth.example.com/.well-known"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Transport Types
|
|
546
|
+
|
|
547
|
+
| Type | Use Case |
|
|
548
|
+
|------|----------|
|
|
549
|
+
| `http` | Remote HTTP server (recommended) |
|
|
550
|
+
| `stdio` | Local process (npx, python, etc.) |
|
|
551
|
+
| `ws` | WebSocket |
|
|
552
|
+
| `sse` | Server-Sent Events (deprecated) |
|
|
553
|
+
|
|
554
|
+
### Installation Scopes
|
|
555
|
+
|
|
556
|
+
| Scope | Location | CLI Flag |
|
|
557
|
+
|-------|----------|----------|
|
|
558
|
+
| Local (default) | `~/.claude.json` | `--scope local` |
|
|
559
|
+
| Project | `.mcp.json` | `--scope project` |
|
|
560
|
+
| User | `~/.claude.json` | `--scope user` |
|
|
561
|
+
| Managed | System paths | IT-deployed |
|
|
562
|
+
|
|
563
|
+
### CLI Commands
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
claude mcp add --transport http name https://url
|
|
567
|
+
claude mcp add --transport stdio name -- npx package
|
|
568
|
+
claude mcp add-json name '{"type":"http","url":"..."}'
|
|
569
|
+
claude mcp add-from-claude-desktop
|
|
570
|
+
claude mcp list
|
|
571
|
+
claude mcp get name
|
|
572
|
+
claude mcp remove name
|
|
573
|
+
claude mcp reset-project-choices
|
|
574
|
+
claude mcp serve # Claude as MCP server
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
### Managed MCP
|
|
578
|
+
|
|
579
|
+
**Option 1: Exclusive control** — `managed-mcp.json` at system paths. Users cannot add/modify.
|
|
580
|
+
|
|
581
|
+
**Option 2: Policy-based allowlist/denylist:**
|
|
582
|
+
```json
|
|
583
|
+
{
|
|
584
|
+
"allowedMcpServers": [
|
|
585
|
+
{ "serverName": "github" },
|
|
586
|
+
{ "serverCommand": ["npx", "-y", "package"] },
|
|
587
|
+
{ "serverUrl": "https://mcp.company.com/*" }
|
|
588
|
+
],
|
|
589
|
+
"deniedMcpServers": [
|
|
590
|
+
{ "serverName": "untrusted" }
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
```
|
|
594
|
+
Denylist takes precedence. `managed-mcp.json` overrides both.
|
|
595
|
+
|
|
596
|
+
### MCP Resources
|
|
597
|
+
|
|
598
|
+
- Reference: `@server:protocol://path`
|
|
599
|
+
- Auto-fetched as attachments
|
|
600
|
+
- Fuzzy-searchable in `@` autocomplete
|
|
601
|
+
- Example: `@github:issue://123`
|
|
602
|
+
|
|
603
|
+
### MCP Prompts as Commands
|
|
604
|
+
|
|
605
|
+
- Format: `/mcp__servername__promptname`
|
|
606
|
+
- Discoverable via `/` menu
|
|
607
|
+
- Arguments space-separated
|
|
608
|
+
|
|
609
|
+
### MCP Output Limits
|
|
610
|
+
|
|
611
|
+
- Warning threshold: 10,000 tokens
|
|
612
|
+
- Default max: 25,000 tokens
|
|
613
|
+
- Override: `MAX_MCP_OUTPUT_TOKENS=50000 claude`
|
|
614
|
+
|
|
615
|
+
### Tool Search (Deferred Discovery)
|
|
616
|
+
|
|
617
|
+
- Auto-enabled when tool descriptions exceed 10% of context
|
|
618
|
+
- `ENABLE_TOOL_SEARCH=auto:5` (custom threshold percentage)
|
|
619
|
+
- `ENABLE_TOOL_SEARCH=false` to disable
|
|
620
|
+
|
|
621
|
+
---
|
|
622
|
+
|
|
623
|
+
## 8. Memory System
|
|
624
|
+
|
|
625
|
+
### Directory Structure
|
|
626
|
+
|
|
627
|
+
```
|
|
628
|
+
~/.claude/projects/<project>/memory/
|
|
629
|
+
├── MEMORY.md # Index — first 200 lines loaded at session start
|
|
630
|
+
├── topic-a.md # Topic files — loaded on-demand
|
|
631
|
+
└── topic-b.md
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
- `<project>` derived from git repo name
|
|
635
|
+
- All worktrees in same repo share one memory directory
|
|
636
|
+
- Machine-local (not synced)
|
|
637
|
+
|
|
638
|
+
### Settings
|
|
639
|
+
|
|
640
|
+
| Setting | Type | Default | Scope |
|
|
641
|
+
|---------|------|---------|-------|
|
|
642
|
+
| `autoMemoryEnabled` | boolean | true | Any |
|
|
643
|
+
| `autoMemoryDirectory` | string | (auto) | User/local/managed only |
|
|
644
|
+
| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | env var | unset | Session |
|
|
645
|
+
|
|
646
|
+
---
|
|
647
|
+
|
|
648
|
+
## 9. CLI Features
|
|
649
|
+
|
|
650
|
+
### Key Flags
|
|
651
|
+
|
|
652
|
+
```bash
|
|
653
|
+
# Session
|
|
654
|
+
claude # Interactive mode
|
|
655
|
+
claude "prompt" # Start with prompt
|
|
656
|
+
claude -p "prompt" # Print mode (non-interactive)
|
|
657
|
+
claude -c # Continue last session
|
|
658
|
+
claude -r "session-id|name" # Resume specific session
|
|
659
|
+
claude --resume id --fork-session # Fork from existing session
|
|
660
|
+
|
|
661
|
+
# Model & effort
|
|
662
|
+
claude --model opus|sonnet|haiku
|
|
663
|
+
claude --effort low|medium|high|max
|
|
664
|
+
claude --fallback-model sonnet # Print mode only
|
|
665
|
+
|
|
666
|
+
# Permissions
|
|
667
|
+
claude --permission-mode default|acceptEdits|plan|dontAsk|bypassPermissions
|
|
668
|
+
claude --tools "Bash,Edit,Read"
|
|
669
|
+
claude --allowedTools "Bash(npm *)"
|
|
670
|
+
claude --disallowedTools "Bash(git push *)"
|
|
671
|
+
|
|
672
|
+
# System prompt
|
|
673
|
+
claude --system-prompt "text"
|
|
674
|
+
claude --system-prompt-file ./file.txt
|
|
675
|
+
claude --append-system-prompt "extra"
|
|
676
|
+
claude --append-system-prompt-file ./extra.txt
|
|
677
|
+
|
|
678
|
+
# Agents
|
|
679
|
+
claude --agent agent-name
|
|
680
|
+
claude --agents '{"name": {...}}'
|
|
681
|
+
|
|
682
|
+
# Worktrees
|
|
683
|
+
claude --worktree feature-name
|
|
684
|
+
claude -w feature-name
|
|
685
|
+
|
|
686
|
+
# Working dirs
|
|
687
|
+
claude --add-dir ../lib ../apps
|
|
688
|
+
|
|
689
|
+
# MCP
|
|
690
|
+
claude --mcp-config ./mcp.json
|
|
691
|
+
claude --strict-mcp-config
|
|
692
|
+
claude --chrome / --no-chrome
|
|
693
|
+
|
|
694
|
+
# Output (print mode)
|
|
695
|
+
claude --output-format text|json|stream-json
|
|
696
|
+
claude --input-format text|stream-json
|
|
697
|
+
claude --json-schema '{...}'
|
|
698
|
+
claude --max-turns 3
|
|
699
|
+
claude --max-budget-usd 5.00
|
|
700
|
+
claude --no-session-persistence
|
|
701
|
+
|
|
702
|
+
# Advanced
|
|
703
|
+
claude --debug "api,hooks"
|
|
704
|
+
claude --verbose
|
|
705
|
+
claude --betas interleaved-thinking
|
|
706
|
+
claude --init / --init-only / --maintenance
|
|
707
|
+
claude --from-pr 123
|
|
708
|
+
claude --remote "task"
|
|
709
|
+
claude --teleport
|
|
710
|
+
claude --name "session-name"
|
|
711
|
+
claude --session-id "uuid"
|
|
712
|
+
claude --ide
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
---
|
|
716
|
+
|
|
717
|
+
## 10. Built-in Tools (35)
|
|
718
|
+
|
|
719
|
+
| Tool | Permission | Purpose |
|
|
720
|
+
|------|-----------|---------|
|
|
721
|
+
| Agent | No | Spawn subagent |
|
|
722
|
+
| AskUserQuestion | No | Multiple-choice questions to user |
|
|
723
|
+
| Bash | Yes | Execute shell commands |
|
|
724
|
+
| CronCreate | No | Schedule recurring/one-shot prompt |
|
|
725
|
+
| CronDelete | No | Cancel scheduled task |
|
|
726
|
+
| CronList | No | List scheduled tasks |
|
|
727
|
+
| Edit | Yes | Targeted file edits (string replacement) |
|
|
728
|
+
| EnterPlanMode | No | Switch to plan mode |
|
|
729
|
+
| EnterWorktree | No | Create git worktree |
|
|
730
|
+
| ExitPlanMode | Yes | Exit plan mode |
|
|
731
|
+
| ExitWorktree | No | Exit worktree |
|
|
732
|
+
| Glob | No | File pattern matching |
|
|
733
|
+
| Grep | No | Pattern search in files |
|
|
734
|
+
| ListMcpResourcesTool | No | List MCP server resources |
|
|
735
|
+
| LSP | No | Language server (type errors, navigation) |
|
|
736
|
+
| NotebookEdit | Yes | Modify Jupyter notebook cells |
|
|
737
|
+
| Read | No | Read file contents (text, images, PDFs, notebooks) |
|
|
738
|
+
| ReadMcpResourceTool | No | Read specific MCP resource |
|
|
739
|
+
| Skill | Yes | Execute skill |
|
|
740
|
+
| TaskCreate | No | Create task |
|
|
741
|
+
| TaskGet | No | Get task details |
|
|
742
|
+
| TaskList | No | List all tasks |
|
|
743
|
+
| TaskOutput | No | Retrieve background task output |
|
|
744
|
+
| TaskStop | No | Kill background task |
|
|
745
|
+
| TaskUpdate | No | Update task status/deps |
|
|
746
|
+
| TodoWrite | No | Session task checklist |
|
|
747
|
+
| ToolSearch | No | Search for deferred tools |
|
|
748
|
+
| WebFetch | Yes | Fetch URL content |
|
|
749
|
+
| WebSearch | Yes | Web search |
|
|
750
|
+
| Write | Yes | Create/overwrite files |
|
|
751
|
+
|
|
752
|
+
---
|
|
753
|
+
|
|
754
|
+
## 11. Interactive Features
|
|
755
|
+
|
|
756
|
+
### Keyboard Shortcuts
|
|
757
|
+
|
|
758
|
+
| Shortcut | Action |
|
|
759
|
+
|----------|--------|
|
|
760
|
+
| `Ctrl+C` | Cancel current input/generation |
|
|
761
|
+
| `Ctrl+D` | Exit session |
|
|
762
|
+
| `Ctrl+F` | Kill all background agents (press twice) |
|
|
763
|
+
| `Ctrl+L` | Clear screen |
|
|
764
|
+
| `Ctrl+O` | Toggle verbose output |
|
|
765
|
+
| `Ctrl+R` | Reverse history search |
|
|
766
|
+
| `Ctrl+G` | Open in text editor |
|
|
767
|
+
| `Ctrl+V` / `Cmd+V` | Paste image from clipboard |
|
|
768
|
+
| `Ctrl+B` | Background running tasks |
|
|
769
|
+
| `Ctrl+T` | Toggle task list |
|
|
770
|
+
| `Esc+Esc` | Rewind or summarize |
|
|
771
|
+
| `Shift+Tab` / `Alt+M` | Toggle permission modes |
|
|
772
|
+
| `Alt+P` / `Cmd+P` | Switch model |
|
|
773
|
+
| `Alt+T` / `Cmd+T` | Toggle extended thinking |
|
|
774
|
+
| `Ctrl+K` | Delete to end of line |
|
|
775
|
+
| `Ctrl+U` | Delete entire line |
|
|
776
|
+
| `Ctrl+Y` | Paste deleted text |
|
|
777
|
+
| `Alt+B` / `Alt+F` | Word navigation |
|
|
778
|
+
|
|
779
|
+
### Input Modes
|
|
780
|
+
|
|
781
|
+
- `\` + `Enter` — newline (all terminals)
|
|
782
|
+
- `Alt+Enter` — newline (macOS default)
|
|
783
|
+
- `Shift+Enter` — newline (iTerm2, WezTerm, Ghostty, Kitty)
|
|
784
|
+
- `!command` — direct Bash execution
|
|
785
|
+
- `@path` — file mention
|
|
786
|
+
- `/` — skill/command autocomplete
|
|
787
|
+
- `Space` (held) — push-to-talk dictation
|
|
788
|
+
|
|
789
|
+
### Vim Mode
|
|
790
|
+
|
|
791
|
+
Enable with `/vim`. Supports: `h/j/k/l`, `w/e/b`, `0/$`, `gg/G`, `f/F/t/T`, `dd/D/dw`, `cc/C/cw`, `yy/yw`, `p/P`, `>>/<<`, `.`, text objects (`iw/aw`, `i"/a"`, `i(/a(`, `i[/a[`, `i{/a{`).
|
|
792
|
+
|
|
793
|
+
### Keybindings Customization
|
|
794
|
+
|
|
795
|
+
File: `~/.claude/keybindings.json`
|
|
796
|
+
|
|
797
|
+
```json
|
|
798
|
+
{
|
|
799
|
+
"bindings": [
|
|
800
|
+
{
|
|
801
|
+
"context": "Chat",
|
|
802
|
+
"bindings": {
|
|
803
|
+
"ctrl+e": "chat:externalEditor",
|
|
804
|
+
"ctrl+u": null
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
}
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
Contexts: Global, Chat, Autocomplete, Settings, Confirmation, Tabs, Help, Transcript, HistorySearch, Task, ThemePicker, Attachments, Footer, MessageSelector, DiffDialog, ModelPicker, Select, Plugin.
|
|
812
|
+
|
|
813
|
+
Chords supported: `"ctrl+k ctrl+s": "action"`.
|
|
814
|
+
|
|
815
|
+
Reserved (cannot rebind): `Ctrl+C`, `Ctrl+D`.
|
|
816
|
+
|
|
817
|
+
---
|
|
818
|
+
|
|
819
|
+
## 12. Agent Teams & Task System
|
|
820
|
+
|
|
821
|
+
### Task Tools
|
|
822
|
+
|
|
823
|
+
- `TaskCreate` — create task with description, dependencies
|
|
824
|
+
- `TaskGet` — get task by ID
|
|
825
|
+
- `TaskList` — list all tasks
|
|
826
|
+
- `TaskUpdate` — update status (pending → in_progress → completed), add dependencies
|
|
827
|
+
- `TaskOutput` — retrieve background task output
|
|
828
|
+
- `TaskStop` — kill running background task
|
|
829
|
+
|
|
830
|
+
### Multi-Agent Coordination
|
|
831
|
+
|
|
832
|
+
- `TeammateIdle` hook — fires when an agent team teammate is idle
|
|
833
|
+
- `TaskCompleted` hook — fires when a task is marked complete
|
|
834
|
+
- `--teammate-mode auto|in-process|tmux` — how agents coordinate
|
|
835
|
+
|
|
836
|
+
### Cron (Scheduled Tasks)
|
|
837
|
+
|
|
838
|
+
- `CronCreate` — schedule recurring or one-shot prompts
|
|
839
|
+
- `CronDelete` — cancel scheduled task
|
|
840
|
+
- `CronList` — list all scheduled tasks
|
|
841
|
+
|
|
842
|
+
---
|
|
843
|
+
|
|
844
|
+
## 13. Git & Worktree Features
|
|
845
|
+
|
|
846
|
+
### Worktrees
|
|
847
|
+
|
|
848
|
+
- CLI: `claude --worktree feature-name` or `-w`
|
|
849
|
+
- Tools: `EnterWorktree` / `ExitWorktree`
|
|
850
|
+
- Agent: `isolation: worktree` in frontmatter
|
|
851
|
+
- Location: `<repo>/.claude/worktrees/<name>`
|
|
852
|
+
- Hooks: `WorktreeCreate`, `WorktreeRemove`
|
|
853
|
+
- Auto-cleanup if subagent makes no changes
|
|
854
|
+
|
|
855
|
+
### Session-PR Linking
|
|
856
|
+
|
|
857
|
+
- Auto-linked when PR created via `gh pr create` in session
|
|
858
|
+
- Resume: `claude --from-pr 123` or `--from-pr <url>`
|
|
859
|
+
|
|
860
|
+
---
|
|
861
|
+
|
|
862
|
+
## 14. Environment Variables
|
|
863
|
+
|
|
864
|
+
| Variable | Purpose |
|
|
865
|
+
|----------|---------|
|
|
866
|
+
| `CLAUDE_ENV_FILE` | Persist env vars across Bash commands |
|
|
867
|
+
| `CLAUDE_CODE_REMOTE` | "true" if cloud session |
|
|
868
|
+
| `CLAUDE_PROJECT_DIR` | Project root path |
|
|
869
|
+
| `CLAUDE_PLUGIN_ROOT` | Plugin installation directory |
|
|
870
|
+
| `CLAUDE_PLUGIN_DATA` | Plugin persistent data directory |
|
|
871
|
+
| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | Disable auto memory |
|
|
872
|
+
| `CLAUDE_CODE_TASK_LIST_ID` | Named task list |
|
|
873
|
+
| `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` | Enable/disable prompt suggestions |
|
|
874
|
+
| `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR` | Keep project cwd in Bash |
|
|
875
|
+
| `MAX_MCP_OUTPUT_TOKENS` | Override MCP output limit |
|
|
876
|
+
| `ENABLE_TOOL_SEARCH` | Control deferred tool discovery |
|
|
877
|
+
|
|
878
|
+
---
|
|
879
|
+
|
|
880
|
+
## 15. Configuration File Paths (Complete)
|
|
881
|
+
|
|
882
|
+
| Path | Purpose |
|
|
883
|
+
|------|---------|
|
|
884
|
+
| `~/.claude/` | User config home |
|
|
885
|
+
| `~/.claude/settings.json` | User settings |
|
|
886
|
+
| `~/.claude/keybindings.json` | Keyboard shortcuts |
|
|
887
|
+
| `~/.claude/CLAUDE.md` | User-level instructions |
|
|
888
|
+
| `~/.claude/agents/` | Personal agents |
|
|
889
|
+
| `~/.claude/skills/` | Personal skills |
|
|
890
|
+
| `~/.claude/rules/` | Personal rules |
|
|
891
|
+
| `~/.claude/projects/{project}/memory/` | Auto memory |
|
|
892
|
+
| `~/.claude.json` | MCP config (local/user scope) |
|
|
893
|
+
| `.claude/settings.json` | Project settings (shared) |
|
|
894
|
+
| `.claude/settings.local.json` | Project settings (local) |
|
|
895
|
+
| `.claude/CLAUDE.md` | Project instructions |
|
|
896
|
+
| `.claude/agents/` | Project agents |
|
|
897
|
+
| `.claude/skills/` | Project skills |
|
|
898
|
+
| `.claude/rules/` | Project rules |
|
|
899
|
+
| `.claude/agent-memory/` | Agent memory (shared) |
|
|
900
|
+
| `.claude/agent-memory-local/` | Agent memory (local) |
|
|
901
|
+
| `.claude/worktrees/` | Worktree isolation |
|
|
902
|
+
| `.mcp.json` | MCP config (project scope) |
|
|
903
|
+
| `CLAUDE.md` | Project instructions (root) |
|
|
904
|
+
| `/Library/Application Support/ClaudeCode/` | Managed policy (macOS) |
|
|
905
|
+
| `/etc/claude-code/` | Managed policy (Linux/WSL) |
|
|
906
|
+
| `C:\Program Files\ClaudeCode\` | Managed policy (Windows) |
|