AI workflow3 min read
Build an AI brain for your dev work
The setup I use so Claude Code remembers my projects, standards and past mistakes: memory files, skills and subagents, with copy-paste templates.
A new session opens and you are back at zero: re-explain the project, re-explain the conventions, then watch the AI repeat the mistake you corrected last week.
I run my studio on a small set of plain text files that the AI reads at the start of every session. Below is the whole setup, with templates you can paste today.
The three layers
- Instructions — a
CLAUDE.mdfile that says who you are, how you work, and what the tool must never do. It is read automatically at every session start. - Memory — one file per fact the AI should keep across sessions: project state, decisions, things you corrected it on.
- Skills — reusable playbooks for tasks you repeat, such as your deploy process or your review checklist.
All of it is plain markdown, versioned in git. No vendor lock-in, no database.
Layer 1: the instructions file
Create a CLAUDE.md at the root of your project (or ~/.claude/CLAUDE.md for global rules). Keep it short and blunt. Mine enforces rules such as verifying before claiming done and never committing unrelated files.
Copy-paste starter:
# Working rules
## Verification — non-negotiable
- Never report a task complete until typecheck and lint pass.
- A file write is not success. Code must compile.
## Git discipline
- One feature per branch. Scoped commits: add exact files, never `git add .`
- Never push without running the project checklist.
## Output discipline
- Lead with the result. No filler, no restating the question.
- When the answer is one line, give one line.
## Project facts
- Stack: [your stack]
- Commands: typecheck `npx tsc --noEmit`, lint `npx eslint . --quiet`, test `npm test`The last section matters most because it gives the AI commands to check its own work. In my experience that single block removes half the babysitting.
Layer 2: memory files
One file per fact, plus an index. The index is loaded every session, and individual memories are pulled in when relevant:
memory/
MEMORY.md <- index: one line per memory
api-rate-limits.md <- one fact
client-x-scope.md <- one factEach memory file:
---
name: api-rate-limits
description: Our provider caps at 100 req/min — batch accordingly
type: project
---
The payment provider rate-limits at 100 requests/minute.
Why: hit this in production on 2026-05-02.
How to apply: batch webhook retries, never loop unthrottled calls.The rule that makes this work: after any correction, write a memory. If you told the AI "no, we use tabs here" once, write that sentence into a file so you never have to say it again.
Layer 3: skills
A skill is a markdown playbook the AI loads when a task matches. Anything you would otherwise re-explain, from design conventions to deployment steps, fits here.
---
name: design-taste
description: Invoke before any UI work — typography, spacing, motion rules
---
## Typography
- Body text max 65 characters per line
- Bold for emphasis, never italic. Underline only for links.
## Motion
- Animate only transform and opacity. Keep under 300ms.
- Always honor prefers-reduced-motion.Claude Code picks these up from .claude/skills/ automatically. Ten short skills beat one giant document: the AI loads only what the task needs.
Subagents: the multiplier
On a big task, have the main session dispatch subagents instead of doing everything itself: one explores the codebase, one implements, one reviews. Each gets a clean context and a single job, while the main session orchestrates and keeps the overview.
Practical rule: research and exploration go to subagents, decisions stay with you and the main session.
Start today, small
- Write a 20-line
CLAUDE.mdwith your verification commands. - Create
memory/MEMORY.md, empty. - Next time you correct your AI, save the correction as a memory file.
Step 3 is the loop that matters: correct once, write it down. Add skills and subagents later, when the same correction or the same task comes back.
Stanislas Molveau
Founder, Molveau Studio
I design and build web and mobile products, and write these guides from teardowns of real apps rather than theory.