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.
npx skills add johnnywuj81/tokenknows --skill tokenknows-distillgit clone --depth 1 https://github.com/johnnywuj81/tokenknowsWrote 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/skills/johnnywuj81/tokenknows/tokenknows-distill)<a href="https://agentmods.dev/skills/johnnywuj81/tokenknows/tokenknows-distill"><img src="https://agentmods.dev/badge/skills/johnnywuj81/tokenknows/tokenknows-distill/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/skills/johnnywuj81/tokenknows/tokenknows-distill"><img src="https://agentmods.dev/badge/skills/johnnywuj81/tokenknows/tokenknows-distill.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.00115 | $0.00865 |
| Opus 5 | $0.00057 | $0.00432 |
| Sonnet 5 | $0.00023 | $0.00173 |
| Haiku 4.5 | $0.00012 | $0.00086 |
Grade B, and why
tokenknows-distill scanned grade B with 1 finding 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 8d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
把研发会话沉淀成结构化知识资产。工具来自 `tokenknows` MCP server(在 `~/.codex/config.toml` 的 `[mcp_servers.tokenknows]` 配置)。 What it actually says
TokenKnows 蒸馏
把研发会话沉淀成结构化知识资产。工具来自 tokenknows MCP server(在 ~/.codex/config.toml 的 [mcp_servers.tokenknows] 配置)。
何时用
- 用户想把当前/最近的工作沉淀成文档:"写个周报"、"出个 ADR"、"复盘一下这次故障"、"做个知识图谱"
- 用户想把会话提炼成可复用 skill:"把这套做法存成 skill"
7 种文档类型
| type | 用途 |
|---|---|
weekly_report |
本周进展 / Bug / 决策 / 风险 / 下周计划 |
tech_design |
技术方案 6 部分 |
adr |
架构决策记录 |
incident |
问题复盘 |
book |
长文档 (卷-章-节) |
agent_skill |
蒸馏可复用 SKILL.md (需主题 topic_hint) |
knowledge_graph |
实体关系图谱 |
关键步骤
- 先确认会话已入库 (use
mcp__tokenknows__submit_session_events): 把当前会话的关键 turn 提交到 TokenKnows,作为蒸馏素材。 - 触发蒸馏 (use
mcp__tokenknows__distill_document): 传type(上表之一) + 可选time_window(this_week / last_7_days / last_14_days / last_30_days)。agent_skill类型必须带topic_hint(单一主题,否则蒸不出可用 skill)。 - 取结果 (use
mcp__tokenknows__list_assets→mcp__tokenknows__get_asset→mcp__tokenknows__get_asset_chapters): 告诉用户文档已生成,给出 asset 标题 +view_url(绝对 URL,前缀由TOKENKNOWS_WEB_BASE决定,默认http://127.0.0.1:5173;登录 Web 工作台后查看/编辑/发布)。
好例子 / 坏例子
- 坏:用户说"写周报"→ 直接凭记忆编。应 先 submit 会话 + distill,让后端基于真实事件 + 证据链生成。
- 好:
distill_document(type="knowledge_graph", time_window="last_14_days")→ 返回 asset →get_asset_chapters拿图谱节点/边 → 转述给用户。
注意
- 工具会 POST 到本地后端 (默认
http://127.0.0.1:8001),后端必须在跑。后端不通 / 401 缺 token / 404 项目不存在时,工具会返回带修复指引的双语错误信息 — 原样转述给用户即可。 - 蒸馏是后台 5 阶段流水线 (collect → outline → content → evidence → assess),
distill_document立即返回 generating 态,稍后get_asset轮询到 draft。
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.
- 8d ago First seen · 47 lines · 115 tokens per session scan B 95861be15517
tokenknows-distill is a skill published in the GitHub repository johnnywuj81/tokenknows (4 stars, last pushed yesterday), licensed MIT. It adds 115 tokens to every session and 865 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
weekly-crm-report
Cleans a weekly CRM export and produces a regional sales summary. Activates when the user asks to clean a CRM export, deduplicate sales rows, calculate regional totals, or generate a weekly sales report from a CSV.
markitdown
A Python utility for converting various file formats (PDF, Word, Excel, PowerPoint, etc.) to Markdown. Use this skill to install and use MarkItDown for document conversion.
audit-dimensions
A review checklist for D1D25 specification files, covering the dimensions used to examine those documents.
wiki-page-writer
Generates rich technical documentation pages with dark-mode Mermaid diagrams, source code citations, and first-principles depth. Use when writing documentation, generating wiki pages, creating tech...
devpilot
Dev server supervisor for AI coders — manages process lifecycles, detects reloads, checks health, and recovers from crashes with structured JSON output.
documentation-generation-doc-generate
You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI...