Everything you actually need to drive Claude Code well — built around your workflow, not a generic tutorial. Updatable section-by-section as Anthropic ships changes.
If you've got Pro/Max or an API key, you've got Claude Code. The install hasn't changed materially in months.
# install npm install -g @anthropic-ai/claude-code # verify claude --version # first session — drops you in the cwd cd ~/Trading/NHous_TBOT claude
| Flag | What |
|---|---|
claude "prompt" | Non-interactive — run prompt, get answer, exit. Good for shell pipelines. |
claude --resume | Pick from recent sessions to continue. Aliased claude -c for "continue last". |
claude --model opus | Force Opus for this session. |
claude --dir /path | Start in a specific directory. |
claude --print "..." | Same as the unflagged one-shot — prints and exits. Pipe-friendly. |
/init in the project to drop a starter CLAUDE.md, run /permissions to see what's allowed, run /cost at the end of your first task so you know what things actually cost.The shape of a productive session — built around how you actually work: bursts, parallel projects, momentum-first.
cd into the project — or use your work alias.claude to open a session. Immediately /rename <short-name> so you can find it later.RegimeMemoryAgent." Not "look at this code."/cost to check the bill. /compact if you're staying. Close cleanly if you're done./cost closes the loop so the spend stays visible.| Command | What & when |
|---|---|
/init | Drop a starter CLAUDE.md in this project. Run once per repo. |
/rename <name> | Name this session. Do it within 30s of starting. Future-you needs this when you have three sessions running. |
/model <name> | Switch mid-session. /model opus, /model sonnet, /model haiku. Drop to Haiku for reads, jump to Opus for hard reasoning. |
/cost | Tokens + dollars for the current session. Run it after expensive ops. |
/compact [focus] | Compress conversation history. Add a focus hint to keep what matters. Run at ~80% context, not 95%. |
/clear | Wipe conversation, keep files. Fresh start without leaving the project. |
/memory | Open the nearest CLAUDE.md in your editor. Save = reloaded immediately. |
/agents | List, create, configure subagents. |
/mcp | Manage MCP servers — list, add, remove. |
/permissions | What can Claude do — review and adjust. |
/resume | Pick a recent session to continue. |
/help | Full list. When in doubt. |
| Keys | What |
|---|---|
| Shift+Tab | Plan mode toggle. Review the plan before Claude executes. Single most-used shortcut. |
| Ctrl+C (once) | Pause current operation gracefully. |
| Ctrl+C (twice) | Hard abort. |
| Esc | Cancel pending input / step back from a prompt. |
| Ctrl+D | Close session (saves history). |
| ↑ / ↓ | Walk through previous prompts in this session. |
? | Show in-session help. |
/ | Open the slash command palette. |
CLAUDE.md is how Claude remembers who you are and what this project is, between sessions. Treat it like documentation that pays for itself every run.
# Most-general → most-specific (later overrides earlier) ~/.claude/CLAUDE.md # global (every project) <repo>/.claude/CLAUDE.md # project hidden-dir <repo>/CLAUDE.md # project root <repo>/path/to/sub/CLAUDE.md # nested wins inside its tree
Things true everywhere: who you are, how you make decisions, the filter questions, the "never do" list. You already have a strong one — the SolHous + income-urgency context.
What this codebase is, current state, key files, current goal, what NOT to do here. Update at the end of each session — three sentences is fine.
When part of a project has different rules than the rest. Example: tests/CLAUDE.md for testing conventions, infra/CLAUDE.md for deploy gotchas.
# <Project Name> ## What this is One paragraph. What it does, who it's for, what shape the code is. ## Current state (update each session) - Active focus: <the one thing> - Blocked on: <or "nothing"> - Next session: <your future self will thank you> ## Key files - `src/foo.py` — <one line about why this is load-bearing> - `docs/ARCHITECTURE.md` — <the design doc> ## House rules - <e.g.> Don't run migrations against prod. Ask first. - <e.g.> `uv`, not pip. `pnpm`, not npm. - <e.g.> Format on save. Test before commit.
Three models. Different jobs. Route reads to Haiku, default to Sonnet, escalate to Opus when the problem really needs reasoning. Mid-session swapping via /model.
/cost climbing fast.You run T-BOT, designdna, EntitleFlow, the portfolio. You can run two Claude Code sessions on the same repo at the same time — git worktrees make it safe.
# Terminal 1 — main branch session cd ~/Trading/NHous_TBOT claude /rename tbot-main # Terminal 2 — same repo, different branch, separate working dir git worktree add ../NHous_TBOT-cci feat/cci-indicator cd ../NHous_TBOT-cci claude /rename tbot-cci-feature # When you merge the feature branch, clean up git worktree remove ../NHous_TBOT-cci
/rename within 30 seconds of opening or you'll lose track.Subagents are scoped workers your main session spawns. They have their own tools, model, and prompt — your main context stays clean. This is where Claude Code stops being a chatbot and starts being a team.
| Agent | Default model | Use |
|---|---|---|
Explore | Haiku 4.5 | Fast read-only codebase search. Throwaway exploration. |
Plan | Opus 4.7 | Strategy + planning before implementation. |
general-purpose | Sonnet 4.6 | Default for multi-step research + modification. |
Drop a markdown file at .claude/agents/<name>.md (project) or ~/.claude/agents/<name>.md (global):
---
name: trade-log-analyst
description: Read-only analyzer for ICC trade journals and CSV exports
model: claude-haiku-4-5
tools:
- Read
- Glob
- Grep
---
You are a focused trade-log analyst. Your job:
1. Read paper-trade journal entries and CSVs.
2. Summarize win rate, R-multiple distribution, drift from rules.
3. Flag cycles where SL was wider than 1.5x ATR.
Never modify files. Output Markdown only.
A Skill is a reusable template that teaches Claude how to do a specific task your way. SKILL.md + supporting files in a folder.
~/.claude/skills/<skill-name>/SKILL.md # global <repo>/.claude/skills/<skill-name>/SKILL.md # project
---
name: nervahous-carousel
description: |
Use when generating Instagram carousel copy for NervaHous.
Triggers on "carousel", "IG post", "draft a carousel".
---
# NervaHous Carousel Skill
When asked to draft a carousel:
1. Pick a pillar (How-To Lab, The Stack, Concepts That Click, The Path, What Changed)
2. Hook in <7 words on the cover
3. 5-7 slides max, one idea per slide
4. CTA closer matching brand voice
5. Caption in NervaHous voice — warm, direct, curious
Always pass through the brand voice rubric in
~/NervaHous/Brand/voice-rubric.md before finalizing.
Hooks are shell commands Claude Code runs at lifecycle moments — before a tool call, after a file write, when a session starts. Use them to format code, block dangerous commands, log prompts, or notify yourself.
~/.claude/settings.json # global (every project) <repo>/.claude/settings.json # project <repo>/.claude/settings.local.json # local-only (gitignored)
| Event | Fires when |
|---|---|
PreToolUse | Before any tool runs. Block, validate, log. |
PostToolUse | After a tool completes. Format, lint, commit safe changes. |
UserPromptSubmit | You hit Enter. Inject context, validate, measure latency. |
SessionStart | Session opens. Load env, start logging. |
SessionEnd | Session closes. Commit, upload logs, summarize. |
ContextFull | Context near limit. Alert you to compact. |
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"commands": [
"if echo \"$COMMAND\" | grep -qE 'rm -rf /|:\\(\\)\\{|forkbomb'; then echo 'BLOCKED'; exit 1; fi"
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"commands": [
"find . -name '*.py' -newer /tmp/last-edit -exec ruff format {} + 2>/dev/null; touch /tmp/last-edit"
]
}
],
"ContextFull": [
{
"matcher": "",
"commands": [
"osascript -e 'display notification \"Context full — run /compact\" with title \"Claude Code\"'"
]
}
]
}
}
Model Context Protocol = how Claude Code talks to external systems. GitHub, Postgres, Slack, filesystem, browser. Lightweight servers Claude can call as tools.
# in-session /mcp list /mcp add github /mcp remove github # from CLI claude mcp add github claude mcp list
| Scope | File | When |
|---|---|---|
| User | ~/.claude/settings.json | Available in every project on this machine. |
| Project | <repo>/.claude/settings.json | This repo only. Commit it — your team gets the same config. |
| Local | <repo>/.claude/settings.local.json | This machine only. Never commit — secrets, API keys, personal overrides. |
| Server | Why for you |
|---|---|
| github | Drive PRs and Issues without leaving Claude. Daily-driver for designdna OSS. |
| playwright | Verify your Vercel deploys, smoke-test the portfolio site. |
| filesystem | Batch file ops across folders. Worth it once you have > 50 markdown notes. |
| postgres | If/when EntitleFlow restarts with Supabase. Query directly from Claude. |
| grok (community) | Wynand's claude-code-grok-mcp — X search + web + image gen via Grok. Already noted in your memory. |
{
"model": "claude-sonnet-4-6",
"defaultModel": "claude-haiku-4-5",
"permissions": {
"allow": [
"Bash(git:*)",
"Bash(pnpm:*)",
"Bash(uv:*)",
"Bash(python:*)",
"Read",
"Write",
"Edit",
"Glob",
"Grep"
],
"deny": [
"Bash(rm -rf:*)",
"Bash(sudo:*)"
]
},
"env": {
"NODE_ENV": "development",
"PYTHONUNBUFFERED": "1"
},
"enabledMcpServers": ["github", "playwright"],
"output": {
"showCost": true,
"showTokenCount": true
},
"context": {
"autoCompactAt": 0.80
}
}
~/.claude/settings.json for your global defaults. Override per-project at <repo>/.claude/settings.json. Put anything with secrets in settings.local.json and confirm it's gitignored.| Editor | How |
|---|---|
| VS Code | Extensions marketplace → "Claude Code" (Anthropic). Inline chat, @-file mentions with line ranges, plan mode review, multi-tab. |
| Cursor | Same VS Code extension works. Install as usual. |
| JetBrains (IntelliJ, PyCharm, WebStorm) | Settings → Plugins → "Claude Code". Chat sidebar, file context via inspection, plan mode. |
| Terminal | Always available, full control, parallel sessions easiest here. |
Solo + ~$52K and counting = every dollar shows up. Cost discipline isn't about being cheap — it's about pointing the money at the work that pays back.
/cost after any task you'd describe as "expensive" — large refactor, big file scan, long Plan-mode walk-through.| Context | Action |
|---|---|
| < 60% | Keep going. |
| 60-80% | Wrap the current task cleanly. |
| ~80% | /compact <focus>. Tell it what to keep. |
| > 90% | Finish or close. Don't push. |
/compact "Keep only the trading bot bug fixes and current TODO comments" reclaims ~30-50% context and barely loses information. Use it earlier than feels comfortable.Active build. Multiple specialized agents, async parallel calls, ICC framework. Reasoning-heavy.
/model opus for new agent design · /model sonnet for daily implementation · subagent trade-log-analyst for paper-trade reviews · hook to ruff format on Python writes · MCP github for releases
First public OSS. Skill convention, multi-agent flows. Community-facing, so cleanliness matters.
/model sonnet for skill authoring · subagent doc-reviewer to keep examples honest · MCP github for issue triage · hook to lint markdown on save
Public front-door. Next.js. Visual polish > reasoning depth.
/model sonnet default · MCP playwright for screenshot verification · hook to prettier on TS/TSX writes
Editorial light system, voice rubric, pillar identity. Generative work — needs taste.
/model sonnet with cross-cut skill · custom skill nervahous-carousel · CLAUDE.md citing brand voice + design language paths · hook to log every carousel draft to a journal file
7 named agents on cron — Ferryman, Navigator, Archivist, Watchkeeper, Editor, Cartographer, Auditor.
/agents subagent · MCP filesystem for vault sweeps · Apple Notes + Notion as ingestion endpoints