~/.claude β field notes
Seb's Claude Code Setup
A tour of one working configuration: the global CLAUDE.md rules, installed skills and plugins, and the harness plumbing (memory, hooks, MCP). Environment-specific details β hostnames, ports, IDs, account info β are marked redacted. Everything else is real and copyable.
directory map
Where things live
Claude Code reads configuration from a few well-known places. This setup uses all of them:
~/CLAUDE.md # global instructions, loaded every session
~/.claude/
βββ settings.json # permissions, hooks, plugins, model
βββ rules/
β βββ projects.md # taxonomy of every service I run (the fleet)
β βββ reflections.md # pointers to post-mortem write-ups
βββ skills/ # ~35 skills, custom + third-party
βββ hooks/ scripts/ # hook scripts (PowerShell + bash)
βββ plugins/ # marketplace plugins (superpowers, frontend-design)
βββ wiki/ # per-service spec sheets ("LLM wiki")
βββ projects/<cwd>/memory/ # persistent memory, one fact per file
The theme of the whole setup: put knowledge in files the model reads, and enforcement in hooks the harness runs. Instructions drift; hooks don't.
~/CLAUDE.md
The rules file, lightly redacted
This is the global CLAUDE.md, minus sections that only describe my private server environment. It's grown over months of corrections β nearly every rule exists because Claude once did the opposite.
Think before coding
- Before implementing non-trivial changes, state assumptions and interpretation of the request explicitly.
- If multiple approaches exist, present them briefly β don't pick silently.
- If something is ambiguous, ask rather than guess.
Surgical changes
- Every changed line must trace directly to the current request.
- Don't "improve" adjacent code, comments, or formatting opportunistically.
- Match existing style even if you'd write it differently.
- If you notice unrelated issues, mention them β don't fix them silently.
Goal-driven execution
- For non-trivial tasks, state brief success criteria before starting implementation.
- "Fix the bug" β "Write a test that reproduces it, then make it pass."
- For multi-step work, state the plan with verification checkpoints.
Debugging discipline
- If more than 5 diagnostic commands run without progress, stop and summarize findings so far β what's been ruled out, the current best hypothesis, what data is missing.
- Don't chase a third hypothesis without reporting the first two's outcomes.
Fail visibly
- Never coerce a dependency failure into a "no result" outcome β surface it as an error.
- Never update staleness timestamps (last_checked, last_synced) on failed operations.
- If an external call errors, the user must know β don't swallow it into a default that looks like normal operation.
Test quality
- Tests must verify the actual fix or feature β not just "does it run without errors."
- A test that can't fail is worse than no test. If you can't articulate what regression the test catches, rewrite it.
- Tests with DB side effects must mock the persistence helper β never let a test write to a production store.
Discipline (the greatest-hits section)
- Close the loop: never say "fixed" or "done" without verifying the way the user would experience it β including delegated work.
- Model the system: before changing a config, script, or shared resource, identify what else depends on it. For infra changes, ask "what breaks if this is wrong?" and add safeguards.
- Chesterton's Fence: before modifying code you didn't write, understand why it exists.
- Learn from corrections: when the user corrects your approach, save a feedback memory before moving on.
- Confirm destructive ops: pause before
rm -rf,DROP,reset --hard, force-push β even in auto-accept mode. - Enumerate failure modes first: before coding against an external system (broker, API, network), list the ways it can fail and handle each.
- Backport fixes: after fixing a bug in one service, grep siblings for the same pattern; promote recurring fixes to a shared library.
Communication preferences
- When I say "execute it" or "run it", take immediate action β don't explain that something is already running.
- When I give a specific name for something, use it exactly on the first attempt.
- Don't frame work in calendar timelines ("this week", "N-week plan") β group by scope and dependency.
- When a response requires a manual sudo/restart step, restate the exact command at the very end.
Don't
- Don't summarize what you just did at the end of every response β I can read the diff.
- Don't add disclaimers to investment/stock discussion.
- Don't ask for confirmation on names or commands I've already specified.
~/.claude/skills + ~/.claude/plugins
Skills & plugins
Skills are markdown playbooks Claude loads on demand (or via /slash-command). Mine split into three groups.
Plugins, from the official marketplace
| plugin | what it does |
|---|---|
| superpowers | Process discipline as skills: brainstorming before building, test-driven development, systematic debugging, verification-before-completion, plan writing/execution, subagent-driven development. The core idea: Claude must invoke the relevant process skill before acting, not after. Highest-leverage install on this list. |
| frontend-design | Anthropic's guidance for distinctive, non-templated UI work β direction, typography, avoiding the "AI default look." |
Install via /plugin β browse the claude-plugins-official marketplace.
Third-party skill packs (dropped into ~/.claude/skills/)
| skill(s) | what it does |
|---|---|
| design-taste-frontend (v1 + v2) | Anti-slop frontend skill for landing pages and redesigns β audit-first, real design systems, strict pre-flight checks. |
| high-end-visual-design | Pins the exact fonts, spacing, shadows, and card structure that make a page feel expensive; bans the cheap defaults. |
| gpt-taste | UX/motion engineering: GSAP scroll-triggers, editorial typography, bento grids, layout variance. |
| imagegen-frontend-web / -mobile, image-to-code, brandkit | Image-generation direction skills: design references per section, mobile app concepts, brand boards; image-to-code implements from the generated comps. |
| minimalist-ui, industrial-brutalist-ui, stitch-design-taste, redesign-existing-projects | Named aesthetic systems to reach for per-project instead of re-prompting taste every time. |
| full-output-enforcement | Bans placeholder/truncation patterns ("rest of code unchangedβ¦") in generated output. |
| link-cli-* | Vendor-shipped skills wrapping a payments CLI (auth, payment methods, spend requests) β an example of tools shipping their own skills. |
| deep-research | Multi-source research harness: fan-out searches, adversarial verification, cited synthesis. |
Custom skills (the real unlock)
About 15 more are hand-written operational runbooks for my own fleet of services: /deploy (transfer + checksum + restart + log-check sequence), /health (read-only diagnosis of a live service), /remote-edit, /new-service (first-deploy checklist across every registration surface), /sunset (decommissioning sequence), /wiki-refresh, /grill-me (interviews me relentlessly about a plan before I build it), and an idea-queue pair (/idea, /queue).
~/.claude/projects/<cwd>/memory/
Memory system
Claude Code gives the model a persistent per-project memory directory. The convention: one fact per file, with frontmatter typing it as user (who I am), feedback (corrections β "you did X wrong, do Y, here's why"), project (ongoing work state), or reference (pointers). A MEMORY.md index β one line per memory β is what actually loads into context each session; bodies are read on demand.
---
name: feedback-verify-order-fills
description: Never assume an order filled β verify via position check
metadata:
type: feedback
---
Never assume an order filled just because "open orders is empty".
**Why:** an order can vanish from the open list by being cancelled.
**How to apply:** confirm via a position or balance query after placing.
Currently ~100 memories: ~50 project state files, ~50 feedback files, a handful of reference pointers, plus two long-form "engineering reflection" post-mortems distilled from finished projects.
Recent work: making memory self-maintaining
Hand-maintained memory rots, so three hooks now automate the janitorial work:
- Index rebuild (PostToolUse on Write/Edit) β whenever a memory file is written, a script regenerates the
MEMORY.mdindex from the files' frontmatter. The index can no longer drift from the directory. - Weekly lint (SessionStart, stamped to run at most every 7 days) β checks memories for staleness, broken cross-links, and duplication, and injects a digest into session context so Claude sees "these 3 memories look stale" at startup.
- Recall ledger (SessionEnd) β streams the session transcript and records which memory files were actually read this session. Memories that never get recalled are candidates for pruning; a memory system is only as good as its hit rate.
Two conventions from CLAUDE.md complete the loop: when I correct Claude's approach, it must save a feedback memory in the same session; and when new facts refute an old memory, the old file gets a SUPERSEDED tombstone edited in immediately β "a correction buried below a wrong headline doesn't exist."
~/.claude/settings.json β "hooks"
Hooks
Hooks are shell commands the harness runs at lifecycle events β the model can't skip them, which is exactly the point. Guardrails you'd otherwise write as instructions become mechanical:
| event | hook |
|---|---|
| PreToolUse (Bash) | age-gate β intercepts npm install / pip install and blocks packages published too recently (supply-chain caution: a brand-new version gets a cooling-off period). |
| PreToolUse (Bash/Edit/Write) | shared-libs guard β warns before edits to the shared library that a dozen downstream services import. |
| PreToolUse (email send) | confirmation gate β a password check before any tool call that actually sends email. |
| PostToolUse (Edit/Write) | pytest reminder β nudges to run the suite after Python files change; memory index rebuild (see above). |
| PostToolUse (Bash) | dep audit β flags dependency changes after shell commands. |
| Notification | Desktop toast when Claude needs attention. |
| SessionStart / SessionEnd | Memory lint / recall ledger (see above). |
settings.json / MCP / ~/.claude/wiki
Settings, MCP, and the wiki
settings.json highlights
{
"permissions": { "allow": ["Read","Edit","Write","WebFetch","WebSearch","Bash(*)"],
"defaultMode": "auto" }, // trusted machine; hooks are the guardrails
"effortLevel": "high",
"enabledPlugins": { "superpowers": true, "frontend-design": true },
"hooks": { /* β¦section aboveβ¦ */ }
}
Permissions are wide-open because the risky paths (package installs, shared-lib edits, email) are individually gated by hooks β allowlist coarse, guard fine.
MCP servers & connectors
- claude-in-chrome + chrome-devtools β drive a real browser: click, fill forms, read console/network, screenshot.
- ssh-remote β native command execution on the remote server that hosts the service fleet.
- Gmail / Calendar / Drive β claude.ai connectors for mail search, drafting, scheduling.
- A local Gmail MCP server (Node.js) predating the connectors β worth knowing you can write your own in an afternoon.
The service wiki
The biggest custom piece: I run ~20 small always-on services (bots, screeners, monitors) on one server, and Claude operates all of them. ~/.claude/wiki/ holds one spec sheet per service β machine-readable frontmatter (unit name, ports, dependencies, data stores) plus a prose "decisions & gotchas" section. CLAUDE.md requires reading a service's page before non-trivial work on it, and a /wiki-refresh skill re-derives the frontmatter from live server state after big changes. A weekly lint job flags drift (new services without pages, stale entries, broken paths).
Alongside it, ~/.claude/rules/projects.md is a one-page taxonomy of every service β so "check on all the trading stuff" resolves to a concrete checklist instead of a guess.
closing notes
If you're starting from zero
- Start CLAUDE.md tiny. Add a rule only when Claude does something you'd correct a junior for β and phrase it as the correction. A rules file written speculatively is noise.
- Install the superpowers plugin first. Process skills (brainstorm β plan β TDD β verify) change output quality more than any prompt tweak.
- Promote repeated explanations to skills. Second time you type the same procedure, it's a skill.
- Put enforcement in hooks, knowledge in files. Instructions are suggestions; hooks are law.
- Let memory accumulate from corrections, not from ceremony β the feedback-memory habit compounds fastest, but budget for pruning (hence the lint + recall ledger).