Claude Code — Field Guide
Skills worth knowing
| Skill | When to use |
|---|---|
| /plan | Any task touching more than 1 file or with unclear scope |
| /wrap-up | End of every session — saves context to memory |
| /mem-search | Find past decisions, bugs fixed, context from earlier sessions |
| /commit | Structured commits with co-author tag |
| /resume | Start of session — loads recent context |
CLAUDE.md patterns that work
Rules need to be specific. Bad:
Always be careful with the database.
Good:
Before running any DELETE query, confirm the WHERE clause with the user.
Never use `DROP TABLE` without explicit approval.
Organize by domain. Keep it short — Claude reads the whole file every session. If it's getting long, split into rules/ subdirectories and @import them.
Hook patterns
Hooks run shell commands on Claude Code events. Set them in settings.json.
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{ "type": "command", "command": "echo 'File edited' >> ~/claude-log.txt" }]
}],
"Stop": [{
"hooks": [{ "type": "command", "command": "claude /wrap-up" }]
}]
}
}
Most useful hooks:
- PreToolUse — validate before risky Bash commands. Block
rm -rf,DROP TABLE, force pushes. - PostToolUse — auto-save, auto-format, trigger tests after edits.
- Stop — auto wrap-up every session. Never lose context again.
Agent routing
| Task size | Approach |
|---|---|
| 1 file, clear scope | Inline — no agent |
| 2–5 files, defined task | Agent tool with sonnet subagent |
| Cross-domain, architectural | orchestrator — delegates to specialists |
The orchestrator is expensive. Don't call it for simple tasks. Don't do complex tasks inline without it.
Memory system
Session memory lives in Pinecone via the mcp__memory-system__ tools:
ingest_file— index a file or document into memorysearch_pinecone— semantic search across all past sessionssearch_wiki— search the structured knowledge baseupdate_wiki_page— write persistent facts to the wiki
The wiki is for things that are always true. Pinecone is for things that happened. Know the difference.