knowledge-compile

knowledge-compile is a skill for Claude Code from ChanningLua/prax-agent. It costs 40 tokens per session (1,871 once invoked), scanned A, original, MIT.

A knowledge-organizing tool that turns a folder of scattered Markdown notes, articles, and captured posts into an Obsidian-style wiki. It creates an index, topic pages with links back to the originals, and a short daily digest.

In plain words
What is it for?
It helps compile Markdown research into topic summaries, tables of contents, daily or weekly digests, and linked Obsidian notes.
Why use it?
Raw notes are difficult to browse when they come from many sources and lack a shared structure. This tool preserves the originals while grouping related material and making it easier to review.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It helps compile Markdown research into topic summaries, tables of contents, daily or weekly digests, and linked Obsidian notes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/channinglua/prax-agent/knowledge-compile
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 ChanningLua/prax-agent --skill knowledge-compile
Clone the repo
git clone --depth 1 https://github.com/ChanningLua/prax-agent

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/channinglua/prax-agent/knowledge-compile/github.svg)](https://agentmods.dev/skills/channinglua/prax-agent/knowledge-compile)
Your own site
<a href="https://agentmods.dev/skills/channinglua/prax-agent/knowledge-compile"><img src="https://agentmods.dev/badge/skills/channinglua/prax-agent/knowledge-compile/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 knowledge-compile

Your own site · 80×15
<a href="https://agentmods.dev/skills/channinglua/prax-agent/knowledge-compile"><img src="https://agentmods.dev/badge/skills/channinglua/prax-agent/knowledge-compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,871 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.00040 $0.01871
Opus 5.5 $0.00016 $0.00748
Sonnet 5.5 $0.00008 $0.00374
Haiku 4.5 $0.00004 $0.00187

Measured 1mo ago against content hash 88501ecec9b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

knowledge-compile 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 1mo 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.

src/prax/skills/knowledge-compile/SKILL.md · 189 lines

How it starts

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

知识编译技能:把 raw markdown 变 wiki

把一个目录下的散装 markdown(抓取的推文、知乎回答、文章笔记 ...)整理成结构化 wiki。产出在 Obsidian 里双链可用。

何时用

  • 用户说"整理今天抓的内容"、"把 X 目录编译成 wiki"、"生成日报/周报"
  • 和 browser-scrape 技能配套:先抓后编
  • 和 cron 任务配套:定时 pipeline 的最后一环

输入

一个目录,里面可能有:

  • 多个 *.md 文件(来自不同来源:twitter、zhihu、bilibili、read...)
  • 可选的 raw/*.json(原始抓取数据,用作溯源)

产出(约定)

写回同一个目录下:

<input-dir>/
├── index.md              # TOC + 一览表
├── daily-digest.md       # 一屏内看完:一句话总览 + 100 字摘要 + 今日亮点
├── topics/
│   ├── <topic-slug>.md   # 按主题聚合,内部用 Obsidian 双链 [[source-file]] 回引原文
│   └── ...
└── raw/                  # 保留原始文件(若已有)

硬约束:

  • 只新增 / 覆盖上面四类文件;不要删 .md 原文或 raw/
  • 原文保留在原路径,通过 [[文件名]] 双链引用
  • 所有时间用 ISO 格式(2026-04-22T17:05:00+08:00)
  • 中文优先,技术术语保留英文原词

工具选择(很关键):

  • 创建新文件(index.md、daily-digest.md、topics/<slug>.md):必须用 Write 工具,它会自动 mkdir -p 父目录。
  • 修改已存在文件:用 Edit 或 HashlineEdit。
  • HashlineEdit / Edit 对不存在的路径会报 File not found —— 不要用它们写新文件。

标准执行流程

步骤 1:扫描输入目录

Glob: <input-dir>/*.md
Glob: <input-dir>/raw/*.json   # 可选

读每个 .md,抽取 frontmatter(至少 source / url / scraped_at 可能存在),取第一段作为摘要候选。

步骤 2:聚类成主题

  • 用内容相似性 + 关键词共现,把文件分成 3-7 个主题
  • 主题名短、名词化、中文:如 模型发布、AI 工具、工程实践、安全与对齐
  • 每篇文章归入一个主主题(避免重复计数带来的膨胀)
  • 主题 slug 用拼音或英文短语:model-releases、ai-tools、engineering、safety-alignment

步骤 3:写 topics/<slug>.md

模板:

---
topic: 模型发布
slug: model-releases
article_count: 5
generated_at: 2026-04-22T17:05:00+08:00
---

# 模型发布

## 本期概要
<2-3 句话说明本主题下的整体动态>

## 条目

### [[twitter-17xxx]] — Anthropic 发布 Claude Opus 4.7
- 来源:X @AnthropicAI
- 时间:2026-04-22 09:30
- 要点:
  - <bullet 1>
  - <bullet 2>

### [[zhihu-abc123]] — <标题>
...

关键点:

  • [[文件名]] 不带 .md 后缀,指向原文件 stem
  • 一条一个 H3,不要堆成长段落
  • 要点用 bullet,每条 ≤ 30 字,严禁复述原文

步骤 4:写 index.md

---
generated_at: 2026-04-22T17:05:00+08:00
article_count: 23
topic_count: 5
---

# 索引 · 2026-04-22

## 主题一览

| 主题 | 条目数 | 入口 |
|---|---|---|
| 模型发布 | 5 | [[topics/model-releases]] |
| AI 工具 | 8 | [[topics/ai-tools]] |
...

## 原始文件

- [[twitter-17xxx]]
- [[zhihu-abc123]]
- ...(按时间倒序)

Read the full file on GitHub · 189 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. 1mo ago First seen · 189 lines · 40 tokens per session scan A 88501ecec9b8

Subscribe to this mod's changes

knowledge-compile is a skill published in the GitHub repository ChanningLua/prax-agent (272 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 1,871 once invoked, about $0.0002 per session on Opus 5.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.