Julián Úsuga
Index

How to Use Claude Code

The compact September 2026 edition — setup once, the commands that earn their keep, subagents, hooks, and a sane default workflow.

Julian Úsuga Posted Updated howto · claude · tools

The 5-Minute Setup

  1. /init once per repo. Generates CLAUDE.md so every session starts with project context.
  2. Plan mode for anything non-trivial (Shift+Tab). Claude reads and proposes; nothing gets touched until you approve the plan.
  3. One hook for the thing you’d otherwise repeat every session — a formatter, a linter. See below.
  4. /doctor if anything feels off. It diagnoses installs, PATH problems, settings, and slow hooks.

Commands That Earn Their Keep

Grouped by job, not alphabetically. /help lists everything; most of the rest you won’t miss.

Before you ship — /diff shows what changed. /code-review checks the diff (pass a PR number to review that instead, --fix to apply findings, ultra for a deep multi-agent cloud pass). /security-review for auth, input handling, and secrets.

Between sessions — /clear starts fresh while keeping project memory. /compact summarizes instead of dropping. /resume returns to an earlier conversation, /branch tries a different direction, /fork copies it into a background session.

Parallel work — /tasks lists background work. /background detaches the session so it keeps running. /batch splits a large change into independent units, each in its own worktree.

When stuck — /rewind rolls code and conversation back to a checkpoint. /debug diagnoses runtime issues. /feedback reports a bug with session context attached.

Housekeeping — /model switches models (Fable 5.1 is the current default). /usage shows spend, including per-loop breakdowns. /permissions, /hooks, /agents, and /mcp manage their respective config.

Scheduling — /loop <interval> <prompt> reruns a prompt (“check the deploy every 5 minutes”). /schedule manages remote cron agents.

The ! prefix — type ! before a shell command to run it inline. The output lands in the conversation, which makes it the right way to hand over interactive auth flows:

! git log --oneline -20

Subagents: Spend Tokens on Context

Agent launches a separate Claude with its own context window. Two flavors:

  • Fork (no subagent_type): a copy of you — full context, shared prompt cache, cheap. Best when the agent needs everything you know.
  • Typed (Explore, Plan, custom agents in ~/.claude/agents/): clean context for specialized work like codebase discovery or architectural plans.

Brief them like a colleague who just walked in: goal in one sentence, what you already ruled out, what’s out of scope, the exact deliverable back. Terse prompts produce shallow work.

When to parallelize: independent reads across the codebase — yes. Dependent steps (“write the schema, then the migration”) — no, the second starts stale. If you can’t write prompts that don’t reference each other, it’s one sequential task, not three parallel ones.

Hooks: Making Behavior Stick

“Always run the linter before committing” lasts two messages as a prompt. As a hook, it lasts forever. Hooks live in ~/.claude/settings.json (user) or .claude/settings.json (project), and the harness runs them — they can’t be forgotten.

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [{ "type": "command", "command": "prettier --write \"$CLAUDE_FILE\"" }]
      }
    ]
  }
}

Key events: UserPromptSubmit (inject context), PreToolUse / PostToolUse (block or annotate), SessionStart, Stop (notifications). Start with one hook. Add more as the friction tells you to.

Skills

Bundled skills worth knowing: /verify, /simplify, /dataviz, /design, /deep-research — and /skill-doctor, which shows which loaded skills go unused and what they cost in context. Prune aggressively. Custom skills are a SKILL.md in ~/.claude/skills/<name>/, invocable as /<name>.

A Sane Default Workflow

  1. /init once per repo.
  2. Plan mode for anything non-trivial.
  3. Research goes to subagents; the main thread stays for decisions.
  4. /code-review before every PR, /security-review when it matters.
  5. Hooks for anything repeated; /skill-doctor when sessions feel bloated.
  6. /usage and /compact to stay cheap on long sessions.

Resources

Conclusion

Claude Code rewards investment, but less of it than it used to: /init, plan mode, one hook, and the dozen commands above cover ~90% of daily work. Add the rest as the friction tells you to.