knowledge-compile

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 CodeCodex

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/channinglua/prax-agent/knowledge-compile
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, Codex.

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. 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 $0.00040 $0.01871
Opus 5 $0.00020 $0.00936
Sonnet 5 $0.00008 $0.00374
Haiku 4.5 $0.00004 $0.00187

Measured 2d ago against content hash 88501ecec9b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.mddaily-digest.mdtopics/<slug>.md):必须用 Write 工具,它会自动 mkdir -p 父目录。
  • 修改已存在文件:用 EditHashlineEdit
  • 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-releasesai-toolsengineeringsafety-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. 2d 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. 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

knowledge-base-management

Obsidian 知识库全生命周期管理:三层架构、素材入库(ABC分级)、健康检查、GBrain/GraphRAG/LLM Wiki 三件套集成、目录整理.

chubbyguan/chubbyskills · 49 tokens

knowledge_base

Manage the user's personal knowledge base — knowledge graph, documents, and wiki vault.

siddsachar/row-bot · 19 tokens

wiki-project

Create or update project pages in the Obsidian vault's 03 PROJECTS — status changes, decision log entries, milestones, meeting notes, future-project ideas. Use when the user says "log a decision for ", "update status", "new project page", "what's the state of ", "we had a meeting about ", "add a project idea", or…

pivoshenko/pivoshenko.ai · 98 tokens

obsidian-markdown

Obsidian Flavored Markdown syntax reference — wikilinks, embeds, callouts, properties/frontmatter, tags, comments, block IDs. Use when creating or editing .md files in an Obsidian vault, or when the user mentions wikilinks, callouts, frontmatter, embeds, or Obsidian notes. The wiki- skills assume this syntax.

pivoshenko/pivoshenko.ai · 80 tokens

obsidian

Operational skill for Claude to automate Obsidian vaults via URI schemes, Templater/Dataview patterns, Markdown structure, and local plugin workflows.

alivirgo/Major-AI-Skills · 35 tokens

wiki-capture

Route anything into the Obsidian vault (second brain) — a thought, URL, concept, snippet, or the 00 INBOX backlog. Use when the user says "add to my wiki", "capture this", "note this down", "save to vault", "process my inbox" — and also on wiki-free phrasings like "jot this down", "remember this idea", "TIL"…

pivoshenko/pivoshenko.ai · 125 tokens