Agent skill

Knowledge Compile

by ChanningLua in ChanningLua/prax-agent

把一堆 raw markdown(抓取/笔记/文章)压成 Obsidian 风格 wiki —— 有 TOC、有按主题聚合、有日简报

MITAuto-check: notesDocuments & Office

Install Knowledge Compile

skills CLI
$ npx skills add ChanningLua/prax-agent --skill knowledge-compile -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ChanningLua/prax-agent knowledge-compile --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ChanningLua/prax-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/prax/skills/knowledge-compile .claude/skills/knowledge-compile && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knowledge-compile
GitHub stars
273
Token cost
~914 tokens
SKILL.md length
187 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

把一堆 raw markdown(抓取/笔记/文章)压成 Obsidian 风格 wiki —— 有 TOC、有按主题聚合、有日简报

  • Tasks that involve Markdown
  • SKILL.md covers 何时用, 输入, 产出(约定) and 标准执行流程, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Knowledge Compile is an agent skill from ChanningLua/prax-agent. 把一堆 raw markdown(抓取/笔记/文章)压成 Obsidian 风格 wiki —— 有 TOC、有按主题聚合、有日简报

Its SKILL.md is about 910 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Markdown. It works with Obsidian. The repository describes itself as: Self-improving agent runtime that learns from experience — test-verify-fix loops, correction detection, cross-project memory, multi-model orchestration. The licence is MIT.

When your agent uses it

  • Tasks that involve Markdown

Example prompts

  • “/knowledge-compile”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Glob, Grep, Bash

What it can do on your machine

Read from SKILL.md and the folder at commit 19d016b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Glob
    • Grep
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knowledge Compile loads about 914 tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 187 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~914

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Glob, Grep, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ChanningLua/prax-agent at commit 19d016b, republished under its MIT licence (© ChanningLua). 187 words, ~914 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-compile/SKILL.md (or your agent's skills folder).
name
knowledge-compile
description
把一堆 raw markdown(抓取/笔记/文章)压成 Obsidian 风格 wiki —— 有 TOC、有按主题聚合、有日简报
allowed-tools
Read, Write, Glob, Grep, Bash
triggers
整理, 编译, compile, wiki, 知识库, digest, 简报, 归档, 沉淀, llm-wiki, 日报, 周报, obsidian
tags
knowledge, compile, wiki, obsidian, digest
priority
7

知识编译技能:把 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

模板:

markdown
---
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
markdown
---
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]]
- ...(按时间倒序)
步骤 5:写 daily-digest.md

硬约束:一屏能看完。用户在微信日报里看到的就是这份。

markdown
---
date: 2026-04-22
article_count: 23
topic_count: 5
---

# 今日简报 · 2026-04-22

## 一句话总览
<15 字以内的主线,例如:Anthropic 发 Opus 4.7,社区讨论集中在长上下文成本>

## 100 字摘要
<精炼到 3-4 句话>

## 今日亮点
1. **模型发布**:Opus 4.7 上线,上下文 1M tokens([[topics/model-releases]])
2. **AI 工具**:Cursor 推出背景 Agent([[topics/ai-tools]])
3. **工程实践**:...

## 报告位置
- 完整索引:[[index]]
- 原始归档:`<input-dir>`
步骤 6:返回摘要给用户

简要告诉用户:

  • 扫描到多少文件、聚成多少主题
  • 产出的 index.md / daily-digest.md / topics/* 路径
  • 如果后续要推送(Notify 工具 / cron 的 notify_channel),提示用户要把 daily-digest.md 的内容作为通知 body

和其他技能的接力

上游本技能下游
browser-scrape 抓到 <dir>/*.md编译成 wikiNotify 工具把 daily-digest.md 发到飞书
用户手动往目录里丢 markdown同上同上
cron 定时触发输入目录由 date 决定cron 的 notify_on=success 自动触发

常见错误与对策

  • 聚类过细:20 篇文章分出 15 个主题 → 主题变"标签"。合并成 3-7 个主主题
  • 主题间重复:同一篇在多个主题里出现 → 每文只归一个主主题
  • digest 太长:超过一屏就不叫 digest。限制:总览 15 字、摘要 100 字、亮点最多 5 条
  • 忘了双链:用 [原文](file.md) 写法 Obsidian 不能双向跳转;必须用 [[file]]
  • 误删原文:本技能只写不删,原文件保持不动

不做的事

  • 不做事实核验(Fact-check 不是本技能职责)
  • 不做翻译(除非用户明确要求)
  • 不加广告/情绪评价(保持中立)
  • 不抓新内容(抓取是 browser-scrape 的事)

© ChanningLua, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/prax/skills/knowledge-compile of ChanningLua/prax-agent.

Open the folder on GitHubat commit 19d016b

Compare with similar skills

Knowledge Compile next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knowledge Compile compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Compile this skillChanningLua/prax-agent273—~914Automated safety check: NotesMIT
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0
Pandoc DOCX TemplateAchuan-2/pandoc_docx_template1.1k—~1kAutomated safety check: PassNone
Obsidian MarkdownKevRojo/Dulus141—~1.4kAutomated safety check: PassGPL-3.0
MineruNebutra/MinerU-Skill122—~504Automated safety check: PassMIT
Gdoc To Markdowniurykrieger/claude-bedrock1051 repos~3.8kAutomated safety check: NotesMIT

Similar skills

  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • Pandoc DOCX Template

    Achuan-2/pandoc_docx_template

    A skill your agent uses when converting Markdown to Word DOCX or DOCX back to Markdown with Pandoc, especially when the output should use the bundled Chinese Word reference templates, heading…

    1.1k GitHub stars~1k tokensUpdated 3 mo ago
    Documents & OfficeAuto-check passed
  • Obsidian Markdown

    KevRojo/Dulus

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    141 GitHub stars~1.4k tokensUpdated 5 days ago
    Documents & OfficeAuto-check passed
  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.

    122 GitHub stars~504 tokensUpdated 14 days ago
    Documents & OfficeAuto-check passed
  • Gdoc To Markdown

    iurykrieger/claude-bedrock

    Internal fetcher module for Google Docs and Sheets. An agent skill from iurykrieger/claude-bedrock.

    105 GitHub starsUsed in 1 repo~3.8k tokens
    Documents & OfficeAuto-check: notes
  • Textbook To Md

    drpwchen/textbook-to-note

    Convert PDF/EPUB textbooks to searchable markdown files for an AI agent's own reference.

    105 GitHub stars~3.5k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed

More from ChanningLua/prax-agent

All 12 skills in this repo
  • Prax Shift

    ChanningLua/prax-agent

    Hand coding work or explicitly authorized one-shot verification to Prax Shift, inspect a shift, or schedule supported coding work with Claude as the worker.

    273 GitHub stars~1.4k tokensUpdated 26 days ago
    Auto-check passed
  • Prax Shift

    ChanningLua/prax-agent

    Hand coding work or explicitly authorized one-shot verification to Prax Shift, inspect a shift, or schedule supported coding work with Codex as the worker.

    273 GitHub stars~1.6k tokensUpdated 26 days ago
    Auto-check passed
  • AI News Daily

    ChanningLua/prax-agent

    端到端 pipeline —— 抓 X/知乎/Bilibili AI 相关热门 → 整理成 wiki → 推送飞书日报. An agent skill from ChanningLua/prax-agent.

    273 GitHub stars~1.3k tokensUpdated 26 days ago
    Auto-check: notes
  • Browser Scrape

    ChanningLua/prax-agent

    用 AutoCLI 二进制驱动用户已登录的 Chrome 抓取 Twitter/X、知乎、Bilibili、Reddit 等 55+ 站点

    273 GitHub stars~587 tokensUpdated 26 days ago
    Auto-check: notes
  • Hotspot Article

    ChanningLua/prax-agent

    从近期大事件、真实需求和常青决策中选题,完成多源研究、业务落地、实测、事实核验和精选文章. An agent skill from ChanningLua/prax-agent.

    273 GitHub stars~2.7k tokensUpdated 26 days ago
    Auto-check: notes
  • PR Triage

    ChanningLua/prax-agent

    给单个 PR 做代码感知 triage —— 分类 / 跑测试 / 扫依赖 / 产出审查笔记. An agent skill from ChanningLua/prax-agent.

    273 GitHub stars~1.4k tokensUpdated 26 days ago
    Auto-check: notes

Works with

Questions about Knowledge Compile

What does Knowledge Compile do?

把一堆 raw markdown(抓取/笔记/文章)压成 Obsidian 风格 wiki —— 有 TOC、有按主题聚合、有日简报. Knowledge Compile is an agent skill from ChanningLua/prax-agent.

When should I use Knowledge Compile?

Knowledge Compile fits situations like: tasks that involve Markdown.

How do I install Knowledge Compile in Claude Code?

Run `npx skills add ChanningLua/prax-agent --skill knowledge-compile -a claude-code`. Or copy the skill folder (src/prax/skills/knowledge-compile in ChanningLua/prax-agent) into .claude/skills/knowledge-compile in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Compile in Codex?

Run `npx skills add ChanningLua/prax-agent --skill knowledge-compile -a codex`. Or copy the skill folder (src/prax/skills/knowledge-compile in ChanningLua/prax-agent) into .agents/skills/knowledge-compile in your project. Codex loads it when a task matches its description.

Can I use Knowledge Compile in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ChanningLua/prax-agent --skill knowledge-compile -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-compile, .gemini/skills/knowledge-compile, .github/skills/knowledge-compile and .opencode/skills/knowledge-compile in your project.

What does Knowledge Compile need to run?

SKILL.md names no scripts, command-line tools or credentials: Knowledge Compile is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Glob, Grep, Bash.

Does Knowledge Compile access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Knowledge Compile safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Knowledge Compile use?

Knowledge Compile is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Compile use?

About 914 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knowledge Compile?

Skills that share tags, products or a category with Knowledge Compile: Obsidian Markdown (Atmosphere/atmosphere, 3.8k stars), Pandoc DOCX Template (Achuan-2/pandoc_docx_template, 1.1k stars), Obsidian Markdown (KevRojo/Dulus, 141 stars) and Mineru (Nebutra/MinerU-Skill, 122 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Compile?

ChanningLua (a GitHub user) maintains it in ChanningLua/prax-agent, which has 273 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 11, 2026.

Source: ChanningLua/prax-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.