DEV Community

Cover image for Claude Code as Executive Function: My ADHD-Brain Setup
Kai
Kai

Posted on • Originally published at getcraftly.dev

Claude Code as Executive Function: My ADHD-Brain Setup

I have ADHD. Verbal skill outpaces my motor planning by a lot — the gap measured on neuropsych testing is around forty points. That sounds abstract, but in practice it means I can think through a problem in full, narrate the solution out loud, and then sit down at my desk and watch the plan evaporate before any of it becomes code.

For years I treated this as a discipline problem. More lists. Better systems. Time blocks. It never stuck, because the bottleneck was never motivation. The bottleneck was the bridge between knowing what to do and actually doing it.

Then I started using Claude Code seriously, and the bottleneck got cheap.

This isn't a productivity-hack post. It's an honest writeup of the setup I use to get things shipped on days my brain would otherwise lose them. If you have ADHD, or you just find yourself with too many ideas and not enough execution, some of this might transfer.

The gap

Non-ADHD folks I've asked describe the task-to-action flow like this: "I think of what to do, then I do it." There's no perceptible step in between.

My version has a perceptible step, and it's expensive. A task gets thought of, sits in working memory, waits for motor planning to convert it into action, and — most days — quietly falls out of working memory before anything happens. The more complex the action (switching contexts, opening the right file, remembering the exact syntax), the more it costs, the more likely it drops.

I can reliably do small things. Big things require the brain to chain small things without dropping any. That chaining is the part that's broken.

Traditional productivity advice is about keeping more things in working memory or writing better lists. Neither fixes the gap — they just give the gap a bigger surface to fail on.

What actually helped

What helped was outsourcing the chain.

Not the decisions. Not the judgment. Those are still mine, and should stay mine. What I outsourced is the part where "I decided to refactor this file" has to become "I now remember the file path, open the editor, navigate to the function, remember the rename convention, write the new code, verify it compiles, commit with a good message."

Every step in that chain is a place where my brain drops the thread. Claude Code handles the chain. I handle the decisions.

The shift feels like this:

  • Old: think → try to chain → lose thread → frustrate → give up or half-ship
  • New: think → say what I want → review the diff → ship

I didn't get smarter. I got a prosthetic.

My setup, in practice

Most of the setup is just making Claude Code remember things I'd otherwise re-explain five times. ADHD brains are especially punishing when re-explaining is required — the overhead compounds. The setup reduces re-explanation to near zero.

1. CLAUDE.md — the project's memory

Every repo I use Claude Code in has a CLAUDE.md at the root. It holds project-level conventions, voice, tech stack, and anything I'd otherwise forget to say.

For my indie side project, mine contains:

  • Who I am in this project (an indie builder with specific voice)
  • Tech stack (Next.js 16, Tailwind v4, TypeScript strict, Framer Motion)
  • What's live vs. what's pending
  • Token-efficiency preferences (don't overexplain, just do)
  • Security rules (never commit PII, grep certain patterns)
  • Key decisions already made (so I don't get second-guessed)

Claude Code reads this file at the start of every session. I don't have to re-establish context. The AI already knows how I want to work.

This is huge for ADHD. Sessions are fragmented by design — I'll pick up at weird hours, in partial states of exhaustion. Without CLAUDE.md, every session starts from zero. With it, every session starts where the last one ended.

2. .claude/rules/ — doctrine files it re-reads every session

CLAUDE.md handles the what. .claude/rules/ handles the how.

Mine has three files right now:

  • content-doctrine.md — voice, tone, overclaim guard, native-English checks
  • privacy-security.md — PII that must never appear, secrets management
  • kai-persona.md — the persona I use for my public writing

These aren't tutorials I read — they're instructions Claude Code follows. Each one has a pre-publish checklist, a never-list, and specific patterns to grep for before anything ships.

The practical effect: I don't have to remember the rules. They're enforced automatically.

When I'm tired and about to commit something questionable, the rules catch it. When I forget my own voice mid-article, the doctrine catches it. The rules encode "what past-me already decided" so current-me doesn't have to re-decide it at 2am.

3. Slash commands for the stuff I'd otherwise re-explain daily

I built a handful of commands — markdown files in .claude/commands/ — for things I do over and over:

  • /morning — pulls world and tech trends, writes them to a daily feed file, then drafts that day's posts for my public account
  • /sync — updates state files after a decision shift
  • /resume — one-shot context summary if I jump between sessions
  • /learn — records a post's reaction so I can find patterns later
  • /knowledge — loads a topic's knowledge file only when needed

Each command is a markdown prompt. When I type /morning, Claude Code runs it exactly the same way every day. No re-explaining. No variation. No lost thread.

ADHD's enemy is decision fatigue. Slash commands make daily decisions invisible. I don't wonder "what do I do now?" — I just run /morning and the work starts.

4. Pre-commit hooks — protection from my own lapses

I have a pre-commit hook that blocks any commit containing my personal name, personal emails, specific location markers, or API-key-shaped strings.

This is belt-and-suspenders for a very real ADHD failure mode: forgetting to check. On exhausted days I'll paste something into a file I don't remember adding. The hook catches it before it becomes a git history problem.

The hook is maybe 60 lines of shell. It's the cheapest line of defense I've ever added. Twice this week it caught leaks I didn't notice.

What this changed

The shipping numbers changed first. I used to start three things and finish one. I now start two things and finish both, on an average week.

But the bigger change is less visible. I stopped dreading switching contexts. Before the setup, every context switch cost me a 15-minute ramp-up to remember where I was. Now the state files tell me exactly where I was — Claude Code re-reads them, summarizes in ten seconds, and I'm working.

The emotional tax of ADHD dev work is usually in the ramp-up, not the work itself. Killing the ramp-up killed most of the tax.

The other thing that changed: I stopped being mad at myself. Setups like this make the assumption that your brain will drop things — and that's the right assumption for my brain. When I miss something, it's the tool's job to catch it, not my job to have remembered. That reframing, weirdly, is what made the setup stick.

What this didn't change

It didn't cure ADHD. Nothing does.

On bad days I still spiral. The setup shortens the spiral — I can pick up with less context cost — but it doesn't prevent it.

It also didn't make me smarter. Judgment is still mine. Claude Code executes; I decide what's worth executing. When I decide badly, the tool executes my bad decision quickly. A faster bad idea is still bad.

And it didn't eliminate the work. Writing good prompts is its own skill. Writing good specs is harder than writing good code. The execution bottleneck moved. It didn't disappear.

But moving the bottleneck from motor planning to judgment and prompt craft is, for my specific brain, a massive upgrade. Motor planning was the broken step. Judgment and craft are steps I can actually practice and get better at.

If you want to try this

Start with the smallest possible version. CLAUDE.md in your project root, with just the basics — tech stack, voice, and whatever you'd otherwise re-explain every session. That alone is maybe 70% of the value.

Add slash commands for two things you do daily. That's another 20%.

Rules files and pre-commit hooks come later, when you have a specific pattern you keep failing on.

The goal isn't to build the perfect prosthetic. It's to notice where your brain drops the thread, and put one small piece of infrastructure in that exact spot. Then notice the next drop. Repeat.

For me, after a few months of this, I ship things I'd have started and abandoned a year ago. Not because my brain got better. Because the things that don't survive the chain are no longer allowed to matter.


I write about AI-heavy indie workflow, ADHD-adjacent dev patterns, and corporate automation from someone who can't use the good AI tools at their day job. If you want more of this, my newsletter ships weekly — subscribe here.

Top comments (0)