Im Local Kb logo

Im Local Kb

Community
cafe3310
im-local-kb

IM 知识整理和分析技能,专注于从聊天记录中提取高价值的知识

Overview

Publishercafe3310
Repositorypublic-agent-skills
Skill nameim-local-kb
Stars
256
Forks
30
Bundled files
19
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 19 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by cafe3310 on GitHub. Read the source before you install it.

Installation

Install the Im Local Kb AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cafe3310/public-agent-skills/tree/main/skills/im-local-kb
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cafe3310/public-agent-skills.git /tmp/public-agent-skills
mkdir -p .claude/skills
cp -r /tmp/public-agent-skills/skills/im-local-kb .claude/skills/im-local-kb
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Im Local Kb in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Im Local Kb on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Im Local Kb is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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)

text
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

5. 技能内容布局 (Skill Layout)

本 Skill 的工程目录按功能模块化分布,以便于维护和快速调用:

text
.gemini/skills/im-local-kb/
├── SKILL.md                    # 核心定义与路由概览
├── USER_GUIDE.md               # 面向用户的操作指南
├── agents/                     # 这个 Skill 所需的 Sub-Agent。你需要用合理方法安装到你的主 Agent。
├── template_kb/                # [范例] 真实的知识库结构模板
├── workflows/                  # [执行层] 按功能阶段划分的逻辑
│   ├── 01_ingest/              # 数据清洗与归档模块
│   ├── 02_gap_check/           # 完整性校验模块
│   ├── 03_generate/              # 知识提取与报告生成模块
│   ├── util_backup/            # 实用工具:备份
│   ├── util_notes/             # 实用工具:备注管理
│   └── util_validate/          # 实用工具:校验
└── tobewritten.md              # 待整理的技术细节与进阶文档

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Im Local Kb AI skill do?

IM 知识整理和分析技能,专注于从聊天记录中提取高价值的知识

Why use Im Local Kb on TypingMind?

Because you install it once and use it with any model. Im Local Kb is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Im Local Kb in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cafe3310/public-agent-skills/tree/main/skills/im-local-kb. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Im Local Kb?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Im Local Kb?

As many as you like. As long as a model supports skills, you can use Im Local Kb with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Im Local Kb AI skill free?

Yes. It is published on GitHub by cafe3310 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇