Borrowing it
Nothing to install: this file belongs to gatelynch/llm-knowledge-base. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gatelynch/llm-knowledge-base/main/.claude/commands/compile.mdgit clone --depth 1 https://github.com/gatelynch/llm-knowledge-baseWrote 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.
[](https://agentmods.dev/commands/gatelynch/llm-knowledge-base/compile)<a href="https://agentmods.dev/commands/gatelynch/llm-knowledge-base/compile"><img src="https://agentmods.dev/badge/commands/gatelynch/llm-knowledge-base/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.
<a href="https://agentmods.dev/commands/gatelynch/llm-knowledge-base/compile"><img src="https://agentmods.dev/badge/commands/gatelynch/llm-knowledge-base/compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.01372 |
| Opus 5.5 | $0.00009 | $0.00549 |
| Sonnet 5.5 | $0.00005 | $0.00274 |
| Haiku 4.5 | $0.00002 | $0.00137 |
Grade A, and why
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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
知識庫編譯
把 raw/(素材)與 artifacts/(你的作品)編譯成結構化知識,存入 wiki/。
流程
1. 確認編譯範圍
- 如果使用者指定了路徑或數量,就處理那個範圍
- 如果沒有指定,讀取 wiki/indexes/All-Sources.md,與 raw/ 和 artifacts/ 比對,找出尚未編譯的新檔案
- 如果新檔案超過 15 個,告知使用者,建議分批處理(每批 10-15 個)
2. 判斷來源類型
根據檔案的子資料夾路徑自動判斷 origin:
origin: external(外部來源——他人撰寫)
raw/articles/raw/books/raw/podcasts/raw/papers/
origin: self(自己的——使用者撰寫)
raw/notes/raw/projects/artifacts/*
3. 讀取每個來源檔案
讀取每個檔案並理解其內容。依日期由新到舊處理。
4. 生成摘要(wiki/summaries/)
每個來源產出一份摘要。檔名格式:YYYYMMDD 簡短標題.md
外部來源(origin: external)
---
origin: external
source: "[[原始檔案名稱]]"
compiled: YYYY-MM-DD
tags: [tag1, tag2]
---
# 標題
## 核心結論
(1-3 句話——最重要的收穫)
## 關鍵證據
(支持結論的具體事實、數據、引述)
## 疑點
(不確定、有爭議或尚未驗證的主張)
## 術語
(這個來源引入的重要術語,附簡短定義)
自己的作品(origin: self)
---
origin: self
source: "[[你的作品檔名]]"
compiled: YYYY-MM-DD
tags: [tag1, tag2]
---
# 標題
## 我的主張
(這篇作品的核心論點或目標)
## 實踐經驗
(做了什麼、成效如何、實際發生了什麼)
## 未解問題
(寫完或做完後仍懸著的問題)
## 與研究的對照
(你的經驗如何與已知研究吻合或矛盾)
5. 提取或更新概念(wiki/concepts/)
從摘要中找出概念。檔名格式:概念名稱.md
新概念:建立條目
---
concept: 概念名稱
related: [相關概念1, 相關概念2]
updated: YYYY-MM-DD
sources:
- "[[來源1]]"
---
# 概念名稱
## 定義
## 我的實踐
(從 origin: self 來源整理——如何使用這個概念、發生了什麼、學到什麼)
## 外部觀點
(從 origin: external 來源整理——研究怎麼說、他人如何定義)
## 張力與缺口
(你的經驗與外部研究之間的矛盾,或尚未驗證的地方)
## 例子
## 來源
### 我的
### 外部
現有概念的更新規則:
- 在 sources 清單中附加新來源
- 依 origin 把新內容路由到對應段落:
origin: self→ 「我的實踐」,origin: external→ 「外部觀點」 - 如果概念同時有 self 和 external 來源,檢查「張力與缺口」是否需要更新
- 在「例子」中新增新例子
- 更新
updated日期 - 在來源清單中將來源歸類至「我的」或「外部」
6. 更新索引(wiki/indexes/)
- All-Sources.md:為每個新編譯的來源新增一行(來源、標籤、核心收穫、狀態)
- All-Concepts.md:如果有新建概念條目,新增一行(概念、條目連結、定義、相關概念)
7. 回報結果
告訴使用者:
- 共編譯了多少個檔案(分 external 與 self)
- 建立了哪些摘要
- 建立或更新了哪些概念
- 索引更新狀態
編譯原則
- 不修改 raw/ 或 artifacts/:素材是唯讀的
- source 是必填欄位:每份摘要都必須有 wikilink 指回原始檔案
- origin 是必填欄位:external 或 self,從來源路徑自動判斷
- 疑點不能留空(external):如果沒有發現問題,寫「這個來源的論點有充分支撐;沒有發現重大疑點」
- 概念需要交叉引用:只有在 2 個以上摘要中出現的概念才建立獨立條目。單一提及放在摘要的「術語」段落即可
- 檔名不加前綴:摘要與概念的檔名不加 S-、C- 等前綴
- 概念條目以使用者視角為主:「我的實踐」在「外部觀點」之前
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.
- 2mo ago First seen · 161 lines · 23 tokens per session scan A b905c6a7f2f0
compile is a command published in the GitHub repository gatelynch/llm-knowledge-base (343 stars, last pushed 7mo ago), licensed MIT. It adds 23 tokens to every session and 1,372 once invoked, about $0.0001 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.
compile compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| compilegatelynch/llm-knowledge-base | Command | 343 | 7mo ago | MIT | A | 23 | Claude Code |
| brand-generateferdinandobons/brand-docs | Command | 291 | 3mo ago | MIT | A | 0 | Claude Code |
| cti-report7onez/cti-expert | Command | 622 | 15d ago | none | A | 45 | Claude Code |
| render-figuresbraininahat/brains-in-a-hat | Command | 4 | 18d ago | MIT | A | 17 | Claude Code |
| ppt-image2-editable-rebuildwwe-dog/ppt-image2-editable-rebuild | Command | 204 | 5mo ago | Unlicense | A | 15 | Claude Code |
| publish-api-docsnavraj007in/architecture-cowork-plugin | Command | 3 | 4mo ago | Apache-2.0 | A | 17 | Claude Code |
| write-patentjiutuhky/my-super-capsule | Command | 11 | 8mo ago | MIT | A | 48 | Claude Code |