Claude Code Workflow Cheatsheet

Getting Started • Project Setup • File Structure • Skills • Hooks • Memory • Workflows • 2026 Edition

Cards explored 0/12
1

Getting Started

Install Claude Code, initialize a project, and generate your starter memory file.

curl -fsSL https://claude.ai/install.sh | bash
cd your-project
claude
/init
  • Scans your codebase and proposes an initial project memory.
  • Best first step before prompting on a large repository.
2

Understanding CLAUDE.md

`CLAUDE.md` acts like persistent project memory and is loaded automatically at session start.

What Why How
What it stores Tech stack, directory map, architecture, gotchas, and team-specific conventions.
Why it matters It reduces repeated explanation and keeps workflows consistent across sessions.
# Project: MyApp FastAPI REST API + React SPA + Postgres ## Commands npm run dev npm run test npm run lint ## Architecture /app Next.js App Router pages /lib shared utilities /prisma DB schema & migrations
3

Memory File Hierarchy

Global
~/.claude/CLAUDE.md Shared defaults across all projects.
Root
./CLAUDE.md Parent project memory for the repo.
Child
./frontend/CLAUDE.md Scoped context for a subfolder or domain.
  • Keep each file concise, ideally under 200 lines.
  • Subfolder files append context instead of replacing parent rules.
  • Never overwrite higher-level memory with narrow implementation detail.
4

Best Practices

  • Define the desired outcome before asking for changes.
  • Be explicit about constraints and non-goals.
  • Reference docs with `@filename` when exact context matters.
  • Add workflow rules to memory once you repeat them twice.
  • Commit to Git often and keep generated context shareable.
5

Project File Structure

your-project/
├─ CLAUDE.md
├─ .claude/
│  ├─ settings.json
│  ├─ settings.local.json
│  └─ skills/
│     ├─ code-review/
│     │  └─ SKILL.md
│     ├─ testing/
│     │  └─ SKILL.md
│     └─ helpers/
├─ commands/
│  └─ deploy.md
├─ agents/
│  └─ security-reviewer.md
├─ arc/
└─ .gitignore
6

Adding Skills

Skills are markdown guides Claude can auto-invoke using natural language descriptions.

Project skill
.claude/skills/<name>/SKILL.md
Personal skill
~/.claude/skills/<name>/SKILL.md
name: testing patterns description: Jest testing patterns allowed-tools: Read, Grep, Glob # Testing Patterns Use `describe + it + AAA` pattern Use factory mocks
7

Skill Ideas For Engineers

  • Code review
  • Testing patterns
  • Commit messages
  • Docker deploy
  • Codebase visualizer
  • API design
8

Setting Up Hooks

Hooks provide deterministic callbacks for linting, validation, and notification flows.

PreToolUse PostToolUse Notification
"hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "./scripts/src.sh", "timeout": 5 } ] } ] }
Exit 0 = allow Exit 2 = block
9

Permissions & Safety

{ "permissions": { "allow": ["Read:*", "Bash:git:*"], "deny": ["Read:env:*", "Bash:sudo:*"] } }
  • Prefer explicit allows for repeat-safe tasks.
  • Block environment secrets and privileged shell commands by default.
10

The 4-Layer Architecture

L1 — CLAUDE.md Persistent context and project rules.
L2 — Skills Auto-invoked knowledge packs and playbooks.
L3 — Hooks Safety rails, checks, and deterministic automation.
L4 — Agents Subagents with focused scopes and their own context.
11

Daily Workflow Pattern

cd project && claudeStart in repo context
Shift + Tab + TabPlan Mode
Describe feature intentState outcome and constraints
Shift + TabAuto Accept
/compactCompress context
Esc EscRewind
Commit frequentlyKeep work checkpointed
New session per featureReduce context drift
12

Quick Reference

/initGenerate `CLAUDE.md`
/doctorCheck installation
/compactCompress session context
Shift + TabChange modes
TabToggle extended thinking
Esc EscOpen rewind menu