Switching between codebases is part of studio life. Each one has its own vocabulary: what a “site profile” is, which function creates users, why there are two kinds of ID. You can reread the code every time you come back, or you can actually learn it.
We make a spaced-repetition app, so we did the obvious thing. The braineos-deck plugin for Claude Code turns a file, a folder or a topic into a Braineos flashcard deck, and lets you quiz yourself on it in the same conversation.
How it works
Run /braineos-deck:build src/auth (or any path, or just a topic name). For a folder, Claude starts with the entry points, the README and the public API rather than reading every file, then writes one card per key idea. The deck is created in your Braineos account, and from then on “quiz me on my auth deck” just works, either in Claude or in the Braineos app with proper review scheduling.
Under the hood, the plugin is our Braineos connector for Claude (an MCP server, signed in with OAuth), packaged with a command and a skill that knows how to write cards about code.
What a good card about code looks like
Most of the work went into the skill’s rules for cards, because the obvious approach is wrong. Pasting code onto a card gives you nothing to recall, just something to reread.
A useful card says what something is and what it’s responsible for:
resolveOrCreateUser: Looks up a user by auth ID and creates one if none exists. Called from the OAuth callback.
Not this:
authMiddleware:
if (!token) throw new TRPCError({ code: "UNAUTHORIZED" })
The second one rewritten as a concept, “Rejects any request without a bearer token before it reaches a procedure”, is something you can quiz yourself on.
Guardrails for decks made from private code
Decks made from internal code need care, so the plugin is strict about two things:
- What goes on a card. No secrets, credentials, connection strings, internal hostnames or verbatim source. Cards describe concepts, so a deck stays safe even if it’s made public later.
- Who can see it. On a paid account, decks the plugin creates are private by default. On a free account, where decks are public, it shows the deck name and sample cards and waits for an explicit go-ahead first.
A build creates at most 50 cards. If a folder has more to cover, you get the 50 most important concepts, a note saying how many remain, and an offer to add them in batches. It never truncates silently.
Why bother
Onboarding docs go stale, and reading code doesn’t stick. A small deck reviewed for a couple of minutes a day does a better job: the codebase’s vocabulary is still there when you come back to it.
It’s also a good example of the AI work we like best: a model doing the tedious extraction, inside guardrails, feeding into a tool that was already good at its job.
