repo-architecture
What it does
This skill sets the rules for where new notes go in your brain. It sorts pages by what they are about, such as a person, a company, or a meeting.
When to use it
- ✓When your agent is about to create a new page and needs to pick a folder.
- ✓When a note could fit more than one folder and you want a clear rule.
- ✓When you want to check whether an existing page was filed in the wrong place.
Skill link
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/repo-architecture/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Where should I save my notes from the call with Alice from Acme? Pick the right folder.”
5 new skills a week. 1 minute to read.
How it works
The agent asks what the page is mainly about, then follows a short decision list. It suggests one folder with the reason and links the page from related places.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Repo Architecture — Filing Rules
Full filing rules: See
skills/_brain-filing-rules.md
Contract
This skill guarantees:
- Every new page is filed by primary subject (not format, not source)
- The decision protocol is followed for ambiguous cases
- Common misfiling patterns are caught
Phases
- Identify the primary subject. What would you search for to find this page?
- Walk the decision tree:
- About a person →
people/{name-slug}.md - About a company →
companies/{name-slug}.md - A reusable concept/framework →
concepts/{slug}.md - An original idea →
originals/{slug}.md - A meeting →
meetings/{slug}.md - Media content →
media/{type}/{slug}.md - Raw data import →
sources/{slug}.md
- About a person →
- Cross-link. Link from related directories.
- Check notability. See
skills/conventions/quality.mdnotability gate.
Output Format
Advisory: "File this at {type}/{slug}.md because the primary subject is {reason}."
When it fails
Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:
list_pages/searchcannot find a matching directory or the brain is unreachable: fall back toskills/_brain-filing-rules.mdand say the placement came from the rules, not the live brain.get_pagereturnspage_not_foundfor the page being filed: confirm the slug with the user before choosing a directory.
Anti-Patterns
- Filing by format ("it's a PDF so it goes in sources/")
- Filing by source ("it came from email so it goes in sources/")
- Creating pages without checking if one already exists
- Using
sources/for anything except raw data dumps
FAQ
Does the folder depend on where the note came from?
No. Filing is based on the main subject of the note, not on the source or file type.
What if the brain cannot be reached?
The agent uses its written rules instead and says the placement came from those rules.
Do other skills follow the same rules?
Yes. Other brain-writing skills use the same rules, so the whole brain stays consistent.
Details
Original description by the author
Where new brain files go. Decision protocol for filing brain pages by primary subject, not by format or source. Reference for all brain-writing skills.
repo: garrytan/gbrain
Popularity
- GitHub stars
- 31k
- Ranking position
- #9266
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
gbrain
31kLets your agent search a shared company knowledge brain for facts about people, projects and decisions, and save durable notes to it.
brain-ingest-gate
31kChecks new content against an existing knowledge brain before it is added, to avoid duplicates and resolve named entities first.
brain-link-discipline
31kMakes sure your agent includes a working link to each brain page it reports, in the same message, so you can open it right away.
brain-ops
31kGives your agent the core routine for a knowledge brain: check existing context first, save explicit notes with their source, and link related pages.
Similar skills
technical-documentation
394kHelps your agent write and review clear technical docs and agent instruction files, so people and AI tools can follow them easily.
architecture-decision-records
280kHas your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
code-tour
280kLets your agent create step-by-step code walkthroughs with exact file and line references. Useful for intros, explanations, and reviews.