Agent Skills
› cosmicstack-labs/mercury-agent-skills
› gbrain-lite
gbrain-lite
GitHub轻量级个人知识库,用于结构化存储和检索书籍、人物及新闻等笔记。支持全文搜索与交叉引用,规范了从触发检查到创建条目的工作流,确保元数据完整并防止记忆溢出。
Trigger Scenarios
对话中提及书籍、人物、概念或新闻
需要整理长文本以避免占用智能体记忆空间
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill gbrain-lite -g -y
SKILL.md
Frontmatter
{
"name": "gbrain-lite",
"metadata": {
"tags": [
"knowledge-base",
"memory-management",
"markdown",
"cross-referencing",
"agent-memory",
"personal-knowledge-graph"
],
"author": "myuxin007",
"version": "1.0.0",
"category": "ai-ml"
},
"description": "Lightweight personal knowledge base — markdown + YAML frontmatter structured notes with full-text search and cross-referencing for AI agents"
}
GBrain Lite — Lightweight Personal Knowledge Base
Organize books, people, concepts, and news items from conversations into a searchable, cross-referenced markdown knowledge base.
Workspace
- Knowledge base directory:
brain/ - Subdirectories by type:
books/people/meetings/ideas/articles/projects/news/ - One entry = one
.mdfile - News entries by date:
news/YYYY-MM-DD/
Workflow
- Trigger check — Book/person/concept/news mentioned in conversation → proactively check brain
- Search — Full-text search in
brain/directory (ripgrep/grep) - Decide
- Existing entry → reference it, update if needed
- No entry + important → create immediately
- No entry + uncertain → ask user
- Create — Write
brain/{type}/{slug}.md- Slug: lowercase/hyphenated
- Must include YAML frontmatter (title, type, date, tags, summary)
- Cross-reference — Update
linksfield in related entries - Sync — Keep key entry index in agent memory
Rules
- Don't dump long content directly into agent memory — prefer brain
- Don't create entries without
titleanddate - Don't skip the
summaryfield — search and listing depend on it - Don't manually write
updated— it auto-updates on save - News entries must use
item_idas dedup key (format:github:owner/repo/hn:12345/arxiv:url) - Don't do full overwrite updates on existing entries — use targeted patches
Validation
- New entry has complete frontmatter (title, type, date, tags, summary)
- Full-text search finds the new entry
- News entries contain
item_id+first_seen+star_history(GitHub entries) - Agent memory usage below 90%, otherwise trigger distillation to brain
Pitfalls
Brain vs Memory confusion
- Symptom: Long-form content consumed all agent memory space
- Root cause: Everything dumped into memory instead of brain
- Fix: >500 chars → brain entry; memory only keeps index pointers. (Fixed: 2026-05-12)
Missing item_id on news entries
- Symptom: Duplicate news entries accumulate, dedup impossible
- Root cause: Agent skipped
item_idfield when creating news entries - Fix: Always include
item_idfor news entries, validated in creation workflow
References
references/garry-tan-gbrain-inspiration.md— GBrain system design reference
Version History
- 38e2523 Current 2026-07-05 19:36
Dependencies
-
optional
github:owner/repo


