Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/chubbyguan/chubbyskillsnpx agentmods add skills/chubbyguan/chubbyskills/knowledge-base-managementWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/chubbyguan/chubbyskills/knowledge-base-management)<a href="https://agentmods.dev/skills/chubbyguan/chubbyskills/knowledge-base-management"><img src="https://agentmods.dev/badge/skills/chubbyguan/chubbyskills/knowledge-base-management.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.04962 |
| Opus 5 | $0.00024 | $0.02481 |
| Sonnet 5 | $0.00010 | $0.00992 |
| Haiku 4.5 | $0.00005 | $0.00496 |
Grade A, and why
knowledge-base-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 506 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Base Management — 知识库全生命周期管理
核心架构
三层架构
素材库/ → Layer 1: 不可变原始素材(AI 只读)
wiki/ → Layer 2: AI 编译的结构化知识(AI 维护)
产出/ → Layer 3: 按需生成的视图(不持久化)
核心原则:素材库是事实源(不可变),Wiki 是 AI 编译的投影(必须溯源),产出是按需生成的视图(不持久化)。
Vault 配置
vault 路径通过环境变量配置,不写死在脚本里:
export VAULT_DIR="$HOME/Documents/your-vault" # 你的 Obsidian vault 根目录
- 健康检查 cron:建议每周日 9:00 运行
scripts/vault_health_check.py(见第 2 节)
1. 素材入库 (Ingest)
新素材处理流水线
用户丢素材 →
① 判断类型 → 存入素材库/对应子目录
② 提取关键信息 → 决定是否建 wiki 页面
③ 如果值得:建选题(打 SHARP 分)或更新项目页
④ 更新 wiki/index.md 索引
素材分级 (ABC Grading)
| 等级 | 标准 | 处理 |
|---|---|---|
| A | 核心方法论/框架/系统 | 优先编译为选题 |
| B | 有洞察但不够系统 | 备选,作为 A 的补充 |
| C | 水货/重复/与定位无关 | 归档,不主动编译 |
公众号文章处理
来源一:wechat-article-exporter 自动同步(每天 07:00 cron)
公众号文章直接存入 素材库/公众号文章/<公众号名>/,每日自动增量同步。
来源二:手机保存的文章同步(每天 08:00 cron) 通过手机保存的文章先落到一个待处理目录(按日期),再由一个归类脚本搬入素材库并按领域筛选优质文章做 A+B 深度处理。
归类脚本(如
sync_notes_to_kb.py)与各人的目录结构强相关,本仓库不内置,按下面的「工作流」自建即可。
工作流:
新文章入库 →
① 脚本自动归类到 素材库/公众号文章/<公众号名>/
② URL 去重(跳过已存在的文章)
③ 领域关键词筛选(AI/半导体/消费/电商/品牌/投资/Agent/Skill)
跳过纯营销、与用户领域无关的文章
④ 命中关键词的精选文章 → A+B 双轨处理(每日上限 5 篇)
A层:观点提取+分类+3条Takeaway → wiki/📡 外部输入/公众号/<公众号名>/<主题>/
B层:问题链+伴读引导 → 同上
⑤ 更新 wiki/index.md(外部输入 — 最新 A+B 处理 表格)
关键原则:
- 聚焦高价值主题(匹配用户兴趣),不追求全量覆盖
- 每个 wiki 页面必须用
sourcefrontmatter 列出引用素材路径 - 深度处理上限 5 篇/天,分批消化
- 文章路径格式:
[[../../../../素材库/公众号文章/<公众号>/<文件名>]]
2. 健康检查 (Audit)
自动检查项
每周日 9:00 cron 自动运行,检查:
- 断链(broken wikilinks)
- 缺 source 字段
- frontmatter 缺失
- 待沉淀概念
- 低链接密度
脚本:scripts/vault_health_check.py(本仓库提供,零依赖,纯标准库)
# 指定 vault 路径
python3 scripts/vault_health_check.py "$HOME/Documents/your-vault"
# 或读 VAULT_DIR 环境变量
export VAULT_DIR="$HOME/Documents/your-vault"
python3 scripts/vault_health_check.py --json
# 把缺 source 字段也视为问题(强溯源场景)
python3 scripts/vault_health_check.py --require-source
检查项:断链、缺 frontmatter/source/summary、孤立笔记、空目录、内容重复、文件名含空格。 存在断链时退出码为 1,方便接入 cron / CI 告警。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 506 lines · 49 tokens per session scan A 4fcbc3bfc34b
knowledge-base-management is a skill published in the GitHub repository chubbyguan/chubbyskills (659 stars, last pushed 18d ago), licensed MIT. It adds 49 tokens to every session and 4,962 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
wiki-switch
Switch between multiple Obsidian wiki vault profiles. Use this skill when the user says "/wiki-switch NAME", "switch to my work wiki", "switch vault", "change wiki", "which wiki am I on", "list my wikis", "show my vaults", "create a new vault config", or "add a new wiki profile". The skill manages named config files…
llm-wiki
Maintain a personal team knowledge base using the LLM Wiki pattern — incremental ingest, query, and lint operations on a layered wiki architecture.
wiki-export
Export the Obsidian wiki's knowledge graph to structured formats for use in external tools. Use this skill when the user says "export wiki", "export graph", "export to JSON", "export to Gephi", "export to Neo4j", "export to Postgres", "export to SQL", "graphml", "visualize wiki", "knowledge graph export", "export to…
wiki-query
Answer questions by searching the compiled Obsidian wiki. Use this skill when the user asks a question about their knowledge base, wants to find information across their wiki, asks "what do I know about X", "find everything related to Y", or wants synthesized answers with citations from their wiki pages. Also use when…
cross-linker
Scan the Obsidian wiki and automatically discover missing cross-references between pages. Use this skill when the user says "link my pages", "find missing links", "cross-reference", "connect my wiki", "add wikilinks", "what pages should be linked", or after any large ingestion to ensure new pages are woven into the…
pi-history-ingest
Ingest Pi coding agent session history into the Obsidian wiki. Use this skill when the user wants to mine their past Pi sessions for knowledge, import their /.pi/agent/sessions folder, extract insights from previous coding sessions, or says things like "process my Pi history", "add my Pi sessions to the wiki", "ingest…