NERVAHOUSFIELD GUIDE02 / 03

Claude Code
The Working Guide

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.

CLI · IDE · MCP · HOOKS
VERSION 2026.05
LAST VERIFIED 2026.05.13
How to keep this current:  Each section has its own last verified stamp. When Anthropic ships an update, only the affected section needs to change — find it in the TOC, update the stamp + content, leave the rest alone. Sources are linked at the bottom of each section so you can re-check.
docs.claude.com  ·  github

01Install & first session

Last verified 2026.05.13 Stable since 2025-Q3

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

Useful one-shot flags

FlagWhat
claude "prompt"Non-interactive — run prompt, get answer, exit. Good for shell pipelines.
claude --resumePick from recent sessions to continue. Aliased claude -c for "continue last".
claude --model opusForce Opus for this session.
claude --dir /pathStart in a specific directory.
claude --print "..."Same as the unflagged one-shot — prints and exits. Pipe-friendly.
First-run checklist: run /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.

02The daily-driver loop

Last verified 2026.05.13 Your workflow, not a generic one

The shape of a productive session — built around how you actually work: bursts, parallel projects, momentum-first.

The 6-step loop

  1. cd into the project — or use your work alias.
  2. claude to open a session. Immediately /rename <short-name> so you can find it later.
  3. State the goal in one line. "Implement the regime filter in RegimeMemoryAgent." Not "look at this code."
  4. Use Shift+Tab to enter plan mode for anything non-trivial. Review the plan. Tweak. Approve.
  5. Let Claude work. Don't babysit every tool call. Ctrl+C only if it's clearly drifting.
  6. End with /cost to check the bill. /compact if you're staying. Close cleanly if you're done.
Why this works for you specifically. The first-line goal forces your ADHD-brain to commit before you start. Plan mode catches the "we're solving the wrong problem" mistake before tokens burn. /cost closes the loop so the spend stays visible.

03Slash commands

Last verified 2026.05.13 Type / in-session for full list
CommandWhat & when
/initDrop 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.
/costTokens + 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%.
/clearWipe conversation, keep files. Fresh start without leaving the project.
/memoryOpen the nearest CLAUDE.md in your editor. Save = reloaded immediately.
/agentsList, create, configure subagents.
/mcpManage MCP servers — list, add, remove.
/permissionsWhat can Claude do — review and adjust.
/resumePick a recent session to continue.
/helpFull list. When in doubt.

04Keyboard shortcuts (in-session)

Last verified 2026.05.13 Muscle memory matters
KeysWhat
Shift+TabPlan mode toggle. Review the plan before Claude executes. Single most-used shortcut.
Ctrl+C (once)Pause current operation gracefully.
Ctrl+C (twice)Hard abort.
EscCancel pending input / step back from a prompt.
Ctrl+DClose session (saves history).
/ Walk through previous prompts in this session.
?Show in-session help.
/Open the slash command palette.
Plan-mode discipline. Hit Shift+Tab any time you're about to ask Claude to do something with more than one file. It costs you 15 seconds of review and saves entire sessions of fixing the wrong thing.

05CLAUDE.md & memory hierarchy

Last verified 2026.05.13 Auto-memory matured 2026-Q1

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.

The load order

# 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

What belongs in each layer

~/.claude/CLAUDE.md (global)

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.

<repo>/CLAUDE.md (project)

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.

nested CLAUDE.md (sub-folder)

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 CLAUDE.md template for solo work

# <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.
Auto-memory caveat. Claude Code can now save learned facts into CLAUDE.md without being asked. Skim it weekly — sometimes it captures a wrong assumption as truth. Edit ruthlessly.

06Models & cost routing

Last verified 2026.05.13 2026.05 MAJOR

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.

Opus 4.7 heavy
Deep reasoning · 1M context
The thinking model. Complex multi-file refactors, hard architectural calls, debugging mysteries. Slower, pricier.
Use when: you've already tried Sonnet and it stalled, or the problem spans >5 files of real complexity.
Sonnet 4.6 default
Balanced · 1M context · 64K out
The daily driver. Great speed/cost ratio, adaptive thinking when needed. This is what you should be on 80% of the time.
Use when: writing code, fixing bugs, reviewing PRs, most everyday work. The "I'm not sure which model" default.
Haiku 4.5 fast
Cheap reads · Big batches
The scout. Fastest, cheapest. Great for read-only exploration, bulk file analysis, simple transforms.
Use when: "look at these 50 files and tell me where X happens." Or as a subagent model for searches.

The decision tree

Is this read-only / pure exploration?
Haiku
Is it < ~100 lines of code or a single-file change?
Sonnet
Does it require complex multi-step reasoning, hard debugging, or architecture?
Opus
Budget is tight this week?
Haiku + /compact between steps
The May 6 unlock. 5-hour limits doubled, peak hours removed for Pro/Max. You can now run longer autonomous build runs than ever. Stop self-throttling on token budget unless you genuinely see /cost climbing fast.

07Parallel sessions & worktrees

Last verified 2026.05.13 Single biggest leverage move

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.

Setup

# 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

How to use this without going insane

Cross-project parallel. Two different repos in two different terminals = the easier version. Use this for "T-BOT in tab 1, designdna in tab 2." The worktree pattern is for one repo, two branches.

08Subagents

Last verified 2026.05.13 FIRST-CLASS IN 2026

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.

Built-in subagents

AgentDefault modelUse
ExploreHaiku 4.5Fast read-only codebase search. Throwaway exploration.
PlanOpus 4.7Strategy + planning before implementation.
general-purposeSonnet 4.6Default for multi-step research + modification.

Building a custom subagent

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.
Why this matters for T-BOT. A read-only Haiku agent that reviews paper-trade logs is dramatically cheaper than asking Sonnet, and you can run it as a scheduled task or on demand. Same pattern works for "review my Gumroad analytics" or "summarize this week's commits."

09Skills

Last verified 2026.05.13 You already shipped one (designdna)

A Skill is a reusable template that teaches Claude how to do a specific task your way. SKILL.md + supporting files in a folder.

Where they live

~/.claude/skills/<skill-name>/SKILL.md         # global
<repo>/.claude/skills/<skill-name>/SKILL.md    # project

SKILL.md frontmatter

---
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.
Skill vs Agent vs CLAUDE.md. CLAUDE.md = "context about this project." Agent = "a worker with its own tools/prompt I can dispatch." Skill = "a reusable template for a recurring task." Different jobs. Use the right one.

10Hooks

Last verified 2026.05.13 Automation on lifecycle events

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.

Where they live

~/.claude/settings.json              # global (every project)
<repo>/.claude/settings.json          # project
<repo>/.claude/settings.local.json    # local-only (gitignored)

Event types

EventFires when
PreToolUseBefore any tool runs. Block, validate, log.
PostToolUseAfter a tool completes. Format, lint, commit safe changes.
UserPromptSubmitYou hit Enter. Inject context, validate, measure latency.
SessionStartSession opens. Load env, start logging.
SessionEndSession closes. Commit, upload logs, summarize.
ContextFullContext near limit. Alert you to compact.

Concrete hooks worth running

{
  "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\"'"
        ]
      }
    ]
  }
}
Hook safety. Hooks run with your full shell permissions. Don't paste a hook from a blog post you didn't read. If something feels too magic, run the command manually first.

11MCP servers

Last verified 2026.05.13 Add servers to extend Claude's reach

Model Context Protocol = how Claude Code talks to external systems. GitHub, Postgres, Slack, filesystem, browser. Lightweight servers Claude can call as tools.

Add / list / remove

# in-session
/mcp list
/mcp add github
/mcp remove github

# from CLI
claude mcp add github
claude mcp list

Scopes — which config wins

ScopeFileWhen
User~/.claude/settings.jsonAvailable in every project on this machine.
Project<repo>/.claude/settings.jsonThis repo only. Commit it — your team gets the same config.
Local<repo>/.claude/settings.local.jsonThis machine only. Never commit — secrets, API keys, personal overrides.

Servers worth wiring up

ServerWhy for you
githubDrive PRs and Issues without leaving Claude. Daily-driver for designdna OSS.
playwrightVerify your Vercel deploys, smoke-test the portfolio site.
filesystemBatch file ops across folders. Worth it once you have > 50 markdown notes.
postgresIf/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.

12settings.json reference

Last verified 2026.05.13 The one config file

Minimal-but-real example

{
  "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
  }
}
Where to put it. Start with ~/.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.

13IDE integrations

Last verified 2026.05.13 VS Code, JetBrains, Cursor
EditorHow
VS CodeExtensions marketplace → "Claude Code" (Anthropic). Inline chat, @-file mentions with line ranges, plan mode review, multi-tab.
CursorSame VS Code extension works. Install as usual.
JetBrains (IntelliJ, PyCharm, WebStorm)Settings → Plugins → "Claude Code". Chat sidebar, file context via inspection, plan mode.
TerminalAlways available, full control, parallel sessions easiest here.
Terminal vs IDE choice for you. Terminal is the power-user path — it's where worktrees + parallel sessions feel natural. IDE chat is good for quick "fix this function" loops inside a file you're already staring at. Use both — different jobs.

14Cost & context discipline

Last verified 2026.05.13 Money-aware solo workflow

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.

The /cost habit

Compact, don't churn

ContextAction
< 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.
The compact trick. A targeted /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.

15Your specific workflows

Last verified 2026.05.13 Built around your active projects

NHous T-BOT — Python multi-agent

Active build. Multiple specialized agents, async parallel calls, ICC framework. Reasoning-heavy.

Tools to wire

/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

designdna OSS

First public OSS. Skill convention, multi-agent flows. Community-facing, so cleanliness matters.

Tools to wire

/model sonnet for skill authoring · subagent doc-reviewer to keep examples honest · MCP github for issue triage · hook to lint markdown on save

Jene's Hous portfolio

Public front-door. Next.js. Visual polish > reasoning depth.

Tools to wire

/model sonnet default · MCP playwright for screenshot verification · hook to prettier on TS/TSX writes

NervaHous content + brand

Editorial light system, voice rubric, pillar identity. Generative work — needs taste.

Tools to wire

/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

JeneX vault + scheduled crew

7 named agents on cron — Ferryman, Navigator, Archivist, Watchkeeper, Editor, Cartographer, Auditor.

Tools to wire

Each crew member = a scheduled task running a custom /agents subagent · MCP filesystem for vault sweeps · Apple Notes + Notion as ingestion endpoints

162026 changelog highlights

Last verified 2026.05.13 Things that actually shifted workflow
2026.05.06
Rate limits doubled. 5-hr limits 2× for Pro/Max/Team. Peak-hours throttle removed for Pro/Max. Opus API Tier 1 input lifted to 500K/min. The single biggest unlock for long autonomous build runs. → already noted in memory
2026.04.16
Opus 4.7. 1M token context, 128K max output, improved hard-reasoning. Use for debugging mysteries and architecture.
2026.02.17
Sonnet 4.6. Extended/adaptive thinking. 1M context, 64K output. Sweet spot for most dev work — this is your default.
2026 Q1
Subagents matured. First-class, parallel, model-routable. The shift from "Claude is a chatbot" to "Claude is a team."
ongoing
Skills convention. SKILL.md + supporting files is now the standard for reusable templates. designdna uses this.
How to keep this section honest. When you spot a new Anthropic release that actually changes how you'd work, add a new row at the top. Older rows that no longer matter — delete. This is the only section that should churn often.