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 agentmods add skills/chenpg2/kw-engine/kw-initnpx skills add chenpg2/kw-engine --skill kw-initgit clone --depth 1 https://github.com/chenpg2/kw-engineWhat 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 | $0.00035 | $0.00843 |
| Opus 5 | $0.00017 | $0.00421 |
| Sonnet 5 | $0.00007 | $0.00169 |
| Haiku 4.5 | $0.00003 | $0.00084 |
Grade A, and why
kw-init 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.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/kw-init — scaffold or link a knowledge engine workspace
Two modes:
Mode 1: Link to an existing knowledge base (most common)
If a shared knowledge base already exists (e.g. ~/Downloads/soft/knowledge_wiki/memory/),
link this project to it instead of creating a new one:
kw link ~/Downloads/soft/knowledge_wiki/memory/
This creates .kw/config.yaml with paths.memory pointing to the shared library.
All kw commands (search, verify, status, etc.) now use the shared knowledge.
Mode 2: Create a new knowledge base from scratch
Run this once in any repo to set up a fresh, empty knowledge engine.
What it creates
<project-root>/
├── .kw/
│ └── config.yaml # Engine config (model routing, fetch policy)
├── memory/
│ ├── SCHEMA.md # Data structure contract
│ ├── index.json # Central index (starts empty)
│ ├── papers/ # L1 faithful readings
│ ├── principles/ # L2 abstract principles
│ ├── synthesis/ # L3 design-space, contradictions, gaps
│ └── golden/ # Exemplar records for quality reference
├── paper/ # Raw PDFs (gitignored)
├── process/
│ ├── extract-template.md # L1 extraction rubric
│ └── distill-rubric.md # L2 distillation rubric
└── problems/ # Use-case pointers
Procedure
- Check if
memory/SCHEMA.mdalready exists. If yes, report "Already initialized" and STOP. - Create the directory structure above.
- Write
.kw/config.yamlfrom the template below. - Write
memory/SCHEMA.mdfrom the kw-engine package's canonical schema. - Write
memory/index.jsonwith the empty initial state. - Write
process/extract-template.mdandprocess/distill-rubric.md. - Add
paper/*.pdfand.kw/index.dbto.gitignoreif not already present. - Report: "Knowledge engine initialized. Run
/kwto start ingesting papers."
Config template (.kw/config.yaml)
version: 1
paths:
papers_src: paper/
memory: memory/
index: memory/index.json
process: process/
problems: problems/
logs: .kw/logs/
loop1:
synthesize_after_n_papers: 5
process_versions:
extract_template: extract-template@v1
distill_rubric: distill-rubric@v1
model_routing:
kw-fetcher: sonnet
kw-reader: sonnet
kw-distiller: opus
kw-synthesizer: opus
kw-verifier: sonnet
fetch:
fallback_order: [with_fallback, arxiv, biorxiv, medrxiv, pubmed, crossref, openalex, semantic, curl_oa]
validate:
magic_bytes: "%PDF-"
min_bytes: 10240
max_bytes: 52428800
scihub: false
paywalled_via_browse: true
idempotent: true
active_expansion:
enabled: false
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.
- 2d ago First seen · 109 lines · 35 tokens per session scan A 27060cd8941a
kw-init is a skill published in the GitHub repository chenpg2/kw-engine (11 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 843 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.
Other skills, from other repositories
paper-deep-reader
Skill "paper-deep-reader" from Linwei-Chen/paper-deep-reader-skill, covering paper deep reader, 1. 路由交付模式, 2. 按需加载参考材料, 3. 先读懂,再写报告 and 4. 强制执行双层讲解.
Datacore Methodology
Core knowledge management principles — capture, journal, learn, compound.
PBE Extractor
Extract invariant principles from any text — find the ideas that survive rephrasing.
wiki-lint
Run a deterministic, read-only health check on an Obsidian wiki. Use for lint, vault health check, audit wiki health, find orphans, find dead links, frontmatter audit, provenance audit, or wiki audit. Reports graph, link, frontmatter, provenance-ledger, empty-section, and stale-index findings; it does not reason…
a-evolve
Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on…
mermaid-visualizer
Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, or make diagrams from text. Supports process flows, system architectures, comparisons, mindmaps, and more with built-in syntax error prevention.