10. Reference
📌 Section 10 TL;DR (1 minute)
Section titled “📌 Section 10 TL;DR (1 minute)”What’s inside: Complete command reference, troubleshooting guides, and daily checklists.
Quick Navigation by Need:
Section titled “Quick Navigation by Need:”| I need to… | Go to |
|---|---|
| Look up a command | 10.1 Commands Table |
| Find keyboard shortcut | 10.2 Keyboard Shortcuts |
| Configure settings | 10.3 Configuration Reference |
| Fix an error | 10.4 Troubleshooting |
| Quick daily reference | 10.5 Cheatsheet |
| Set up workflow | 10.6 Daily Workflow |
| Copy ready-to-use templates | examples/ directory — Commands, hooks, agents |
Most Common Lookups:
Section titled “Most Common Lookups:”- Context full? → 10.4.1 Context Issues
- MCP not working? → 10.4.4 MCP Troubleshooting
- Need clean reinstall? → 10.4.3 Full Reinstall
Usage tip: Bookmark this section — you’ll reference it often.
Purpose: Quick lookup for all Claude Code information
10.1 Commands Table
Section titled “10.1 Commands Table”Built-in Commands
Section titled “Built-in Commands”| Command | Action | Category |
|---|---|---|
/help | Show all available commands | Navigation |
/clear | Clear conversation history | Session |
/compact | Summarize and compress context | Context |
/status | Show session info (context, cost) | Info |
/usage | Check rate limits and token allocation | Info |
/stats | View usage statistics with activity graphs | Info |
/output-style | Change response format (concise/detailed/code) | Display |
/feedback | Report bugs or send feedback to Anthropic | Support |
/chrome | Check Chrome connection, manage permissions | Mode |
/config | View and modify global settings | Config |
/copy | Copy last response to clipboard — interactive picker to select specific code blocks, or “Always copy full response” option (v2.1.59+) | Session |
/debug | Systematic troubleshooting and error investigation | Debug |
/doctor | Run diagnostics and troubleshooting checks | Debug |
/execute | Exit Plan Mode | Mode |
/exit | Exit Claude Code | Session |
/fast | Toggle fast mode (Opus 4.6, 2.5x faster, 6x price) | Mode |
/hooks | Interactive hook configuration | Config |
/init | Generate starter CLAUDE.md based on project structure | Config |
/login | Log in to Claude account | Auth |
/logout | Log out and re-authenticate | Auth |
/loop [interval] [prompt] | Run a prompt or slash command on a recurring interval (e.g. /loop 5m check the deploy) — v2.1.71+ | Automation |
/mcp | Manage Model Context Protocol servers | Config |
/memory | View and edit auto-memory (context Claude automatically saved across sessions via MEMORY.md) — v2.1.59+ | Config |
/mobile | Show App Store and Google Play download links | Info |
/model | Change model (with left/right arrows for effort slider) | Mode |
/permissions | Configure permission allowlists | Config |
/plan | Enter Plan Mode | Mode |
/plugin | Browse and install Claude Code plugins | Config |
/remote-control (/rc) | Start remote control session (Pro/Max only) | Mode |
/rename | Give current session a descriptive name | Session |
/resume | Resume a previous session (from within a session) | Session |
/rewind | Open rewind menu to undo recent changes | Edit |
/sandbox | Enable OS-level isolation | Config |
Ctrl+D | Exit Claude Code | Session |
Quick Actions
Section titled “Quick Actions”| Action | Shortcut |
|---|---|
| Run shell command | !command |
| Reference file | @filename |
| Cancel operation | Ctrl+C |
| Search history | Ctrl+R |
| Dismiss suggestion | Esc |
10.2 Keyboard Shortcuts
Section titled “10.2 Keyboard Shortcuts”Session Control
Section titled “Session Control”| Shortcut | Action |
|---|---|
Enter | Send message |
Shift+Enter | New line in message |
Ctrl+C | Cancel current operation |
Ctrl+D | Exit Claude Code |
Ctrl+R | Search command history |
Ctrl+L | Clear screen (keeps context) |
Ctrl+B | Run command in background |
Esc | Stop Claude mid-action (context preserved) |
Esc×2 (double-tap) | Open rewind menu (same as /rewind) |
Input & Navigation
Section titled “Input & Navigation”| Shortcut | Action |
|---|---|
Ctrl+A | Jump to beginning of line |
Ctrl+E | Jump to end of line |
Ctrl+W | Delete previous word |
Ctrl+G | Open plan in external text editor for editing |
Tab | Autocomplete file paths |
↑ / ↓ | Navigate command history |
Mode & Model Toggles
Section titled “Mode & Model Toggles”| Shortcut | Action |
|---|---|
Alt+T (Option+T on macOS) | Toggle thinking mode on/off |
Ctrl+O | View thinking blocks |
Voice Input
Section titled “Voice Input”| Shortcut | Action |
|---|---|
Space (hold) | Push-to-talk — hold to speak, release to send (default binding) |
Rebinding: The voice:pushToTalk binding is configurable in ~/.claude/keybindings.json (v2.1.71+). Add a custom binding if Space conflicts with your workflow:
{ "voice:pushToTalk": "ctrl+space"}Toggle voice on/off with /voice. The push-to-talk binding only activates when voice mode is active.
Agent Teams Navigation
Section titled “Agent Teams Navigation”| Shortcut | Action |
|---|---|
Shift+Down | Cycle through active teammates (in-process mode) |
Ctrl+T | Toggle task list visibility |
Enter | View selected teammate’s session |
Escape | Interrupt current turn, return to prompt |
Useful Flag Combinations
Section titled “Useful Flag Combinations”| Flags | Purpose | Example |
|---|---|---|
-c -p "msg" | Resume session + single prompt | claude -c -p "run tests" |
-r <id> -p | Resume specific session + prompt | claude -r abc123 -p "check status" |
-p -p | Non-interactive automation | claude -p -p "lint fix" < errors.txt |
Note: Combine resume flags with
-pfor scripting and CI/CD workflows.
10.3 Configuration Reference
Section titled “10.3 Configuration Reference”CLAUDE.md Locations
Section titled “CLAUDE.md Locations”| Location | Scope | Committed |
|---|---|---|
~/.claude/CLAUDE.md | All projects (global) | N/A |
/project/CLAUDE.md | This project (shared) | ✅ Yes |
/project/CLAUDE.local.md | This project (local overrides) | ❌ No (.gitignored) |
/project/.claude/CLAUDE.md | Personal project config | ❌ No |
| Parent/child directories | Auto-loaded in monorepos | Depends on location |
Settings Files
Section titled “Settings Files”| File | Purpose | Committed |
|---|---|---|
settings.json | Hook configuration | ✅ Yes |
settings.local.json | Permission overrides | ❌ No |
Permission Patterns
Section titled “Permission Patterns”| Pattern | Matches |
|---|---|
Bash(git *) | Any git command |
Bash(npm test) | Exactly npm test |
Edit | All file edits |
Write | All file writes |
WebSearch | Web search |
mcp__serena__* | All Serena tools |
Read(file_path:*.env*) | Block reading any .env* file path |
Edit(file_path:*.pem) | Block editing .pem certificates |
Bash(command:*rm -rf*) | Block destructive bash commands |
CLI Flags Reference
Section titled “CLI Flags Reference”Complete reference for all Claude Code command-line flags.
| Flag | Description | Example |
|---|---|---|
-p, --print | Print response and exit (non-interactive) | claude -p "analyze app.ts" |
--output-format | Output format (text/json/stream-json) | claude --output-format json |
--json-schema | JSON Schema for structured output validation | claude --json-schema '{"type":"object","properties":{"name":{"type":"string"}}}' |
--input-format | Input format (text/stream-json) | claude --input-format stream-json |
--replay-user-messages | Re-emit user messages in stream | claude --replay-user-messages |
--allowedTools | Whitelist specific tools | claude --allowedTools "Edit,Read,Bash(git *)" |
--disallowedTools | Blacklist specific tools | claude --disallowedTools "WebFetch" |
--mcp-config | Load MCP servers from JSON file | claude --mcp-config ./mcp.json |
--strict-mcp-config | Only use MCP servers from config | claude --strict-mcp-config |
--plugin-dir | Load plugins from directory (repeatable) | claude --plugin-dir ~/.claude/plugins |
--append-system-prompt | Add to system prompt | claude --append-system-prompt "Use TypeScript" |
--permission-mode | Permission mode (default/acceptEdits/plan/dontAsk/bypassPermissions) | claude --permission-mode plan |
--model | Model selection | claude --model sonnet |
--max-budget-usd | Maximum API spend limit (with --print only) | claude -p "analyze" --max-budget-usd 5.00 |
--tools | Enable specific tools for the session | claude --tools "Edit,Read,Bash" |
--agent | Specify agent for session | claude --agent security-reviewer |
--system-prompt | Override system prompt entirely | claude --system-prompt "You are a reviewer" |
--add-dir | Allow tool access to additional directories | claude --add-dir ../shared ../utils |
--worktree / -w | Run in isolated git worktree | claude --worktree |
--continue | Continue last conversation (in current directory) | claude --continue |
-r, --resume | Resume session by ID or show picker | claude --resume abc123 |
--dangerously-skip-permissions | Skip all permission prompts | claude --dangerously-skip-permissions |
--debug | Enable debug mode (supports categories: "api,mcp") | claude --debug |
--verbose | Verbose output | claude --verbose |
--version | Show version | claude --version |
Note: This table covers the most commonly used flags. The full CLI reference (~45 flags) is available at docs.anthropic.com.
Common Combinations:
# CI/CD mode - non-interactive with auto-acceptclaude -p "fix linting errors" --dangerously-skip-permissions
# JSON output for scriptingclaude -p "analyze code quality" --output-format json
# Economic analysis with Haikuclaude -p "review this file" --model haiku
# Allow access to a directory outside CWDclaude --add-dir ./src/components
# Plan mode for safetyclaude --permission-mode plan
# Multi-directory projectclaude --add-dir ../shared-lib ../utils ../configSafety Guidelines:
| Flag | Risk Level | Use When |
|---|---|---|
--dangerously-skip-permissions | 🔴 High | Only in CI/CD, never on production |
--allowedTools | 🟢 Safe | Restricting tool access |
--disallowedTools | 🟢 Safe | Blocking specific tools |
--permission-mode plan | 🟢 Safe | Read-only exploration |
--debug | 🟡 Medium | Troubleshooting (verbose logs) |
10.4 Troubleshooting
Section titled “10.4 Troubleshooting”Interactive Troubleshooting: Use the
/diagnosecommand for guided, interactive problem-solving. It auto-scans your environment and provides targeted solutions. See examples/commands/diagnose.md.
Quick Diagnostic Guide
Section titled “Quick Diagnostic Guide”Use this symptom-based guide for rapid issue identification and resolution:
| Symptom | Likely Cause | Quick Fix | Prevention |
|---|---|---|---|
| ”Context too long” error | Session accumulated too much context | /compact first, then /clear if needed | Compact regularly at 70% |
| Slow/delayed responses | High context usage (>75%) | Check /status, run /compact | Monitor context with /status |
| ”Rate limit exceeded” | API throttling from frequent requests | Wait 2 minutes, use --model haiku for simple tasks, or use cc-copilot-bridge for flat-rate access | Batch operations, use /compact, consider Copilot Pro+ |
| Claude forgets instructions | Context overflow, CLAUDE.md lost | Create checkpoint, /clear, reload CLAUDE.md | Keep CLAUDE.md concise (<500 lines) |
| MCP server not connecting | Server crashed or config error | claude mcp list, check paths, restart server | Test servers after config changes |
| Permission prompts every time | Tool not in allowedTools | Add pattern to settings.json allowedTools | Use wildcards: Bash(git *) |
| Changes not taking effect | Cached configuration | Restart Claude Code session | Use /exit before config changes |
| Session won’t resume | Corrupted session file | Start fresh with /clear | Exit cleanly with /exit or Ctrl+D |
Quick Diagnosis Flow:
- Check context:
/status→ If >70%, run/compact - Check connectivity: Try simple command → If fails, check network
- Check configuration:
claude mcp list→ Verify MCP servers - Check permissions: Review error message → Add to allowedTools if needed
- Still failing:
/doctor→ Run diagnostics and verify system health
Common Issues Reference
Section titled “Common Issues Reference”| Symptom | Cause | Solution |
|---|---|---|
| ”Context too long” | Used 100% context | /clear or /compact |
| Slow responses | High context usage | /compact |
| ”Permission denied” | Security settings | Check settings.local.json |
| Hook not running | Registration error | Check settings.json matcher |
| MCP tool not found | Server not running | Check mcp.json config |
| Agent not found | File naming | Check .claude/agents/ |
| Command not found | Path error | Check .claude/commands/ |
Context Recovery
Section titled “Context Recovery”| Context Level | Recommended Action |
|---|---|
| 0-50% | Continue normally |
| 50-75% | Be more specific in queries |
| 75-90% | Use /compact |
| 90%+ | Use /clear |
Common Errors
Section titled “Common Errors”“Tool execution failed”
- Check tool permissions in
settings.local.json - Verify command syntax
- Check for missing dependencies
“Agent not available”
- Verify agent file exists in
.claude/agents/ - Check YAML frontmatter syntax
- Restart Claude Code session
“Hook blocked operation”
- Check hook exit code (2 = blocked)
- Review hook error message
- Adjust hook rules if needed
MCP Server Issues
Section titled “MCP Server Issues”Common MCP Errors and Solutions
Error 1: Tool Name Validation Failed
Section titled “Error 1: Tool Name Validation Failed”API Error 400: "tools.11.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}'"Cause: MCP server name contains invalid characters.
Solution:
- Server names must only contain: letters, numbers, underscores, hyphens
- Maximum 64 characters
- No special characters or spaces
Example:
# ❌ Wrongclaude mcp add my-server@v1 -- npx server
# ✅ Correctclaude mcp add my-server-v1 -- npx serverError 2: MCP Server Not Found
Section titled “Error 2: MCP Server Not Found”MCP server 'my-server' not foundCause: Server not properly registered or wrong scope.
Solution:
- Check scope settings (local/user/project)
Terminal window claude mcp list # Verify server is listed - Ensure you’re in the correct directory for local scope
- Restart Claude Code session
- Re-add server if needed:
Terminal window claude mcp add my-server -s user -- npx @my/server
Error 3: Windows Path Issues
Section titled “Error 3: Windows Path Issues”Error: Cannot find module 'C:UsersusernameDocuments'Cause: Backslashes in Windows paths not properly escaped.
Solution:
# ❌ Wrongclaude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem C:\Users\username\Documents
# ✅ Correct - Use forward slashesclaude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem C:/Users/username/Documents
# ✅ Correct - Escape backslashesclaude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem "C:\\Users\\username\\Documents"MCP Debugging Techniques
Section titled “MCP Debugging Techniques”Enable Debug Mode:
# Debug all MCP connectionsclaude --mcp-debug
# View MCP status inside Claude Code/mcpView Log Files:
# macOStail -f ~/Library/Logs/Claude/mcp*.log
# Linuxtail -f ~/.local/share/claude/logs/mcp*.log
# Windows (PowerShell)Get-Content "$env:APPDATA\Claude\logs\mcp*.log" -Wait -Tail 50Manual Server Test:
# Test if server works standalonenpx -y @modelcontextprotocol/server-filesystem ~/Documents
# Expected: Server should start and output JSON-RPC messages# If it crashes immediately, check server logsQuick Diagnostic Commands:
# List all configured serversclaude mcp list
# Test specific serverclaude --mcp-debug -p "List available tools"
# Remove and re-add serverclaude mcp remove my-serverclaude mcp add my-server -s user -- npx @my/serverConnection Failed: Common Causes
| Error | Cause | Solution |
|---|---|---|
ECONNREFUSED | Server not running | Check mcp.json command is correct |
Timeout after 30s | Slow initialization | Increase timeout or check server logs |
Module not found | Missing dependencies | Run npm install in server directory |
Permission denied | File access | Check file permissions on server executable |
ENOENT | Server binary not found | Verify npx/npm is in PATH |
Invalid JSON | Server output malformed | Check server version compatibility |
Serena MCP specific issues:
# Index not foundserena list-memories# If empty, re-index:# In your project, ask Claude: "Index this project with Serena"
# Session not persisting# Check mcp.json has correct data directory:{ "mcpServers": { "serena": { "command": "npx", "args": ["-y", "@serenaai/serena-mcp"], "env": { "SERENA_DATA_DIR": "/absolute/path/to/.serena" } } }}Context7 MCP issues:
# Documentation not found# Ensure you're searching for official libraries:# ✅ "React useState documentation"# ❌ "my-custom-lib documentation" (not in Context7)
# Slow lookups# Context7 fetches from official docs - network dependent# Check your internet connectionSequential Thinking MCP issues:
# "Sequential not responding"# Sequential uses significant compute - expect 10-30s responses# Not an error, just be patient
# Quality seems off# Sequential works best with specific, well-defined problems# ✅ "Debug why user authentication fails on mobile"# ❌ "Make the app better"Permission Issues
Section titled “Permission Issues”Pattern matching problems:
// ❌ Wrong - too specific{ "allowedTools": ["Bash(npm test)"]}// This ONLY allows exactly "npm test"
// ✅ Right - use wildcards{ "allowedTools": ["Bash(npm *)"]}// This allows any npm commandCommon permission patterns:
{ "allowedTools": [ "Bash(git *)", // All git commands "Bash(npm *)", // All npm commands "Bash(pytest *)", // All pytest commands "Edit", // All file edits "Write", // All file writes "Read", // All file reads "mcp__serena__*", // All Serena tools "mcp__context7__*", // All Context7 tools "Task" // Allow agent delegation ]}Timeout Issues
Section titled “Timeout Issues”Claude stops responding mid-task:
Possible causes:
- Network interruption - Check your internet connection
- API rate limit - Wait 1-2 minutes and retry
- Context exhausted - Use
/compactor/clear - Long-running operation - Some MCP operations take 30s+
Workaround for long operations:
# Instead of:"Analyze all 500 files in the codebase"
# Break into chunks:"Analyze files in /src/components/ first""Now analyze /src/utils/""Finally analyze /src/services/"Installation Issues
Section titled “Installation Issues”Windows-specific problems:
# npm global install fails# Run PowerShell as Administratornpm install -g @anthropic-ai/claude-code
# PATH not updated# Manually add to PATH:$env:Path += ";$env:APPDATA\npm"
# Permission errors# Check antivirus isn't blocking Node.jsmacOS-specific problems:
# "Command not found" after install# Check shell config loaded:source ~/.zshrc # or ~/.bashrc
# Permission denied on /usr/local# Don't use sudo with npm# Fix permissions:sudo chown -R $(whoami) /usr/local
# curl install blocked# Check firewall/VPN settingsLinux-specific problems:
# npm not found# Install Node.js first:curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -sudo apt-get install -y nodejs
# Global install permission issues# Configure npm to use home directory:mkdir ~/.npm-globalnpm config set prefix '~/.npm-global'echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcsource ~/.bashrcOne-Shot Health Check Scripts
Section titled “One-Shot Health Check Scripts”Diagnostic scripts for instant troubleshooting. Get them from:
- Windows:
examples/scripts/check-claude.ps1 - macOS/Linux:
examples/scripts/check-claude.sh - Bridge health:
python examples/scripts/bridge.py --health(LM Studio connectivity)
Full Clean Reinstall Procedures
Section titled “Full Clean Reinstall Procedures”⚠️ Nuclear option for corrupted installations. Use when all else fails.
Get the scripts from:
- Windows:
examples/scripts/clean-reinstall-claude.ps1 - macOS/Linux:
examples/scripts/clean-reinstall-claude.sh
When to use clean reinstall:
- Mysterious errors that persist after normal troubleshooting
- Corrupted configuration files
- Breaking changes after Claude Code updates
- Migration to new machine (export/import workflow)
What gets deleted:
- ✓ Claude Code binary and npm packages
- ✓ Downloaded models and cache
- ✓ Local session data
- ⚠️ Config file (optional - backed up by default)
What survives:
- ✓ Project-level
.claude/folders - ✓ Project
CLAUDE.mdfiles - ✓ Custom agents, skills, commands, hooks (in projects)
- ✓ MCP server configurations (in
mcp.json)
10.5 Cheatsheet
Section titled “10.5 Cheatsheet”One-Page Quick Reference
Section titled “One-Page Quick Reference”╔══════════════════════════════════════════════════════════╗║ CLAUDE CODE CHEATSHEET ║╠══════════════════════════════════════════════════════════╣║ ║║ ESSENTIAL COMMANDS ║║ ───────────────── ║║ /help Show commands /clear Fresh start ║║ /status Session info /compact Save context ║║ /plan Safe mode /rewind Undo changes ║║ /exit Quit Ctrl+C Cancel ║║ ║║ QUICK ACTIONS ║║ ───────────── ║║ !command Run shell @file Reference file ║║ Ctrl+R Search ↑/↓ History ║║ ║║ CONTEXT MANAGEMENT ║║ ────────────────── ║║ 🟢 0-50% Work freely ║║ 🟡 50-75% Be selective ║║ 🔴 75-90% /compact now ║║ ⚫ 90%+ /clear required ║║ ║║ PERMISSION MODES ║║ ──────────────── ║║ Default Ask before changes ║║ Auto-accept Execute without asking ║║ Plan Mode Read-only exploration ║║ ║║ CONFIGURATION ║║ ───────────── ║║ ~/.claude/CLAUDE.md Global settings ║║ /project/CLAUDE.md Project settings ║║ .claude/settings.json Hooks config ║║ .claude/settings.local.json Permission overrides ║║ ║║ .claude/ FOLDER ║║ ─────────────── ║║ agents/ Custom agents commands/ Slash commands ║║ hooks/ Event scripts rules/ Auto-load rules ║║ skills/ Knowledge modules ║║ ║║ THINKING MODE (Opus 4.5/4.6: adaptive depth in 4.6) ║║ ───────────────────────────────────────── ║║ Alt+T Toggle on/off Current session ║║ /config Global setting Persists across sessions ║║ Note: "ultrathink" keywords are now cosmetic only ║║ ║║ MCP SERVERS ║║ ─────────── ║║ Serena Semantic code analysis ║║ Context7 Library documentation ║║ Sequential Structured reasoning ║║ Postgres Database queries ║║ Playwright Browser automation ║║ ║║ HOOKS (events) ║║ ────────────── ║║ PreToolUse Before tool (security) ║║ PostToolUse After tool (format, log) ║║ UserPromptSubmit On message (enrich context) ║║ ║║ WORKFLOW ║║ ──────── ║║ Describe → Analyze → Review → Accept/Reject → Verify ║║ ║║ BEST PRACTICE: Always read the diff before accepting! ║║ ║╚══════════════════════════════════════════════════════════╝10.6 Daily Workflow & Checklists
Section titled “10.6 Daily Workflow & Checklists”Daily Workflow Pattern
Section titled “Daily Workflow Pattern”┌─────────────────────────────────────────────────────────────┐│ DAILY WORKFLOW │├─────────────────────────────────────────────────────────────┤│ ││ MORNING (Setup) ││ ─────────────── ││ □ Git pull latest changes ││ □ Review context with /status ││ □ Load project memory (/sc:load if using Serena) ││ □ Review yesterday's progress ││ ││ WORK SESSION ││ ──────────── ││ □ Define task clearly before starting ││ □ Use TodoWrite for multi-step work ││ □ Commit after each completed task ││ □ /compact when context >70% ││ □ Take breaks every 90 minutes ││ ││ END OF DAY ││ ────────── ││ □ Commit all work in progress ││ □ Save session (/sc:save) ││ □ Note blockers or next steps ││ □ Push to remote ││ │└─────────────────────────────────────────────────────────────┘Prompt Quality Checklist
Section titled “Prompt Quality Checklist”Use this before sending complex requests:
□ WHAT: Clear deliverable described?□ WHERE: File paths/locations specified?□ HOW: Constraints/approach mentioned?□ WHY: Context for decision-making?□ VERIFY: Success criteria defined?Example applying checklist:
❌ Vague: "Add user authentication"
✅ Complete:"Add JWT authentication to the /api/login endpoint.- WHERE: src/api/auth/login.ts- HOW: Use jsonwebtoken library (already in deps), bcrypt for password comparison- CONSTRAINTS: Token expires in 24h, include userId and role- VERIFY: Test with wrong password, expired token, invalid token"Appendix: Templates Collection
Section titled “Appendix: Templates Collection”💡 Production-Ready Examples: For complete, battle-tested templates including advanced commands (
/pr,/release-notes,/sonarqube) and security hooks, see theexamples/directory. The templates below are minimal starting points.
A.1 Agent Template
Section titled “A.1 Agent Template”---name: your-agent-namedescription: Use this agent when [specific trigger]model: sonnettools: Read, Write, Edit, Bash, Grep, Globskills: []---
# Agent Name
## Role DefinitionYou are an expert in [domain].
## Activation TriggersUse this agent when:- [Trigger 1]- [Trigger 2]
## Methodology1. [Step 1]2. [Step 2]3. [Step 3]
## Output Format[Expected deliverables]
## Examples[Concrete usage examples]A.2 Skill Template
Section titled “A.2 Skill Template”---name: skill-namedescription: Expert guidance for [domain]allowed-tools: Read Grep Bash---
# Skill Name
## Expertise Areas- [Area 1]- [Area 2]
## Methodology1. [Step 1]2. [Step 2]
## Checklists- [ ] [Check 1]- [ ] [Check 2]
## Examples[Good and bad patterns]A.3 Command Template
Section titled “A.3 Command Template”# Command Name
## Purpose[What this command does]
## Process1. **Step 1**: [Instructions]2. **Step 2**: [Instructions]
## Arguments- $ARGUMENTS[0] (or $0): First argument - [How to handle]- $ARGUMENTS[1] (or $1): Second argument - [How to handle]
## Output Format[Expected output]A.4 Hook Templates
Section titled “A.4 Hook Templates”PreToolUse (Security)
Section titled “PreToolUse (Security)”#!/bin/bashINPUT=$(cat)COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // ""')
# Block dangerous patterns[[ "$COMMAND" =~ "dangerous-pattern" ]] && { echo "BLOCKED" >&2; exit 2; }
exit 0PostToolUse (Formatting)
Section titled “PostToolUse (Formatting)”#!/bin/bashINPUT=$(cat)FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // ""')
# Auto-format[[ "$FILE_PATH" =~ \.(ts|tsx)$ ]] && npx prettier --write "$FILE_PATH" 2>/dev/null
exit 0UserPromptSubmit (Context)
Section titled “UserPromptSubmit (Context)”#!/bin/bashCONTEXT="[Custom context here]"cat << EOF{"hookSpecificOutput":{"additionalContext":"$CONTEXT"}}EOFexit 0A.5 settings.json Template
Section titled “A.5 settings.json Template”{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [{"type": "command", "command": ".claude/hooks/security.sh", "timeout": 5000}] } ], "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [{"type": "command", "command": ".claude/hooks/format.sh"}] } ], "UserPromptSubmit": [ { "matcher": "", "hooks": [{"type": "command", "command": ".claude/hooks/context.sh"}] } ] }}A.6 settings.local.json Template
Section titled “A.6 settings.local.json Template”{ "permissions": { "allow": [ "Bash(git *)", "Bash(npm test)", "Bash(pnpm *)", "Edit", "Write" ], "deny": [ "Bash(rm -rf *)", "Bash(sudo *)" ], "ask": [ "Bash(npm publish)", "Bash(git push --force)" ] }}A.7 CLAUDE.md Template
Section titled “A.7 CLAUDE.md Template”# Project Name
## Tech Stack- [Technology 1]- [Technology 2]
## Code Conventions- [Convention 1]- [Convention 2]
## Architecture- [Pattern 1]- [Pattern 2]
## Commands- `npm run dev` - Start development- `npm test` - Run tests11. AI Ecosystem: Complementary Tools
Section titled “11. AI Ecosystem: Complementary Tools”Quick jump: Why Complementarity · Tool Matrix · Practical Workflows · Integration Patterns
Reading time: 10 minutes
Skill level: Intermediate
Goal: Chain Claude Code with the right AI tools for optimal workflows
TL;DR: Claude Code excels at contextual reasoning and multi-file implementation. Combine it with Perplexity (research), Gemini (images), Kimi (slides), and NotebookLM (synthesis) for a complete AI-powered development workflow.