repo-architecture
它能做什么
这项技能为你的知识库中新笔记的存放位置制定规则。它按页面的主题对页面分类,例如人物、公司或会议。
适用场景
- ✓当你的智能体准备创建新页面,需要选择文件夹的时候。
- ✓当一份笔记可能适合多个文件夹,而你希望有清晰的规则时。
- ✓当你想检查某个现有页面是否被归错了位置时。
技能链接
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/repo-architecture/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我和 Acme 的 Alice 通话的笔记应该保存在哪里?请帮我选择合适的文件夹。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先问这个页面主要是关于什么的,然后按照一份简短的判断清单操作。它会建议一个文件夹并说明理由,并从相关位置链接到该页面。
技术内容(原始 SKILL.md)
作者在 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
常见问题
文件夹是否取决于笔记的来源?
不取决于。归档依据的是笔记的主要主题,而不是来源或文件类型。
如果无法连接知识库怎么办?
智能体会改用它的书面规则,并说明这个归档位置来自那些规则。
其他技能也遵循同样的规则吗?
是的。其他写入知识库的技能使用相同的规则,因此整个知识库保持一致。
详情
作者的原始描述
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
热度
- GitHub 星标
- 31k
- 排名
- #9266
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …