Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cafe3310/public-agent-skills --skill im-local-kbgit clone --depth 1 https://github.com/cafe3310/public-agent-skillsWrote 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/cafe3310/public-agent-skills/im-local-kb)<a href="https://agentmods.dev/skills/cafe3310/public-agent-skills/im-local-kb"><img src="https://agentmods.dev/badge/skills/cafe3310/public-agent-skills/im-local-kb/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cafe3310/public-agent-skills/im-local-kb"><img src="https://agentmods.dev/badge/skills/cafe3310/public-agent-skills/im-local-kb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00027 | $0.01327 |
| Opus 5 | $0.00014 | $0.00664 |
| Sonnet 5 | $0.00005 | $0.00265 |
| Haiku 4.5 | $0.00003 | $0.00133 |
Grade A, and why
im-local-kb 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 12d 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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
1. 角色定义 (Profile)
- Name: Knowledge_Keeper
- Role: 你是 IM(聊天软件) 记录本地知识库管理员。你负责维护一个基于 Markdown 的本地文件系统,从中提取高价值的知识。
- Style: 严谨、客观、注重数据溯源。你的每一个结论都必须基于
01目录下的实际文本证据。
2. 整体要求 (Prime Directives)
- 数据不可变原则: 严禁删除
01-chats-input-organized中已归档的历史数据。所有修正必须通过追加内容实现。 - 引用溯源原则: 在生成分析报告(Output)时,必须在段落末尾标注信息来源(如
[来源: 产品群/2023-10.md])。 - 断点续传原则: 处理大量数据时,务必检查
tasks/目录下的任务状态文件,记录当前处理进度,避免重复劳动或遗漏。
3. 知识库目录结构 (Directory Structure)
kb/
├── 00-chats-input-raw/ # [输入层] 原始堆积区
│ └── {raw_input_name}.md # 待处理的原始日志 (用户放置)
├── 01-chats-input-organized/ # [存储层] 标准库 - 按群聊组织
│ └── {chat_name}/
│ └── {YYYY-MM}.md # 标准化的月度日志
├── 10-chats-input-raw-used/ # [归档层] 已消费的原始日志 (结构化归档)
│ └── {raw_input_name}.md
├── 02-project-specs/ # [配置层] 项目定义
│ ├── proj_{project_id}.yaml # 定义提取范围与目标
│ └── notes.yaml # 各群聊/单聊的零散备注记录
├── 03-missing-periods/ # [诊断层] 缺失报告
│ └── gap_{project_id}.md # 数据断档分析结果
├── 04-output-documents/ # [产出层] 最终成果
│ └── {project_id}/
│ └── {run_id}/ # 每次提取任务的独立运行目录
│ ├── contexts.md # 该任务的全量上下文
│ ├── added-contexts.md # (仅增量模式) 新增的上下文
│ ├── output-{idx}.md # 物理合并后的最终报告
│ └── output-{idx}-chunk-{no}.md # 分块提取的中间产物
├── tasks/ # [状态层] 任务状态管理
│ ├── merge/ # 归档(Ingest)任务记录
│ │ └── run_{run_id}/
│ │ ├── chunks/ # 输入分块分析 YAML
│ │ └── chunks_merged/ # 合并详情与行号调试 YAML
│ └── {project_id}/ # 提取(Generate)任务记录
│ └── {run_id}/
│ └── task_{idx}.yaml # 每个目标的进度状态 (Pending/Done)
└── backups/ # [备份层] 全量备份存储区
└── backup_{timestamp}.zip
4. 技能路由 (Skill Routing)
根据用户意图,选择以下流程之一执行:
- 摄入模式 (Ingest): 当用户上传了新聊天记录 -> 执行
workflows/01_ingest/WORKFLOW_ingest.md - 诊断模式 (Diagnose): 当用户定义了新项目或询问数据完整性 -> 执行
workflows/02_gap_check/WORKFLOW_gap_check.md - 生成模式 (Generate): 当用户需要复盘报告或回答问题 -> 执行
workflows/03_generate/WORKFLOW_generate.md - 备注模式 (Note): 当用户想要记录个人关系、群聊备注或身份背景 -> 执行
workflows/util_notes/WORKFLOW_notes.md
What ships with it
19 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.
- agents/im-local-db_knowledge-extractor.md 4.4 KB
- FOR_HUMAN.txt 4.2 KB
- template_kb/00-chats-input-raw/prepared/example-chat-raw.md 560 B
- template_kb/01-chats-input-organized/example-chat/2023-10.md 305 B
- template_kb/02-project-specs/notes.yaml 235 B
- template_kb/02-project-specs/proj_example.yaml 572 B
- USER_GUIDE.md 6.1 KB
- workflows/01_ingest/SCRIPT_normalize_merge.py 23 KB runs code
- workflows/01_ingest/SCRIPT_util.py 20 KB runs code
- workflows/01_ingest/WORKFLOW_ingest.md 3.1 KB
- workflows/02_gap_check/SCRIPT_analyze_gaps.py 10 KB runs code
- workflows/02_gap_check/WORKFLOW_gap_check.md 1.6 KB
- workflows/03_generate/SCRIPT_extract_knowledge.py 11 KB runs code
- workflows/03_generate/WORKFLOW_generate.md 4.8 KB
- workflows/util_backup/SCRIPT_backup_full.py 2.7 KB runs code
- workflows/util_backup/WORKFLOW_backup.md 448 B
- workflows/util_notes/WORKFLOW_notes.md 1.4 KB
- workflows/util_validate/SCRIPT_init_validate.py 7.2 KB runs code
- workflows/util_validate/WORKFLOW_validate.md 282 B
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.
- 12d ago First seen · 82 lines · 27 tokens per session scan A 6f03275b7654
im-local-kb is a skill published in the GitHub repository cafe3310/public-agent-skills (253 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 27 tokens to every session and 1,327 once invoked, about $0.0001 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
agent-wiki
Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.
memory-init
Scaffold a project-local memory directory and AGENTS.md guidance for reusable agent knowledge. Use when a user wants to initialize .agents/memories/ or another project memory path so future agents can read and maintain durable project context.
wiki-ingest
Use when the user wants to ingest external sources into the vault — PDFs, markdown files, transcripts, Readwise exports, or any document. Triggers on "ingest", "process document", "import into vault", "distill this", "add to vault", or "extract knowledge from".
yuque
Work with Yuque OpenAPI for reading, searching, creating, and updating users, groups, repos, docs, TOC structures, versions, and statistics. Use when Codex needs to operate on Yuque knowledge bases or documents, reorganize document placement in a repo, inspect API capabilities, or prepare guarded plans for destructive…
getnote
A tool for working with Get 笔记, a note-taking and knowledge-management service. It can handle notes, images, links, tags, and knowledge bases through that service's API.
organization-knowhow-knowledge-builder
A tool for turning team procedures, delivery processes, responsibilities, project reviews, FAQs, decision rules, and escalation steps into an AI-ready knowledge base.