mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-05-09 22:07:32 +02:00
docs: Add missing commands, features, and settings across 6 guides
Phase 2 of docs sync: fill gaps in existing content for Jan-Mar 2026 features.
- Add 15 missing slash commands to built-in commands table
- Add bundled skills section (/simplify, /batch, /debug, /loop, /claude-api)
- Add ${CLAUDE_SKILL_DIR} string substitution for skills
- Add MCP OAuth metadata override, scope terminology update, CLAUDEAI toggle
- Add InstructionsLoaded/Setup hook events, HTTP hooks version note, new fields
- Add effort level visual indicators and autoMemoryDirectory/claudeMdExcludes settings
- Update /context command description with optimization suggestions
- Add update-plan.md tracking document
This commit is contained in:
@@ -24,34 +24,46 @@ Built-in commands are shortcuts for common actions. Type `/` in Claude Code to s
|
|||||||
|---------|---------|
|
|---------|---------|
|
||||||
| `/add-dir` | Add additional working directories |
|
| `/add-dir` | Add additional working directories |
|
||||||
| `/agents` | Manage custom AI subagents for specialized tasks |
|
| `/agents` | Manage custom AI subagents for specialized tasks |
|
||||||
|
| `/btw <question>` | Side question without adding to conversation |
|
||||||
|
| `/chrome` | Configure Chrome browser integration |
|
||||||
| `/clear` | Clear conversation history |
|
| `/clear` | Clear conversation history |
|
||||||
| `/compact [instructions]` | Compact conversation with optional focus instructions |
|
| `/compact [instructions]` | Compact conversation with optional focus instructions |
|
||||||
| `/config` | Open the Settings interface (Config tab) |
|
| `/config` | Open the Settings interface (Config tab) |
|
||||||
| `/context` | Visualize current context usage as a colored grid |
|
| `/context` | Visualize context usage with actionable optimization suggestions |
|
||||||
| `/copy` | Copy the last assistant response to clipboard |
|
| `/copy` | Copy the last assistant response to clipboard |
|
||||||
| `/cost` | Show token usage statistics |
|
| `/cost` | Show token usage statistics |
|
||||||
| `/desktop` | Hand off CLI session to Desktop app (macOS/Windows) |
|
| `/desktop` | Hand off CLI session to Desktop app (macOS/Windows) |
|
||||||
|
| `/diff` | Interactive diff viewer for uncommitted changes |
|
||||||
| `/doctor` | Checks the health of your Claude Code installation |
|
| `/doctor` | Checks the health of your Claude Code installation |
|
||||||
| `/exit` | Exit the REPL |
|
| `/exit` | Exit the REPL |
|
||||||
| `/export [filename]` | Export the current conversation to a file or clipboard |
|
| `/export [filename]` | Export the current conversation to a file or clipboard |
|
||||||
|
| `/extra-usage` | Configure extra usage for rate limits |
|
||||||
| `/fast` | Toggle fast mode (same model, faster output) |
|
| `/fast` | Toggle fast mode (same model, faster output) |
|
||||||
|
| `/feedback` | Submit feedback (alias: `/bug`) |
|
||||||
| `/fork` | Fork the current session into a new conversation |
|
| `/fork` | Fork the current session into a new conversation |
|
||||||
| `/help` | Get usage help |
|
| `/help` | Get usage help |
|
||||||
| `/hooks` | Manage hook configurations for tool events |
|
| `/hooks` | Manage hook configurations for tool events |
|
||||||
| `/ide` | Manage IDE integrations and show status |
|
| `/ide` | Manage IDE integrations and show status |
|
||||||
| `/init` | Initialize project with `CLAUDE.md` guide |
|
| `/init` | Initialize project with `CLAUDE.md` guide |
|
||||||
|
| `/insights` | Analyze session patterns and friction points |
|
||||||
| `/install-github-app` | Set up Claude GitHub Actions for a repository |
|
| `/install-github-app` | Set up Claude GitHub Actions for a repository |
|
||||||
|
| `/install-slack-app` | Install Claude Slack app |
|
||||||
|
| `/keybindings` | Open keybindings configuration |
|
||||||
| `/login` | Switch Anthropic accounts |
|
| `/login` | Switch Anthropic accounts |
|
||||||
| `/logout` | Sign out from your Anthropic account |
|
| `/logout` | Sign out from your Anthropic account |
|
||||||
| `/mcp` | Manage MCP server connections and OAuth authentication |
|
| `/mcp` | Manage MCP server connections and OAuth authentication |
|
||||||
| `/memory` | Edit `CLAUDE.md` memory files |
|
| `/memory` | Edit `CLAUDE.md` memory files |
|
||||||
|
| `/mobile` | QR code for Claude mobile app (aliases: `/ios`, `/android`) |
|
||||||
| `/model` | Select or change the AI model |
|
| `/model` | Select or change the AI model |
|
||||||
|
| `/passes` | Share free week of Claude Code |
|
||||||
| `/permissions` | View or update permissions |
|
| `/permissions` | View or update permissions |
|
||||||
| `/plan` | Enter plan mode directly from the prompt |
|
| `/plan` | Enter plan mode directly from the prompt |
|
||||||
| `/plugin` | Manage Claude Code plugins |
|
| `/plugin` | Manage Claude Code plugins |
|
||||||
| `/pr-comments` | View pull request comments |
|
| `/pr-comments` | View pull request comments |
|
||||||
| `/privacy-settings` | View and update your privacy settings |
|
| `/privacy-settings` | View and update your privacy settings |
|
||||||
| `/release-notes` | View release notes |
|
| `/release-notes` | View release notes |
|
||||||
|
| `/reload-plugins` | Reload active plugins without restart |
|
||||||
|
| `/remote-control` | Make session available for remote control (alias: `/rc`) |
|
||||||
| `/remote-env` | Configure remote session environment (claude.ai subscribers) |
|
| `/remote-env` | Configure remote session environment (claude.ai subscribers) |
|
||||||
| `/rename <name>` | Rename the current session |
|
| `/rename <name>` | Rename the current session |
|
||||||
| `/resume [session]` | Resume a conversation by ID or name |
|
| `/resume [session]` | Resume a conversation by ID or name |
|
||||||
@@ -59,13 +71,16 @@ Built-in commands are shortcuts for common actions. Type `/` in Claude Code to s
|
|||||||
| `/rewind` | Rewind the conversation and/or code |
|
| `/rewind` | Rewind the conversation and/or code |
|
||||||
| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation |
|
| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation |
|
||||||
| `/security-review` | Complete a security review of pending changes |
|
| `/security-review` | Complete a security review of pending changes |
|
||||||
|
| `/skills` | List available skills |
|
||||||
| `/stats` | Visualize daily usage, session history, streaks, and model preferences |
|
| `/stats` | Visualize daily usage, session history, streaks, and model preferences |
|
||||||
| `/status` | Open the Settings interface (Status tab) |
|
| `/status` | Open the Settings interface (Status tab) |
|
||||||
| `/statusline` | Set up Claude Code's status line UI |
|
| `/statusline` | Set up Claude Code's status line UI |
|
||||||
|
| `/stickers` | Order Claude Code stickers |
|
||||||
| `/tasks` | List and manage background tasks |
|
| `/tasks` | List and manage background tasks |
|
||||||
| `/teleport` | Resume remote session from claude.ai by session ID |
|
| `/teleport` | Resume remote session from claude.ai by session ID |
|
||||||
| `/terminal-setup` | Install Shift+Enter key binding for newlines |
|
| `/terminal-setup` | Install Shift+Enter key binding for newlines |
|
||||||
| `/theme` | Change the color theme |
|
| `/theme` | Change the color theme |
|
||||||
|
| `/upgrade` | Open upgrade page |
|
||||||
| `/usage` | Show plan usage limits and rate limit status |
|
| `/usage` | Show plan usage limits and rate limit status |
|
||||||
| `/vim` | Enter vim mode for alternating insert and command modes |
|
| `/vim` | Enter vim mode for alternating insert and command modes |
|
||||||
|
|
||||||
|
|||||||
@@ -269,6 +269,26 @@ graph TD
|
|||||||
style I fill:#e1f5fe,stroke:#333,color:#333
|
style I fill:#e1f5fe,stroke:#333,color:#333
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Excluding CLAUDE.md Files with `claudeMdExcludes`
|
||||||
|
|
||||||
|
In large monorepos, some CLAUDE.md files may be irrelevant to your current work. The `claudeMdExcludes` setting lets you skip specific CLAUDE.md files so they are not loaded into context:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
// In ~/.claude/settings.json or .claude/settings.json
|
||||||
|
{
|
||||||
|
"claudeMdExcludes": [
|
||||||
|
"packages/legacy-app/CLAUDE.md",
|
||||||
|
"vendors/**/CLAUDE.md"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Patterns are matched against paths relative to the project root. This is particularly useful for:
|
||||||
|
|
||||||
|
- Monorepos with many sub-projects, where only some are relevant
|
||||||
|
- Repositories that contain vendored or third-party CLAUDE.md files
|
||||||
|
- Reducing noise in Claude's context window by excluding stale or unrelated instructions
|
||||||
|
|
||||||
## Modular Rules System
|
## Modular Rules System
|
||||||
|
|
||||||
Create organized, path-specific rules using the `.claude/rules/` directory structure. Rules can be defined at both the project level and user level:
|
Create organized, path-specific rules using the `.claude/rules/` directory structure. Rules can be defined at both the project level and user level:
|
||||||
@@ -407,6 +427,31 @@ graph TD
|
|||||||
└── testing-patterns.md # Topic file (loaded on demand)
|
└── testing-patterns.md # Topic file (loaded on demand)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Version Requirement
|
||||||
|
|
||||||
|
Auto memory requires **Claude Code v2.1.59 or later**. If you are on an older version, upgrade first:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install -g @anthropic-ai/claude-code@latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### Custom Auto Memory Directory
|
||||||
|
|
||||||
|
By default, auto memory is stored in `~/.claude/projects/<project>/memory/`. You can change this location using the `autoMemoryDirectory` setting (available since **v2.1.74**):
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
// In ~/.claude/settings.json or .claude/settings.json
|
||||||
|
{
|
||||||
|
"autoMemoryDirectory": "/path/to/custom/memory/directory"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This is useful when you want to:
|
||||||
|
|
||||||
|
- Store auto memory in a shared or synced location
|
||||||
|
- Separate auto memory from the default Claude configuration directory
|
||||||
|
- Use a project-specific path outside the default hierarchy
|
||||||
|
|
||||||
### Controlling Auto Memory
|
### Controlling Auto Memory
|
||||||
|
|
||||||
Auto memory can be controlled via the `CLAUDE_CODE_DISABLE_AUTO_MEMORY` environment variable:
|
Auto memory can be controlled via the `CLAUDE_CODE_DISABLE_AUTO_MEMORY` environment variable:
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ Skills support dynamic values:
|
|||||||
| `$ARGUMENTS` | All arguments passed when invoking the skill |
|
| `$ARGUMENTS` | All arguments passed when invoking the skill |
|
||||||
| `$ARGUMENTS[N]` or `$N` | Access specific argument by index (0-based) |
|
| `$ARGUMENTS[N]` or `$N` | Access specific argument by index (0-based) |
|
||||||
| `${CLAUDE_SESSION_ID}` | Current session ID |
|
| `${CLAUDE_SESSION_ID}` | Current session ID |
|
||||||
|
| `${CLAUDE_SKILL_DIR}` | Directory containing the skill's SKILL.md file |
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
@@ -725,6 +726,20 @@ Skill descriptions are loaded at **2% of the context window** (fallback: **16,00
|
|||||||
| **MCP** | Real-time | External data/service access |
|
| **MCP** | Real-time | External data/service access |
|
||||||
| **Hooks** | Event-driven | Automated side effects |
|
| **Hooks** | Event-driven | Automated side effects |
|
||||||
|
|
||||||
|
## Bundled Skills
|
||||||
|
|
||||||
|
Claude Code ships with several built-in skills that are always available without installation:
|
||||||
|
|
||||||
|
| Skill | Description |
|
||||||
|
|-------|-------------|
|
||||||
|
| `/simplify` | Review changed files for reuse, quality, and efficiency; spawns 3 parallel review agents |
|
||||||
|
| `/batch <instruction>` | Orchestrate large-scale parallel changes across codebase using git worktrees |
|
||||||
|
| `/debug [description]` | Troubleshoot current session by reading debug log |
|
||||||
|
| `/loop [interval] <prompt>` | Run prompt repeatedly on interval (e.g., `/loop 5m check the deploy`) |
|
||||||
|
| `/claude-api` | Load Claude API/SDK reference; auto-activates on `anthropic`/`@anthropic-ai/sdk` imports |
|
||||||
|
|
||||||
|
These skills are available out-of-the-box and do not need to be installed or configured. They follow the same SKILL.md format as custom skills.
|
||||||
|
|
||||||
## Sharing Skills
|
## Sharing Skills
|
||||||
|
|
||||||
### Project Skills (Team Sharing)
|
### Project Skills (Team Sharing)
|
||||||
|
|||||||
+183
-2
@@ -135,11 +135,38 @@ claude mcp add --transport http my-service https://my-service.example.com/mcp \
|
|||||||
| **Token storage** | Tokens are stored securely in your system keychain |
|
| **Token storage** | Tokens are stored securely in your system keychain |
|
||||||
| **Step-up auth** | Supports step-up authentication for privileged operations |
|
| **Step-up auth** | Supports step-up authentication for privileged operations |
|
||||||
| **Discovery caching** | OAuth discovery metadata is cached for faster reconnections |
|
| **Discovery caching** | OAuth discovery metadata is cached for faster reconnections |
|
||||||
|
| **Metadata override** | `oauth.authServerMetadataUrl` in `.mcp.json` to override default OAuth metadata discovery |
|
||||||
|
|
||||||
|
#### Overriding OAuth Metadata Discovery
|
||||||
|
|
||||||
|
If your MCP server returns errors on the standard OAuth metadata endpoint (`/.well-known/oauth-authorization-server`) but exposes a working OIDC endpoint, you can tell Claude Code to fetch OAuth metadata from a specific URL. Set `authServerMetadataUrl` in the `oauth` object of your server config:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"my-server": {
|
||||||
|
"type": "http",
|
||||||
|
"url": "https://mcp.example.com/mcp",
|
||||||
|
"oauth": {
|
||||||
|
"authServerMetadataUrl": "https://auth.example.com/.well-known/openid-configuration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The URL must use `https://`. This option requires Claude Code v2.1.64 or later.
|
||||||
|
|
||||||
### Claude.ai MCP Connectors
|
### Claude.ai MCP Connectors
|
||||||
|
|
||||||
MCP servers configured in your Claude.ai account are automatically available in Claude Code. This means any MCP connections you set up through the Claude.ai web interface will be accessible without additional configuration.
|
MCP servers configured in your Claude.ai account are automatically available in Claude Code. This means any MCP connections you set up through the Claude.ai web interface will be accessible without additional configuration.
|
||||||
|
|
||||||
|
To disable Claude.ai MCP servers in Claude Code, set the `ENABLE_CLAUDEAI_MCP_SERVERS` environment variable to `false`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ENABLE_CLAUDEAI_MCP_SERVERS=false claude
|
||||||
|
```
|
||||||
|
|
||||||
> **Note:** This feature is only available for users logged in with Claude.ai accounts.
|
> **Note:** This feature is only available for users logged in with Claude.ai accounts.
|
||||||
|
|
||||||
## MCP Setup Process
|
## MCP Setup Process
|
||||||
@@ -201,9 +228,9 @@ MCP configurations can be stored at different scopes with varying levels of shar
|
|||||||
|
|
||||||
| Scope | Location | Description | Shared With | Requires Approval |
|
| Scope | Location | Description | Shared With | Requires Approval |
|
||||||
|-------|----------|-------------|-------------|------------------|
|
|-------|----------|-------------|-------------|------------------|
|
||||||
| **Local** (default) | `~/.claude.json` | Private to current user | Just you | No |
|
| **Local** (default) | `~/.claude.json` (under project path) | Private to current user, current project only (was called `project` in older versions) | Just you | No |
|
||||||
| **Project** | `.mcp.json` | Checked into git repository | Team members | Yes (first use) |
|
| **Project** | `.mcp.json` | Checked into git repository | Team members | Yes (first use) |
|
||||||
| **User** | `~/.claude.json` | Available across all projects | Just you | No |
|
| **User** | `~/.claude.json` | Available across all projects (was called `global` in older versions) | Just you | No |
|
||||||
|
|
||||||
### Using Project Scope
|
### Using Project Scope
|
||||||
|
|
||||||
@@ -652,6 +679,160 @@ The maximum output limit is configurable via the `MAX_MCP_OUTPUT_TOKENS` environ
|
|||||||
export MAX_MCP_OUTPUT_TOKENS=50000
|
export MAX_MCP_OUTPUT_TOKENS=50000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Solving Context Bloat with Code Execution
|
||||||
|
|
||||||
|
As MCP adoption scales, connecting to dozens of servers with hundreds or thousands of tools creates a significant challenge: **context bloat**. This is arguably the biggest problem with MCP at scale, and Anthropic's engineering team has proposed an elegant solution — using code execution instead of direct tool calls.
|
||||||
|
|
||||||
|
> **Source**: [Code Execution with MCP: Building More Efficient Agents](https://www.anthropic.com/engineering/code-execution-with-mcp) — Anthropic Engineering Blog
|
||||||
|
|
||||||
|
### The Problem: Two Sources of Token Waste
|
||||||
|
|
||||||
|
**1. Tool definitions overload the context window**
|
||||||
|
|
||||||
|
Most MCP clients load all tool definitions upfront. When connected to thousands of tools, the model must process hundreds of thousands of tokens before it even reads the user's request.
|
||||||
|
|
||||||
|
**2. Intermediate results consume additional tokens**
|
||||||
|
|
||||||
|
Every intermediate tool result passes through the model's context. Consider transferring a meeting transcript from Google Drive to Salesforce — the full transcript flows through context **twice**: once when reading it, and again when writing it to the destination. A 2-hour meeting transcript could mean 50,000+ extra tokens.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph LR
|
||||||
|
A["Model"] -->|"Tool Call: getDocument"| B["MCP Server"]
|
||||||
|
B -->|"Full transcript (50K tokens)"| A
|
||||||
|
A -->|"Tool Call: updateRecord<br/>(re-sends full transcript)"| B
|
||||||
|
B -->|"Confirmation"| A
|
||||||
|
|
||||||
|
style A fill:#ffcdd2,stroke:#333,color:#333
|
||||||
|
style B fill:#f3e5f5,stroke:#333,color:#333
|
||||||
|
```
|
||||||
|
|
||||||
|
### The Solution: MCP Tools as Code APIs
|
||||||
|
|
||||||
|
Instead of passing tool definitions and results through the context window, the agent **writes code** that calls MCP tools as APIs. The code runs in a sandboxed execution environment, and only the final result returns to the model.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph LR
|
||||||
|
A["Model"] -->|"Writes code"| B["Code Execution<br/>Environment"]
|
||||||
|
B -->|"Calls tools directly"| C["MCP Servers"]
|
||||||
|
C -->|"Data stays in<br/>execution env"| B
|
||||||
|
B -->|"Only final result<br/>(minimal tokens)"| A
|
||||||
|
|
||||||
|
style A fill:#c8e6c9,stroke:#333,color:#333
|
||||||
|
style B fill:#e1f5fe,stroke:#333,color:#333
|
||||||
|
style C fill:#f3e5f5,stroke:#333,color:#333
|
||||||
|
```
|
||||||
|
|
||||||
|
#### How It Works
|
||||||
|
|
||||||
|
MCP tools are presented as a file tree of typed functions:
|
||||||
|
|
||||||
|
```
|
||||||
|
servers/
|
||||||
|
├── google-drive/
|
||||||
|
│ ├── getDocument.ts
|
||||||
|
│ └── index.ts
|
||||||
|
├── salesforce/
|
||||||
|
│ ├── updateRecord.ts
|
||||||
|
│ └── index.ts
|
||||||
|
└── ...
|
||||||
|
```
|
||||||
|
|
||||||
|
Each tool file contains a typed wrapper:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// ./servers/google-drive/getDocument.ts
|
||||||
|
import { callMCPTool } from "../../../client.js";
|
||||||
|
|
||||||
|
interface GetDocumentInput {
|
||||||
|
documentId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface GetDocumentResponse {
|
||||||
|
content: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getDocument(
|
||||||
|
input: GetDocumentInput
|
||||||
|
): Promise<GetDocumentResponse> {
|
||||||
|
return callMCPTool<GetDocumentResponse>(
|
||||||
|
'google_drive__get_document', input
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The agent then writes code to orchestrate the tools:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import * as gdrive from './servers/google-drive';
|
||||||
|
import * as salesforce from './servers/salesforce';
|
||||||
|
|
||||||
|
// Data flows directly between tools — never through the model
|
||||||
|
const transcript = (
|
||||||
|
await gdrive.getDocument({ documentId: 'abc123' })
|
||||||
|
).content;
|
||||||
|
|
||||||
|
await salesforce.updateRecord({
|
||||||
|
objectType: 'SalesMeeting',
|
||||||
|
recordId: '00Q5f000001abcXYZ',
|
||||||
|
data: { Notes: transcript }
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
**Result: Token usage drops from ~150,000 to ~2,000 — a 98.7% reduction.**
|
||||||
|
|
||||||
|
### Key Benefits
|
||||||
|
|
||||||
|
| Benefit | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| **Progressive Disclosure** | Agent browses the filesystem to load only the tool definitions it needs, instead of all tools upfront |
|
||||||
|
| **Context-Efficient Results** | Data is filtered/transformed in the execution environment before returning to the model |
|
||||||
|
| **Powerful Control Flow** | Loops, conditionals, and error handling run in code without round-tripping through the model |
|
||||||
|
| **Privacy Preservation** | Intermediate data (PII, sensitive records) stays in the execution environment; never enters the model context |
|
||||||
|
| **State Persistence** | Agents can save intermediate results to files and build reusable skill functions |
|
||||||
|
|
||||||
|
#### Example: Filtering Large Datasets
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Without code execution — all 10,000 rows flow through context
|
||||||
|
// TOOL CALL: gdrive.getSheet(sheetId: 'abc123')
|
||||||
|
// -> returns 10,000 rows in context
|
||||||
|
|
||||||
|
// With code execution — filter in the execution environment
|
||||||
|
const allRows = await gdrive.getSheet({ sheetId: 'abc123' });
|
||||||
|
const pendingOrders = allRows.filter(
|
||||||
|
row => row["Status"] === 'pending'
|
||||||
|
);
|
||||||
|
console.log(`Found ${pendingOrders.length} pending orders`);
|
||||||
|
console.log(pendingOrders.slice(0, 5)); // Only 5 rows reach the model
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example: Loop Without Round-Tripping
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Poll for a deployment notification — runs entirely in code
|
||||||
|
let found = false;
|
||||||
|
while (!found) {
|
||||||
|
const messages = await slack.getChannelHistory({
|
||||||
|
channel: 'C123456'
|
||||||
|
});
|
||||||
|
found = messages.some(
|
||||||
|
m => m.text.includes('deployment complete')
|
||||||
|
);
|
||||||
|
if (!found) await new Promise(r => setTimeout(r, 5000));
|
||||||
|
}
|
||||||
|
console.log('Deployment notification received');
|
||||||
|
```
|
||||||
|
|
||||||
|
### Trade-offs to Consider
|
||||||
|
|
||||||
|
Code execution introduces its own complexity. Running agent-generated code requires:
|
||||||
|
|
||||||
|
- A **secure sandboxed execution environment** with appropriate resource limits
|
||||||
|
- **Monitoring and logging** of executed code
|
||||||
|
- Additional **infrastructure overhead** compared to direct tool calls
|
||||||
|
|
||||||
|
The benefits — reduced token costs, lower latency, improved tool composition — should be weighed against these implementation costs. For agents with only a few MCP servers, direct tool calls may be simpler. For agents at scale (dozens of servers, hundreds of tools), code execution is a significant improvement.
|
||||||
|
|
||||||
## Best Practices
|
## Best Practices
|
||||||
|
|
||||||
### Security Considerations
|
### Security Considerations
|
||||||
|
|||||||
+24
-3
@@ -55,6 +55,7 @@ Hooks are configured in settings files with a specific structure:
|
|||||||
| `type` | Hook type: `"command"` (bash), `"prompt"` (LLM), or `"http"` (webhook) | `"command"` |
|
| `type` | Hook type: `"command"` (bash), `"prompt"` (LLM), or `"http"` (webhook) | `"command"` |
|
||||||
| `command` | Shell command to execute | `"$CLAUDE_PROJECT_DIR/.claude/hooks/format.sh"` |
|
| `command` | Shell command to execute | `"$CLAUDE_PROJECT_DIR/.claude/hooks/format.sh"` |
|
||||||
| `timeout` | Optional timeout in seconds (default 60) | `30` |
|
| `timeout` | Optional timeout in seconds (default 60) | `30` |
|
||||||
|
| `once` | If `true`, run the hook only once per session | `true` |
|
||||||
|
|
||||||
### Matcher Patterns
|
### Matcher Patterns
|
||||||
|
|
||||||
@@ -83,7 +84,9 @@ The default hook type. Executes a shell command and communicates via JSON stdin/
|
|||||||
|
|
||||||
### HTTP Hooks
|
### HTTP Hooks
|
||||||
|
|
||||||
Remote webhook endpoints that receive the same JSON input as command hooks. HTTP hooks are routed through the sandbox when sandboxing is enabled. Environment variable interpolation in URLs requires an explicit `allowedEnvVars` list for security.
|
> Added in v2.1.63.
|
||||||
|
|
||||||
|
Remote webhook endpoints that receive the same JSON input as command hooks. HTTP hooks POST JSON to the URL and receive a JSON response. HTTP hooks are routed through the sandbox when sandboxing is enabled. Environment variable interpolation in URLs requires an explicit `allowedEnvVars` list for security.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -119,10 +122,12 @@ The LLM evaluates the prompt and returns a structured decision (see [Prompt-Base
|
|||||||
|
|
||||||
## Hook Events
|
## Hook Events
|
||||||
|
|
||||||
Claude Code supports **16 hook events**:
|
Claude Code supports **18 hook events**:
|
||||||
|
|
||||||
| Event | When Triggered | Matcher Input | Can Block | Common Use |
|
| Event | When Triggered | Matcher Input | Can Block | Common Use |
|
||||||
|-------|---------------|---------------|-----------|------------|
|
|-------|---------------|---------------|-----------|------------|
|
||||||
|
| **InstructionsLoaded** | After CLAUDE.md files loaded | (none) | No | Modify/filter instructions |
|
||||||
|
| **Setup** | During initial setup | (none) | No | One-time initialization |
|
||||||
| **PreToolUse** | Before tool execution | Tool name | Yes | Validate, modify inputs |
|
| **PreToolUse** | Before tool execution | Tool name | Yes | Validate, modify inputs |
|
||||||
| **PostToolUse** | After tool completion | Tool name | Yes (block) | Add context, feedback |
|
| **PostToolUse** | After tool completion | Tool name | Yes (block) | Add context, feedback |
|
||||||
| **PermissionRequest** | Permission dialog shown | Tool name | Yes | Auto-approve/deny |
|
| **PermissionRequest** | Permission dialog shown | Tool name | Yes | Auto-approve/deny |
|
||||||
@@ -401,10 +406,25 @@ All hooks receive JSON input via stdin:
|
|||||||
"file_path": "/path/to/file.js",
|
"file_path": "/path/to/file.js",
|
||||||
"content": "..."
|
"content": "..."
|
||||||
},
|
},
|
||||||
"tool_use_id": "toolu_01ABC123..."
|
"tool_use_id": "toolu_01ABC123...",
|
||||||
|
"agent_id": "agent-abc123",
|
||||||
|
"agent_type": "main",
|
||||||
|
"worktree": "/path/to/worktree"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Common fields:**
|
||||||
|
|
||||||
|
| Field | Description |
|
||||||
|
|-------|-------------|
|
||||||
|
| `session_id` | Unique session identifier |
|
||||||
|
| `transcript_path` | Path to the conversation transcript file |
|
||||||
|
| `cwd` | Current working directory |
|
||||||
|
| `hook_event_name` | Name of the event that triggered the hook |
|
||||||
|
| `agent_id` | Identifier of the agent running this hook |
|
||||||
|
| `agent_type` | Type of agent (`"main"`, subagent type name, etc.) |
|
||||||
|
| `worktree` | Path to the git worktree, if the agent is running in one |
|
||||||
|
|
||||||
### Exit Codes
|
### Exit Codes
|
||||||
|
|
||||||
| Exit Code | Meaning | Behavior |
|
| Exit Code | Meaning | Behavior |
|
||||||
@@ -440,6 +460,7 @@ All hooks receive JSON input via stdin:
|
|||||||
| `CLAUDE_ENV_FILE` | SessionStart only | File path for persisting env vars |
|
| `CLAUDE_ENV_FILE` | SessionStart only | File path for persisting env vars |
|
||||||
| `CLAUDE_CODE_REMOTE` | All hooks | `"true"` if running in web environment |
|
| `CLAUDE_CODE_REMOTE` | All hooks | `"true"` if running in web environment |
|
||||||
| `${CLAUDE_PLUGIN_ROOT}` | Plugin hooks | Path to plugin directory |
|
| `${CLAUDE_PLUGIN_ROOT}` | Plugin hooks | Path to plugin directory |
|
||||||
|
| `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS` | SessionEnd hooks | Configurable timeout in milliseconds for SessionEnd hooks (overrides default) |
|
||||||
|
|
||||||
## Prompt-Based Hooks
|
## Prompt-Based Hooks
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ Extended thinking is a deliberate, step-by-step reasoning process where Claude:
|
|||||||
|
|
||||||
**Automatic activation**:
|
**Automatic activation**:
|
||||||
- Enabled by default for all models (Opus 4.6, Sonnet 4.6, Haiku 4.5)
|
- Enabled by default for all models (Opus 4.6, Sonnet 4.6, Haiku 4.5)
|
||||||
- Opus 4.6: Adaptive reasoning with effort levels (low/medium/high)
|
- Opus 4.6: Adaptive reasoning with effort levels: low (○), medium (◐), high (●)
|
||||||
- Other models: Fixed budget up to 31,999 tokens
|
- Other models: Fixed budget up to 31,999 tokens
|
||||||
|
|
||||||
**Configuration methods**:
|
**Configuration methods**:
|
||||||
@@ -223,7 +223,7 @@ export MAX_THINKING_TOKENS=1024
|
|||||||
|
|
||||||
**Effort level** (Opus 4.6 only):
|
**Effort level** (Opus 4.6 only):
|
||||||
```bash
|
```bash
|
||||||
export CLAUDE_CODE_EFFORT_LEVEL=high # low, medium, or high
|
export CLAUDE_CODE_EFFORT_LEVEL=high # low (○), medium (◐), or high (●)
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note:** Words like "think" or "ultrathink" in prompts are interpreted as regular prompt instructions, not special keywords or triggers.
|
> **Note:** Words like "think" or "ultrathink" in prompts are interpreted as regular prompt instructions, not special keywords or triggers.
|
||||||
@@ -314,7 +314,7 @@ Extended thinking is controlled via environment variables and keyboard shortcuts
|
|||||||
# Set thinking token budget
|
# Set thinking token budget
|
||||||
export MAX_THINKING_TOKENS=16000
|
export MAX_THINKING_TOKENS=16000
|
||||||
|
|
||||||
# Set effort level (Opus 4.6 only)
|
# Set effort level (Opus 4.6 only): low (○), medium (◐), or high (●)
|
||||||
export CLAUDE_CODE_EFFORT_LEVEL=high
|
export CLAUDE_CODE_EFFORT_LEVEL=high
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,12 @@
|
|||||||
| Anthropic Cookbook | Code examples and tutorials | [github.com/anthropics/anthropic-cookbook](https://github.com/anthropics/anthropic-cookbook) |
|
| Anthropic Cookbook | Code examples and tutorials | [github.com/anthropics/anthropic-cookbook](https://github.com/anthropics/anthropic-cookbook) |
|
||||||
| Claude Code Skills | Community skills repository | [github.com/anthropics/skills](https://github.com/anthropics/skills) |
|
| Claude Code Skills | Community skills repository | [github.com/anthropics/skills](https://github.com/anthropics/skills) |
|
||||||
|
|
||||||
|
## Anthropic Engineering Blog
|
||||||
|
|
||||||
|
| Article | Description | Link |
|
||||||
|
|---------|-------------|------|
|
||||||
|
| Code Execution with MCP | How to solve MCP context bloat using code execution — 98.7% token reduction | [anthropic.com/engineering/code-execution-with-mcp](https://www.anthropic.com/engineering/code-execution-with-mcp) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Mastering Claude Code in 30 Minutes
|
## Mastering Claude Code in 30 Minutes
|
||||||
|
|||||||
+298
@@ -0,0 +1,298 @@
|
|||||||
|
# Docs Sync Update Plan
|
||||||
|
|
||||||
|
> Generated: 2026-03-13
|
||||||
|
> Source: Official Claude Code docs at `code.claude.com/docs/en/`
|
||||||
|
> Repo version: Last updated February 2026
|
||||||
|
> Latest Claude Code version: 2.1.74 (March 12, 2026)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Phase 1: Critical Updates (Broken/Misleading Content) ✅ COMPLETED
|
||||||
|
|
||||||
|
> **Completed**: 2026-03-13 | **Commit**: `8fe4520`
|
||||||
|
|
||||||
|
These items were factually wrong or referenced deprecated/removed features.
|
||||||
|
|
||||||
|
### Task 1.1: Fix official docs URL ✅
|
||||||
|
|
||||||
|
- **Files modified**: `README.md`, `resources.md`, `CATALOG.md`, `02-memory/README.md`, `claude_concepts_guide.md`, `LEARNING-ROADMAP.md`, `STYLE_GUIDE.md`, `.github/ISSUE_TEMPLATE/config.yml`
|
||||||
|
- **Change**: Replaced 16 instances of `docs.anthropic.com/en/docs/claude-code` URLs with `code.claude.com/docs/en/` equivalents (with correct subpath mapping per page)
|
||||||
|
|
||||||
|
### Task 1.2: Mark `/review` as deprecated ✅
|
||||||
|
|
||||||
|
- **File**: `01-slash-commands/README.md`
|
||||||
|
- **Change**: Marked `/review` as **Deprecated** with `code-review` plugin install instructions
|
||||||
|
|
||||||
|
### Task 1.3: Mark `/output-style` as deprecated — SKIPPED
|
||||||
|
|
||||||
|
- **Reason**: `/output-style` was not present in the repo. No action needed.
|
||||||
|
|
||||||
|
### Task 1.4: Fix model name references ✅
|
||||||
|
|
||||||
|
- **File**: `01-slash-commands/README.md`
|
||||||
|
- **Change**: Fixed "Sonnet 4.5" → "Sonnet 4.6" (only outdated instance found)
|
||||||
|
|
||||||
|
### Task 1.5: Mark SSE transport as deprecated — SKIPPED
|
||||||
|
|
||||||
|
- **Reason**: Already marked as deprecated in `05-mcp/README.md` line 100. No action needed.
|
||||||
|
|
||||||
|
### Task 1.6: Fix `Task()` → `Agent()` rename ✅
|
||||||
|
|
||||||
|
- **File**: `04-subagents/README.md`
|
||||||
|
- **Change**: Updated `Task(agent_type)` → `Agent(agent_type)` in description and YAML example. Added backward-compatibility note about v2.1.63 rename.
|
||||||
|
|
||||||
|
### Task 1.7: Resolve `/todos` conflict ✅
|
||||||
|
|
||||||
|
- **File**: `01-slash-commands/README.md`
|
||||||
|
- **Change**: Removed `/todos` from built-in commands table. Verified it is not listed in official docs at `code.claude.com/docs/en/interactive-mode`. `/tasks` already covers task management.
|
||||||
|
|
||||||
|
### Task 1.8: Resolve memory hierarchy conflict ✅
|
||||||
|
|
||||||
|
- **File**: `02-memory/README.md`
|
||||||
|
- **Change**: Added verification note that `CLAUDE.local.md` is not mentioned in official docs as of March 2026. Kept the entry (may still work as legacy) with recommendation to use `~/.claude/CLAUDE.md` or `.claude/rules/` for new projects.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Phase 2: Missing Commands & Features (Incomplete Content) ✅ COMPLETED
|
||||||
|
|
||||||
|
> **Completed**: 2026-03-13
|
||||||
|
|
||||||
|
Content existed but was missing significant features that shipped in Jan–Mar 2026.
|
||||||
|
|
||||||
|
### Task 2.1: Add missing built-in commands to slash commands table ✅
|
||||||
|
|
||||||
|
- **File modified**: `01-slash-commands/README.md`
|
||||||
|
- **Change**: Added 15 missing commands (`/btw`, `/chrome`, `/diff`, `/extra-usage`, `/feedback`, `/insights`, `/install-slack-app`, `/keybindings`, `/mobile`, `/passes`, `/reload-plugins`, `/remote-control`, `/skills`, `/stickers`, `/upgrade`) in alphabetical order to the built-in commands table
|
||||||
|
|
||||||
|
### Task 2.2: Add bundled skills section ✅
|
||||||
|
|
||||||
|
- **File modified**: `03-skills/README.md`
|
||||||
|
- **Change**: Added "Bundled Skills" section documenting 5 built-in skills (`/simplify`, `/batch`, `/debug`, `/loop`, `/claude-api`) between "Skills vs Other Features" and "Sharing Skills" sections
|
||||||
|
|
||||||
|
### Task 2.3: Add `${CLAUDE_SKILL_DIR}` to skills substitutions ✅
|
||||||
|
|
||||||
|
- **File modified**: `03-skills/README.md`
|
||||||
|
- **Change**: Added `${CLAUDE_SKILL_DIR}` row to the String Substitutions table
|
||||||
|
|
||||||
|
### Task 2.4: Add missing CLI flags — SKIPPED
|
||||||
|
|
||||||
|
- **Reason**: All 19 flags were already documented in `10-cli/README.md` across Core Flags, Model & Configuration, Tool & Permission, Workspace & Directory, MCP Configuration, Session Management, and Advanced Features tables. No action needed.
|
||||||
|
|
||||||
|
### Task 2.5: Update MCP OAuth documentation ✅
|
||||||
|
|
||||||
|
- **File modified**: `05-mcp/README.md`
|
||||||
|
- **Changes**: Added `oauth.authServerMetadataUrl` config section, `ENABLE_CLAUDEAI_MCP_SERVERS=false` env var, and updated MCP scope terminology (Local/User with old name notes). 4 items (`--callback-port`, `--client-id`/`--client-secret`, env var expansion, Tool Search) were already present.
|
||||||
|
|
||||||
|
### Task 2.6: Add missing built-in subagents — SKIPPED
|
||||||
|
|
||||||
|
- **Reason**: "Bash" and "Claude Code Guide" subagents were already fully documented in `04-subagents/README.md` with both table entries and detailed subsections. No action needed.
|
||||||
|
|
||||||
|
### Task 2.7: Add `autoMemoryDirectory` and auto-memory settings ✅
|
||||||
|
|
||||||
|
- **File modified**: `02-memory/README.md`
|
||||||
|
- **Changes**: Added `autoMemoryDirectory` setting (v2.1.74), v2.1.59+ version requirement note, and `claudeMdExcludes` setting for monorepos. 2 items (`CLAUDE_CODE_DISABLE_AUTO_MEMORY` env var, Windows managed policy path) were already present.
|
||||||
|
|
||||||
|
### Task 2.8: Update effort levels ✅
|
||||||
|
|
||||||
|
- **File modified**: `09-advanced-features/README.md`
|
||||||
|
- **Change**: Added visual effort indicators low (○), medium (◐), high (●) in 3 locations. "max" was never mentioned (no removal needed). "ultrathink" note was already present.
|
||||||
|
|
||||||
|
### Task 2.9: Update `/context` command description ✅
|
||||||
|
|
||||||
|
- **File modified**: `01-slash-commands/README.md`
|
||||||
|
- **Change**: Updated `/context` description to "Visualize context usage with actionable optimization suggestions" (combined with Task 2.1)
|
||||||
|
|
||||||
|
### Task 2.10: Add hook events update ✅
|
||||||
|
|
||||||
|
- **File modified**: `06-hooks/README.md`
|
||||||
|
- **Changes**: Added 2 missing hook events (`InstructionsLoaded`, `Setup`) to events table (updated count 16→18), added HTTP hooks v2.1.63 version note, documented `once: true` in field reference, added `agent_id`/`agent_type`/`worktree` fields to JSON input, added `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS` env var. Items already present: 6 other hook events, `last_assistant_message`, component-scoped hooks.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Phase 3: New Feature Coverage (Content Gaps)
|
||||||
|
|
||||||
|
These are significant features that exist in official docs but have no corresponding content in the guide. Each needs a decision: create tutorial content, add a TODO note, or skip.
|
||||||
|
|
||||||
|
### Task 3.1: Create Agent Teams tutorial content
|
||||||
|
|
||||||
|
- **Directory**: `04-subagents/README.md` (add section) or new file
|
||||||
|
- **Content needed**:
|
||||||
|
- What agent teams are vs. subagents (comparison table)
|
||||||
|
- How to enable (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
|
||||||
|
- Starting a team, display modes (in-process vs tmux)
|
||||||
|
- Task assignment, teammate messaging, plan approval
|
||||||
|
- Architecture: team lead, teammates, shared task list, mailbox
|
||||||
|
- Best practices: team size (3-5), task sizing, file conflict avoidance
|
||||||
|
- Limitations (experimental, no session resumption, no nested teams)
|
||||||
|
- **Priority**: High — major new capability
|
||||||
|
- **Source**: `code.claude.com/docs/en/agent-teams`
|
||||||
|
|
||||||
|
### Task 3.2: Create Scheduled Tasks / `/loop` documentation
|
||||||
|
|
||||||
|
- **Directory**: `09-advanced-features/README.md` (add section)
|
||||||
|
- **Content needed**:
|
||||||
|
- `/loop [interval] <prompt>` command usage
|
||||||
|
- Cron scheduling tools for recurring prompts
|
||||||
|
- `CLAUDE_CODE_DISABLE_CRON` env var
|
||||||
|
- Use cases: polling deploys, babysitting PRs
|
||||||
|
- **Priority**: Medium — useful automation feature
|
||||||
|
- **Source**: `code.claude.com/docs/en/scheduled-tasks`
|
||||||
|
|
||||||
|
### Task 3.3: Create Chrome Integration section
|
||||||
|
|
||||||
|
- **Directory**: `09-advanced-features/README.md` (add section)
|
||||||
|
- **Content needed**:
|
||||||
|
- `--chrome` / `--no-chrome` flags
|
||||||
|
- `/chrome` command for configuration
|
||||||
|
- Browser debugging and web testing capabilities
|
||||||
|
- **Priority**: Medium — beta feature but useful for web developers
|
||||||
|
- **Source**: `code.claude.com/docs/en/chrome`
|
||||||
|
|
||||||
|
### Task 3.4: Create Remote Control section
|
||||||
|
|
||||||
|
- **Directory**: `09-advanced-features/README.md` (add section or expand existing)
|
||||||
|
- **Content needed**:
|
||||||
|
- `/remote-control` command (alias `/rc`)
|
||||||
|
- `claude remote-control` CLI subcommand
|
||||||
|
- Controlling local sessions from claude.ai or Claude app
|
||||||
|
- Optional name argument for custom session titles
|
||||||
|
- **Priority**: Medium — enables mobile/cross-device workflows
|
||||||
|
- **Source**: `code.claude.com/docs/en/remote-control`
|
||||||
|
|
||||||
|
### Task 3.5: Document Plugin Marketplaces
|
||||||
|
|
||||||
|
- **File**: `07-plugins/README.md` (add section)
|
||||||
|
- **Content needed**:
|
||||||
|
- Creating and distributing plugin marketplaces
|
||||||
|
- Official marketplace submission (claude.ai/settings/plugins/submit)
|
||||||
|
- `/plugin marketplace` commands
|
||||||
|
- `strictKnownMarketplaces`, `extraKnownMarketplaces` settings
|
||||||
|
- **Priority**: Medium — plugin ecosystem is maturing
|
||||||
|
- **Source**: `code.claude.com/docs/en/plugin-marketplaces`, `code.claude.com/docs/en/discover-plugins`
|
||||||
|
|
||||||
|
### Task 3.6: Document LSP Servers in Plugins
|
||||||
|
|
||||||
|
- **File**: `07-plugins/README.md` (add section)
|
||||||
|
- **Content needed**:
|
||||||
|
- `.lsp.json` configuration format
|
||||||
|
- Language server setup for code intelligence
|
||||||
|
- Example Go/Python/TypeScript LSP configs
|
||||||
|
- **Priority**: Low — niche feature, official marketplace covers common languages
|
||||||
|
- **Source**: `code.claude.com/docs/en/plugins-reference#lsp-servers`
|
||||||
|
|
||||||
|
### Task 3.7: Document Keyboard Shortcuts Customization
|
||||||
|
|
||||||
|
- **File**: `09-advanced-features/README.md` (add section)
|
||||||
|
- **Content needed**:
|
||||||
|
- `/keybindings` command
|
||||||
|
- `~/.claude/keybindings.json` configuration
|
||||||
|
- Available keybinding actions (voice:pushToTalk, chat:newline, etc.)
|
||||||
|
- Context-aware bindings, chord support
|
||||||
|
- **Priority**: Low — power user feature
|
||||||
|
- **Source**: `code.claude.com/docs/en/keybindings`
|
||||||
|
|
||||||
|
### Task 3.8: Document Desktop App
|
||||||
|
|
||||||
|
- **File**: `09-advanced-features/README.md` (expand existing mention)
|
||||||
|
- **Content needed**:
|
||||||
|
- Download links (macOS, Windows, Windows ARM64)
|
||||||
|
- `/desktop` command to hand off session
|
||||||
|
- Visual diff review, multiple sessions, cloud session management
|
||||||
|
- **Priority**: Low — mentioned briefly already, needs expansion
|
||||||
|
- **Source**: `code.claude.com/docs/en/desktop`, `code.claude.com/docs/en/desktop-quickstart`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Phase 4: Reference Document Updates (Cascading Changes)
|
||||||
|
|
||||||
|
After Phases 1-3, these reference documents need updates to reflect all changes.
|
||||||
|
|
||||||
|
### Task 4.1: Update CATALOG.md
|
||||||
|
|
||||||
|
- Sync all command counts (40 → 55+ built-in commands)
|
||||||
|
- Add bundled skills section
|
||||||
|
- Update subagent count and types
|
||||||
|
- Add new hook events
|
||||||
|
- Update MCP features list
|
||||||
|
- Add agent teams as new capability
|
||||||
|
|
||||||
|
### Task 4.2: Update QUICK_REFERENCE.md
|
||||||
|
|
||||||
|
- Add new commands to cheat sheet
|
||||||
|
- Update model names
|
||||||
|
- Add bundled skills shortcuts
|
||||||
|
- Add new CLI flags
|
||||||
|
|
||||||
|
### Task 4.3: Update INDEX.md
|
||||||
|
|
||||||
|
- Add any new files created in Phase 3
|
||||||
|
- Update file counts and descriptions
|
||||||
|
- Verify all cross-references
|
||||||
|
|
||||||
|
### Task 4.4: Update LEARNING-ROADMAP.md
|
||||||
|
|
||||||
|
- Add agent teams to advanced topics
|
||||||
|
- Add scheduled tasks to intermediate topics
|
||||||
|
- Update feature counts
|
||||||
|
- Update self-assessment quiz if needed
|
||||||
|
|
||||||
|
### Task 4.5: Update claude_concepts_guide.md
|
||||||
|
|
||||||
|
- Sync all feature descriptions with Phases 1-3 changes
|
||||||
|
- Update model references
|
||||||
|
- Add new features to relevant sections
|
||||||
|
|
||||||
|
### Task 4.6: Update resources.md
|
||||||
|
|
||||||
|
- Fix official docs URL
|
||||||
|
- Add new official doc pages (agent-teams, scheduled-tasks, chrome, keybindings, etc.)
|
||||||
|
- Verify all external links still work
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Phase 5: Validation (Quality Assurance)
|
||||||
|
|
||||||
|
### Task 5.1: Link validation
|
||||||
|
|
||||||
|
- Check all internal cross-references between files
|
||||||
|
- Verify all external URLs (official docs, GitHub, etc.)
|
||||||
|
- Fix any broken anchor links
|
||||||
|
|
||||||
|
### Task 5.2: Mermaid diagram review
|
||||||
|
|
||||||
|
- Verify all Mermaid diagrams still render correctly
|
||||||
|
- Update any diagrams that reference outdated features/flows
|
||||||
|
|
||||||
|
### Task 5.3: Conflict marker cleanup
|
||||||
|
|
||||||
|
- Review and resolve all `<!-- DOCS-SYNC CONFLICT -->` markers
|
||||||
|
- Get user confirmation on ambiguous items
|
||||||
|
|
||||||
|
### Task 5.4: Consistency check
|
||||||
|
|
||||||
|
- Ensure model names are consistent across all files
|
||||||
|
- Ensure command names match between tables and examples
|
||||||
|
- Ensure version numbers are consistent
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Execution Summary
|
||||||
|
|
||||||
|
| Phase | Tasks | Priority | Estimated Effort |
|
||||||
|
|-------|-------|----------|-----------------|
|
||||||
|
| **Phase 1** | 8 tasks | ✅ Completed 2026-03-13 | Small edits, 1 subagent batch |
|
||||||
|
| **Phase 2** | 10 tasks (2 skipped) | ✅ Completed 2026-03-13 | 6 files modified, 2 already complete |
|
||||||
|
| **Phase 3** | 8 tasks | Valuable — new feature tutorials | New content creation, 3-4 subagent batches |
|
||||||
|
| **Phase 4** | 6 tasks | Required — cascade reference updates | Medium edits after Phases 1-3 |
|
||||||
|
| **Phase 5** | 4 tasks | Required — quality gate before merge | Automated + manual review |
|
||||||
|
|
||||||
|
**Total**: 36 tasks across 5 phases
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- All changes should preserve the repo's existing style: logo headers, Mermaid diagrams, table formatting, code block language tags, heading hierarchy
|
||||||
|
- Use `Edit` tool (not `Write`) for modifications to existing files
|
||||||
|
- Launch parallel subagents per directory for Phase 2-3 efficiency
|
||||||
|
- Phase 4 must run sequentially after Phases 1-3 since reference docs depend on category content
|
||||||
Reference in New Issue
Block a user