wiki-ingest

wiki-ingest is a command for Claude Code from zhaixin244-wq/fnw. It costs 0 tokens per session (487 once invoked), scanned A, original, MIT.

A command that turns raw files in a knowledge folder into linked, structured wiki pages. A wiki is an organized set of reference pages; here, the command identifies entities, concepts, parameters, and signals from source documents.

In plain words
What is it for?
Use it to process one source file or all uncompiled files, preview the changes, create entity, concept, and comparison pages, update the wiki index and hot cache, and document chip protocols, modules, and design methods.
Why use it?
It removes the manual work of creating pages, cross-references, and indexes from engineering notes. It also preserves links back to the original knowledge files.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to process one source file or all uncompiled files, preview the changes, create entity, concept, and comparison pages, update the wiki index and hot cache, and document chip protocols, modules, and design methods.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zhaixin244-wq/fnw/wiki-ingest
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.

Clone the repo
git clone --depth 1 https://github.com/zhaixin244-wq/fnw

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 wiki-ingest

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhaixin244-wq/fnw/wiki-ingest/github.svg)](https://agentmods.dev/commands/zhaixin244-wq/fnw/wiki-ingest)
Your own site
<a href="https://agentmods.dev/commands/zhaixin244-wq/fnw/wiki-ingest"><img src="https://agentmods.dev/badge/commands/zhaixin244-wq/fnw/wiki-ingest/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 wiki-ingest

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhaixin244-wq/fnw/wiki-ingest"><img src="https://agentmods.dev/badge/commands/zhaixin244-wq/fnw/wiki-ingest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 487 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.
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.00000 $0.00487
Opus 5 $0.00000 $0.00244
Sonnet 5 $0.00000 $0.00097
Haiku 4.5 $0.00000 $0.00049

Measured 11d ago against content hash 52c605d6be97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

wiki-ingest 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 11d 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.

.claude/commands/wiki-ingest.md · 49 lines

What it actually says

Wiki Ingest — 知识源文件编译

将 knowledge/ 目录中的原始文档编译为结构化 wiki 页面。

执行流程

  1. 读取源文件:从 $ARGUMENTS 指定的路径读取原始文档

    • 如未指定参数,扫描 knowledge/ 中未编译的文件
    • 如指定 --all,批量处理所有未编译文件
    • 如指定 --dry-run,仅预览不实际写入
  2. 提取实体/概念:从源文件中识别:

    • 实体(协议、模块、IP、设计方法)
    • 概念(设计模式、策略、机制)
    • 关键参数和信号
  3. 生成结构化页面:按 wiki 模板格式生成:

    • entities/ — 实体页面(协议/CBB/IP/设计方法)
    • concepts/ — 概念页面(设计模式/策略)
    • comparisons/ — 对比页面(如涉及多实体比较)
  4. 更新交叉引用

    • 新页面引用已存在的相关页面
    • 已存在页面添加对新页面的引用
  5. 更新索引:更新 wiki/index.md

  6. 更新 Hot Cache:更新 wiki/hot.md

芯片领域 Ingest 规则

  • 实体页面必须包含:基本信息、核心特征、关键信号/参数、设计要点
  • 来源必须追溯到 knowledge/ 中的原始文件
  • CBB 模块页面需包含:接口定义、时序约束、面积预估
  • 协议页面需包含:信号列表、时序图描述、设计约束
  • 交叉引用必须双向:新页面→相关页面 + 相关页面→新页面

参数

  • $ARGUMENTS — 源文件路径、--all--dry-run

使用示例

/wiki-ingest .claude/knowledge/bus-protocol/pcie.md     # 单文件
/wiki-ingest --all                                       # 批量所有
/wiki-ingest --dry-run                                   # 预览模式
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. 11d ago First seen · 49 lines · 0 tokens per session scan A 52c605d6be97

Subscribe to this mod's changes

wiki-ingest is a command published in the GitHub repository zhaixin244-wq/fnw (29 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 487 tokens. 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.