capture-knowledge

capture-knowledge is a skill for Claude Code, Codex from YusenZhang0601/context-canopy. It costs 92 tokens per session (1,286 once invoked), scanned A, original, MIT.

A guide for saving useful, reusable knowledge from conversations and documents into a structured personal knowledge base. It separates original source material from concise pages about individual concepts.

In plain words
What is it for?
Use it to capture documents, debugging lessons, project knowledge, and conversation insights while preserving sources, checking for duplicates, and avoiding secrets.
Why use it?
It prevents large documents or conversations from becoming disorganized notes and keeps saved claims traceable to their sources.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the context-canopy plugin — 1 skill shipped together

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.

agentmods
npx agentmods add skills/yusenzhang0601/context-canopy/capture-knowledge
Any agent
npx skills add YusenZhang0601/context-canopy --skill capture-knowledge
Clone the repo
git clone --depth 1 https://github.com/YusenZhang0601/context-canopy

Made for: Claude Code, Codex.

Or install context-canopy, the plugin that ships this one along with the rest of its 1 skill.

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 capture-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/capture-knowledge.svg)](https://agentmods.dev/skills/yusenzhang0601/context-canopy/capture-knowledge)
Your own site
<a href="https://agentmods.dev/skills/yusenzhang0601/context-canopy/capture-knowledge"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/capture-knowledge.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,286 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00092 $0.01286
Opus 5 $0.00046 $0.00643
Sonnet 5 $0.00018 $0.00257
Haiku 4.5 $0.00009 $0.00129

Measured 5d ago against content hash 65debd9d150c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

capture-knowledge 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 5d 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.

mcp/skills/capture-knowledge/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Capture Knowledge

把材料保存为可追溯来源,并只将稳定、可复用的原子知识写入 canonical 图谱。

必读规则

先读 Vault 中的:

  • 90-System/SCHEMA.md
  • 90-System/ONTOLOGY.md
  • 90-System/WORKFLOWS.md
  • 90-System/INDEX.md

遵守以下边界:

  • 04-Sources 保存原始文档、完整报告、对话记录、运行日志和证据快照。
  • 01-Knowledge 只保存一个稳定概念、主张、方法、事件或合规实体。
  • 一个项目、人物或系统可以有简洁实体页,但只能包含身份、边界、当前状态、来源和原子子卡链接。
  • README、CHANGELOG、API 手册、故事、会议记录、时间线、命令大全和纯导航页不得直接成为 canonical 卡片。
  • 只更新已有概念;确认是新主题后才新建。
  • aliases 只能表示同一概念,不能容纳拆分后的不同主题。
  • 不复制密码、token、API key 或私钥。

工作流

1. 固化来源

若材料尚无持久来源:

  1. 将完整原文保存到 04-Sources 的相应领域和 provenance 批次。
  2. 保留标题、日期、原路径或 URL;外部活文件的高置信结论要保存不可变快照和 SHA。
  3. 若只有当前会话,使用 Current conversation,置信度不得为 high;有长期价值时优先生成会话来源记录。

不得为了建卡而改写既有来源文件。

2. 提取原子候选

先把材料拆成候选主题。每项必须能用一句话填写 atomic_scope,并通过:

  1. 主题是一个稳定概念、主张、方法、事件,或一个简洁实体。
  2. 所有实质段落都解释、限制、验证或应用同一主题。
  3. 与其他候选不存在同一主张的重复 owner。
  4. 有真实来源、置信度和至少两条 canonical 关系。

整份文档本身不是候选。没有稳定主题时,只保存来源,不创建卡片。

3. 查重和裁决

对每个候选串行执行:

  1. search_knowledge 搜索标题、别名和核心主张。
  2. 找到同一概念时使用返回的 target_path 更新。
  3. 精确重复或疑似重复返回裁决时,先决定更新既有页还是放弃候选;不得自动加时间戳制造重复卡。
  4. 使用 ONTOLOGY.md 中已注册的标签和关系语义。

4. 用户确认

展示候选时逐项给出:

  • 标题
  • card_form: atomicentity
  • atomic_scope: 一句话唯一主题
  • 新建或更新目标
  • 来源
  • 置信度与 freshness
  • 关系

用户要求直接保存时可以继续执行;存在影响主题边界的歧义时才询问。

5. 串行写入

逐个调用 capture_from_conversation,不要使用 Promise.all。每次写入至少传入:

{
  "title": "页面标题",
  "content": "只服务于一个主题的正文",
  "category": "Technical",
  "summary": "一句话摘要",
  "card_form": "atomic",
  "atomic_scope": "本页唯一负责解释的稳定主题",
  "tags": ["topic/knowledge-management"],
  "confidence": "medium",
  "freshness": "timeless",
  "source_refs": ["04-Sources/Knowledge/example.md"],
  "relations": [
    {
      "target": "上位页面",
      "label": "上位概念",
      "reciprocal_label": "组成部分"
    },
    {
      "target": "相关页面",
      "label": "支撑"
    }
  ]
}

content 不使用任何 Markdown 标题。需要展开时,以一个核心说明为主,后续只用 **边界**:**限制**:**验证**:**应用**:**证据**: 等标签解释同一 atomic_scope;并列主题必须拆卡。

时间敏感页面使用:

  • 安全、网络、运行配置、项目状态:默认 7 天复查。
  • 产品、API、工具版本:默认 30 天复查。
  • 外部研究或平台政策:默认 90 天复查。
  • timelessstaleblocked 不设置 review_after

Read the full file on GitHub · 126 lines

Files

What ships with it

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

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. 5d ago First seen · 126 lines · 92 tokens per session scan A 65debd9d150c

Subscribe to this mod's changes

capture-knowledge is a skill published in the GitHub repository YusenZhang0601/context-canopy (2 stars, last pushed 13d ago), licensed MIT. It adds 92 tokens to every session and 1,286 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

ori-memory

Persistent agent memory with learning retrieval. Knowledge graph on markdown files — capture insights, decisions, research, and learnings during work, then retrieve them weeks or months later. Use when knowledge is too valuable to lose but too much to inject into every prompt.

aayoawoyemi/Ori-Mnemos · 54 tokens

hipocampus-compaction

Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle. Run at session start when triggers are met, or via external scheduler.

kevin-hs-sohn/hipocampus · 45 tokens

hipocampus-core

3-tier agent memory system with 5-level compaction tree. Codex CLI version. Defines session start protocol, end-of-task checkpoints, and memory file management. MUST be followed every session.

kevin-hs-sohn/hipocampus · 44 tokens

hipocampus-recall

Memory recall guide. Structured retrieval from hipocampus memory — ROOT.md triage, manifest-based LLM selection, qmd search fallback.

kevin-hs-sohn/hipocampus · 34 tokens

hipocampus-search

Search memory using qmd (BM25 + optional vector) and compaction tree traversal. Use ROOT.md to decide whether to search memory or look externally. Always check memory before external lookups.

kevin-hs-sohn/hipocampus · 44 tokens

start

One-word self-unfolding onboarding. Sets up a fresh, unpersonalized vault end-to-end — installs the memory engine, runs the profile interview, scaffolds the vault, and teaches the user as it goes. The single front door.

xcota/pos · 51 tokens