Claude Code
Coding agents · in Claude Code setup

Claude Code for Claude Code setup

The agent in the Claude Code setup stack. Everything below is Claude Code configuration, not a separate product. The whole setup is files in your repo and your home directory.

· today
Where Claude Code fits in the workflow
  1. 1
    CLAUDE.md, the file that stops repeated corrections

    Claude Code reads CLAUDE.md at the start of every session. Anything you find yourself saying twice belongs in it. Project file is ./CLAUDE.md, personal preferences that follow you across every repo go in ~/.claude/CLAUDE.md, and ./CLAUDE.local.md is for machine-specific notes you do not want committed. It supports @imports up to four levels deep, so a repo that already documents itself in AGENTS.md can point at it rather than duplicating.

    Prompt · A CLAUDE.md worth having
    # {{project name}}
    
    @AGENTS.md
    
    ## Things that bite
    
    - The middleware file is proxy.ts, not middleware.ts.
    - Content lives under content/, not lib/. lib/*.ts are thin loaders.
    - Before writing code against any library, look up its current docs with
      Context7. This applies even to libraries you know well: the API may have
      changed since training. Do not skip it because the change looks like a
      one-liner.
    
    ## Commands
    
    - npm run build runs the content index and logo manifest first.
    - Never run the dev server in the background without checking the port.
  2. 3
    Subagents, for work that would pollute the session

    A subagent runs in its own context and reports back a conclusion. That matters for anything that reads a lot and returns a little: a sweep across forty files ends with one answer in your session instead of forty files of transcript. Definitions live in .claude/agents/, name and description are required, and everything else is optional. The description is what decides when it gets picked automatically, so write it as a trigger rather than a title.

    Prompt · .claude/agents/schema-check.md
    ---
    name: schema-check
    description: Use when a change touches database queries or types. Reads the live schema and reports mismatches. Does not edit files.
    tools: Read, Grep, Glob
    model: haiku
    ---
    
    Compare the query or type under discussion against the real database schema.
    
    Report only mismatches: a column that does not exist, a nullable column
    treated as non-null, a type that has drifted. If everything matches, say so
    in one line. Do not suggest refactors and do not edit files.
  3. 4
    Hooks, for the things you keep forgetting

    Hooks are shell commands the harness runs on events, configured under a hooks key in settings. They are the right tool for anything that must happen every time regardless of whether the agent remembered: formatting after an edit, a notification when a long run needs input. PostToolUse with a matcher on Write and Edit is the one most people want first.

    Prompt · .claude/settings.json
    {
      "hooks": {
        "PostToolUse": [
          {
            "matcher": "Write|Edit",
            "hooks": [
              {
                "type": "command",
                "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
              }
            ]
          }
        ]
      }
    }
  4. 5
    Skills, for the prompts you keep retyping

    A skill is a markdown file whose body loads only when it is used, which is what makes it cheaper than putting the same instructions in CLAUDE.md. Project skills live in .claude/skills/<name>/SKILL.md and become /<name>. Custom commands in .claude/commands/ still work and produce the same slash command, but skills are the current shape: they support supporting files, path scoping, and being invoked automatically when the description matches.

    Prompt · .claude/skills/ship/SKILL.md
    ---
    name: ship
    description: Run the pre-push checks this repo actually requires, in order, and report what failed.
    ---
    
    Run these in order and stop at the first failure:
    
    1. npx tsc --noEmit
    2. npm run lint
    3. npm run build
    
    Report the failing output verbatim. Do not fix anything unless asked.
    If all three pass, say so and list what changed since the last commit.
Cost in this stack
$20
Of the $20/mo solo, open source budget
Tool pricing
Bundled with Claude Pro $20/mo · Max $100-200/mo · API metered
Alternatives to Claude Code at this step
Other tools in the Claude Code setup stack
Other stacks using Claude Code
See the full Claude Code setup stack
Workflow, costs at three usage tiers, prompts, pitfalls.
Spotted something off?
Wrong price, dead link, stale tool — anything. We review every fix.
Suggest a fix to this tool