agentleFS
derrickmehaffyderrickmehaffy/brain-template/.claude/skills/template-make-brain/SKILL.md

template-make-brain

Skill2 starsChanged 12 days agoMITView on GitHub

Create a new brain from this template (new) or turn an existing folder into one (adopt): check the computer, work out the setup answers and ask only what the person alone knows, show the rehearsal, decide and explain what adopt saves and leaves out, get a yes before the first commit, then draft the brain's folder map. Use when someone in a template session asks to make a brain for something or to turn a folder into a brain. Does NOT set up a copy of the template, which is brain-setup run in that copy, and does NOT repair an existing brain, which is brain-setup run in that brain.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run this only in the template's own checkout: brain.json role is template and local/ exists.

    line 27
  2. Very specific:

    Before the first commit, look at what would be saved (git -C "<dir>" add -A --dry-run, by top folder), every file over max_file_kb (the …

    line 90
  3. Distinctive:

    No file already in the folder was moved, renamed, overwritten or deleted, and no private term reached a tracked file.

    line 141

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Make a brain

A brain is made in one short conversation: a check of the computer, one or two questions, a rehearsal the person sees, then the harness writes it. new makes a brain in a new or empty folder; adopt turns a folder that holds work into one, and never moves, renames, overwrites or deletes a file already there. The person may never have used git or a terminal: decide what you can, say what each step does in plain words, and run every command yourself.

Where this sits

<!-- where:begin — generated by _meta/brain routing sync; do not edit -->

Runs after: nothing — an entry point into the tree.

Hand to next: nothing — a person takes it from here.

<!-- where:end -->

Call it directly when: someone in a template session asks for a brain for some work, or to turn a folder into one; nothing needs to run first.

Which command

Run this only in the template's own checkout: brain.json role is template and local/ exists. Without local/, this is a copy someone wants as their brain: hand straight to brain-setup here. The folder: the one the person names, as an absolute path (expand ~). If they name none, propose ~/Documents/Brains/<Name>, expanded, and say where that is. Missing or empty → new; holding files → adopt; holding a brain.json → a brain already, which brain-setup there repairs.

1. The computer, then the answers

  • Check first, yourself: python3 --version (3.9 or newer), git --version, and git config --global user.name and user.email. A missing tool: on a Mac, xcode-select --install and a box to click; on Linux, the package manager. No name or email: ask which should label the saved history (it stays on this computer unless backed up online), and set both with git config --global.
  • Quick or thorough: offer a quick setup, or an interview first ("grill me") so the brain starts out knowing their goals, systems and way of working; for the interview, read .claude/skills/brain-setup/references/interview.md and run it now. Then pick the brain's shape with .claude/skills/brain-setup/references/shapes.md and say it in one line.
  • Work out, don't quiz: the name and a one-line description from what they asked for; the prefix yourself (2 to 16 lowercase letters or digits, starting with a letter, never brain or template: "Homelab" → lab), saying only "its routines will be called lab-…".
  • Ask one question: anything that must never be saved in its history (server names, addresses, client or customer names, unreleased project names), said as they would write it, never a password. Each is one --private term, matched in any case as a whole word; an address range or a family of names becomes one re: pattern you write and explain. They keep their own copy of the list: it lives only on this computer.

The rest takes the defaults in brain.json; scripts that need packages add --python <interpreter> --packages allowed.

2. The rehearsal, shown before anything is written

_meta/brain new "<dir>" --name "<name>" --prefix <prefix> --description "<line>" --private "<term>" --dry-run
_meta/brain adopt "<dir>" --name "<name>" --prefix <prefix> --description "<line>" --private "<term>" --dry-run

One --private per term; <dir> absolute and quoted, since folders often hold spaces. The dry run changes nothing, not even a git init. Summarise it in a few plain lines. A refusal names its fix (a prefix it suggests, a term to change): make it with them.

For new, on a yes, run it without --dry-run: it writes the brain, installs the safety check on saving (the pre-commit hook), makes the first commit, adds the folder to local/brains.txt and prints doctor; go to step 6.

3. Adopt: say what the brain saves and what it leaves alone

Decide each of these, then tell the person in plain words; ask only where the answer is theirs:

  • Projects with their own history (nested repos): they stay out of the brain and keep their own history. Name each with no backup or unsaved work as work they would lose if this disk died, and offer to back it up later.
  • Large folders (assets, builds, datasets): left out, untouched.
  • Not saved in the brain's history: the preview lists what the allowlist leaves out. Where one looks like their own writing (notes/, a document folder), ask whether the brain should save it; on a yes, add !/<folder>/ below the managed block in .gitignore.
  • What is already here, all kept: CLAUDE.md and .gitignore get the managed block above their lines; .env stays, unsaved, with its key names only in .env.example; existing skills arrive undrawn (lint GAPs, which brain-write-skill draws later); an existing history is kept.

On a yes, run adopt without --dry-run. It writes the missing brain files and managed blocks, runs git init if needed, installs the hook, adds the folder to local/brains.txt, and stops before committing.

4. Adopt: the staging list, then the first commit

Before the first commit, look at what would be saved (git -C "<dir>" add -A --dry-run, by top folder), every file over max_file_kb (the guard refuses it: leave it out by default), any folder that looks private (private/, secret*, someone else's data: leave it out), and changes already in the folder's history (git -C "<dir>" status --short), which the commit would sweep in. Settle each BLOCK or WARN line: an ignore line below the managed block, or git rm -r --cached <path> to stop saving a file without deleting it. A .env the folder's history already holds: stop saving it, and tell them its secrets are in the old history and reach anywhere it was pushed, so they should change them. Never move or delete a file; a path inside a nested repo should never be listed: if one is, stop. Explain the result in a few lines, and only on a yes:

git -C "<dir>" add -A
git -C "<dir>" commit -m "meta(brain): adopt this folder as a brain from template v<version>"

<version> is the brain's brain.json template.version. When the guard refuses the commit, fix what it names with the person, never --no-verify. Then "<dir>/_meta/brain" doctor has no BLOCK.

5. Adopt: draft the folder map

From the inventory, draft the ## Folder map of the brain's CLAUDE.md: one line per top-level folder, what lives there and whether the brain saves it (Mods/: one repo per mod, not saved). Fill in the skeleton's section if CLAUDE.md has one; otherwise add it directly below the <!-- brain:end --> marker, above the folder's own notes, never inside the markers. Write it on a yes and leave it uncommitted, for the first session in the brain to commit through brain-sync.

6. The shape and the interview, in the new brain

Lay out the shape in the new folder as shapes.md says (folders, projects cloned in on a yes, the folder map), leaving it uncommitted like the folder map. After an interview, write its CLAUDE.md sections there, and put everything else it found (words, systems, recurring work, a first routine) in one open entry of the new brain's docs/INBOX.md, headed ## <date> · from setup · Finish setting up from the interview, with a - status: open line: the brain's first chat is told about it and works it through its own skills.

7. Hand over

Tell them where the brain is and how to open it: in the desktop app, the folder picker beside the environment selector, "Open folder…", that folder; in a terminal, claude in that folder. Every chat starts there: a chat started in a project inside it misses the brain's safety checks. In its first chat they can say "Back this brain up online" or "Keep it on this computer only", and then anything from its README.md.

Done when

  • The computer check passed, the person answered what only they could, and saw the rehearsal before anything was written.
  • new: the brain has its first commit, and doctor shows no BLOCK.
  • adopt: they heard what is saved and what is left alone, each nested repo with no backup named as work they would lose; each BLOCK or WARN line was settled; the first commit was made on a yes; doctor shows no BLOCK; a folder map is drafted or declined.
  • No file already in the folder was moved, renamed, overwritten or deleted, and no private term reached a tracked file.
  • The shape is laid out, and an interview's findings are in the new brain's CLAUDE.md and inbox.
  • They know the folder to open, and to start every chat there.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.