im-local-kb

im-local-kb is a skill for Claude Code, Codex from cafe3310/public-agent-skills. It costs 27 tokens per session (1,327 once invoked), scanned A, original, Apache-2.0.

A local knowledge-base manager for turning chat logs into organized Markdown records and sourced project documents. A knowledge base is a searchable collection of stored information.

In plain words
What is it for?
Use it to organize chat histories, define which project information to extract, detect gaps in records, and create traceable output documents.
Why use it?
It preserves archived chat data, tracks missing periods, and requires conclusions to point back to their source files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to organize chat histories, define which project information to extract, detect gaps in records, and create traceable output documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cafe3310/public-agent-skills/im-local-kb
Install

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.

Any agent
npx skills add cafe3310/public-agent-skills --skill im-local-kb
Clone the repo
git clone --depth 1 https://github.com/cafe3310/public-agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for im-local-kb

README.md
[![agentmods](https://agentmods.dev/badge/skills/cafe3310/public-agent-skills/im-local-kb/github.svg)](https://agentmods.dev/skills/cafe3310/public-agent-skills/im-local-kb)
Your own site
<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.

agentmods 80×15 button for im-local-kb

Your own site · 80×15
<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>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,327 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 12d ago against content hash 6f03275b7654, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 6 executable files (workflows/01_ingest/SCRIPT_normalize_merge.py, workflows/01_ingest/SCRIPT_util.py, workflows/02_gap_check/SCRIPT_analyze_gaps.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/im-local-kb/SKILL.md · 82 lines

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)

  1. 数据不可变原则: 严禁删除 01-chats-input-organized 中已归档的历史数据。所有修正必须通过追加内容实现。
  2. 引用溯源原则: 在生成分析报告(Output)时,必须在段落末尾标注信息来源(如 [来源: 产品群/2023-10.md])。
  3. 断点续传原则: 处理大量数据时,务必检查 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

Read the full file on GitHub · 82 lines

Changes

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.

  1. 12d ago First seen · 82 lines · 27 tokens per session scan A 6f03275b7654

Subscribe to this mod's changes

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.

Related

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'.

Dianel555/DSkills · 89 tokens

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.

flc1125/skills · 50 tokens

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".

thoreinstein/gemini-obsidian · 64 tokens

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…

flc1125/skills · 72 tokens

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.

flc1125/skills · 83 tokens

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.

limecloud/lime · 92 tokens