tfw-knowledge

tfw-knowledge is a command for Claude Code from saubakirov/trace-first-starter. It costs 11 tokens per session (1,203 once invoked), scanned A, original, MIT.

A command for consolidating proposed facts into verified project knowledge files. It reads the project's existing knowledge and state, then updates topic files, an index, and a status file.

In plain words
What is it for?
Use it to review project artifacts, find gaps in topic coverage, and update the project's verified knowledge after a manual trigger or planning step.
Why use it?
It provides a defined review step for turning scattered fact candidates into maintained project knowledge, while limiting the workflow to knowledge files rather than code.

Command for Claude Code

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.

agentmods
npx agentmods add commands/saubakirov/trace-first-starter/tfw-knowledge
Clone the repo
git clone --depth 1 https://github.com/saubakirov/trace-first-starter

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 tfw-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-knowledge.svg)](https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-knowledge)
Your own site
<a href="https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-knowledge"><img src="https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-knowledge.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.01203
Opus 5 $0.00005 $0.00602
Sonnet 5 $0.00002 $0.00241
Haiku 4.5 $0.00001 $0.00120

Measured 5d ago against content hash aa4fb4720447, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tfw-knowledge 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 5d 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/tfw-knowledge.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TFW Knowledge — Knowledge Consolidation Workflow

Role: Coordinator Output: Updated knowledge/ topic files, KNOWLEDGE.md §4 (index), knowledge_state.yaml Trigger: Manual (/tfw-knowledge) or gate in plan.md Step 2 Duration: 5-20 minutes

🔒 ROLE LOCK: COORDINATOR Permitted: reading all project artifacts, writing to KNOWLEDGE.md, knowledge/ topic files, .tfw/knowledge_state.yaml. Forbidden: writing code, modifying RF/REVIEW/RES/HL/TS files (except adding fact-candidates: processed marker).

Prerequisites

  1. Read .tfw/knowledge_state.yaml — current state, last consolidation seq
  2. Read KNOWLEDGE.md — current knowledge index
  3. Read all topic files in knowledge/ — current verified facts
  4. Read .tfw/project_config.yamltfw.knowledge section for limits

Phase 1: Orient

  1. Note last_consolidation_seq → compute task range to scan
  2. List topic files with fact counts
  3. Read conventions.md §10.1 → list all canonical categories. Note which have topic files and which don't
  4. Present orientation summary to user (include category coverage gaps)

Phase 2: Gather

⚠️ Knowledge ≠ technical documentation. Knowledge is what would be UNKNOWN without the human saying it: vision, priorities, emotions, business context, architectural philosophy, process corrections. Technical implementation details (tools config, API constraints, build errors) belong in tfw-docs.

YES: "primary output = knowledge graph, not docs site", "close as MVP, don't stretch phases" NO: "MkDocs docs_dir cannot be project root", "use directory URLs not .md"

  1. Scan artifacts for tasks since last_consolidation_seq:
    • HL §11 (Strategic Session Insights) — coordinator's captured signals from planning sessions
    • RF §8 (Execution Session Insights) — executor's captured signals from live testing (if exists)
    • RF, REVIEW, RES §Fact Candidates — standard FC sections
  2. Review conversation history for the current session — extract facts from user messages not captured in artifacts
  3. Category coverage check: do any candidates belong to categories without topic files? Don't force facts into existing categories — create new topic file when justified. Ref: conventions.md §10.1
  4. Present gathered candidates to user:

Read the full file on GitHub · 102 lines

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. 5d ago First seen · 102 lines · 11 tokens per session scan A aa4fb4720447

Subscribe to this mod's changes

tfw-knowledge is a command published in the GitHub repository saubakirov/trace-first-starter (29 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 1,203 once invoked, about $0.0001 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.