tfw-init

tfw-init is a command for Claude Code from saubakirov/trace-first-starter. It costs 16 tokens per session (3,452 once invoked), scanned A, original, MIT.

A guided setup command that adds TFW to a new project. TFW is a task-management workflow for coding agents, with project configuration, instructions, and an initial task.

In plain words
What is it for?
Use it when introducing TFW to a project, creating its first task, or attaching or repairing the adapter used by the coding agent.
Why use it?
It creates the files and connections needed before using TFW. It also detects an existing setup so project state is not recreated unnecessarily.

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-init
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-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-init.svg)](https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-init)
Your own site
<a href="https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-init"><img src="https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,452 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.1 $0.00016 $0.03452
Opus 5 $0.00008 $0.01726
Sonnet 5 $0.00003 $0.00690
Haiku 4.5 $0.00002 $0.00345

Measured yesterday against content hash 0344575b32ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

tfw-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 yesterday.

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-init.md · 271 lines

How it starts

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

TFW Init — Project Initialization

Role: Coordinator Output: Configured TFW project with its first task created in the container When to use: Once, when adding TFW to a project for the first time

🔒 ROLE LOCK: COORDINATOR Permitted: creating project files (CONFIG, AGENTS.md, README route, task container, adapter), calling /tfw-research, writing RES/RF for the first task. Forbidden: writing code unrelated to TFW setup.

Phase 0: Detect Full Init vs Adapter Attach/Repair

Before the tutorial question or project discovery, inspect the filesystem.

  • Full init: .tfw/ is newly copied and the project has no configured task container or TFW task traces. Continue with Phases 1-5.
  • Existing TFW project: .tfw/ exists, tfw.task_containers is configured, and the container contains TFW traces. Preserve all project state. Do not repeat discovery, interview, research, config creation, or the init task.

For an existing TFW project, ask which missing or broken tool adapter should be attached only if the current tool cannot be inferred. For Codex:

  1. Read .tfw/adapters/codex/README.md completely.
  2. Run its idempotent Install or Repair procedure.
  3. Preserve project_config.yaml, knowledge_state.yaml, project docs, task state and journals, task traces, and all root AGENTS.md content outside the managed TFW markers.
  4. Verify the installed skill copies, managed routing block, legacy duplicate cleanup, and literal /tfw-* routing as the adapter README requires.
  5. Report what was repaired and stop. Adapter attach/repair does not create another first task or rewrite project knowledge.

Tutorial Mode

At the start, ask the user: "Is this your first time using TFW? I can explain each step as we go." If yes — add brief explanations at each phase. If no — proceed efficiently, skip explanations.

If tutorial mode, suggest: "We recommend reading .tfw/README.md — it explains the philosophy behind TFW and takes about 5 minutes. Everything else in the repo is designed for AI agents, not for you to read line by line."

Read the full file on GitHub · 271 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. yesterday Changed · -1 lines 0344575b32ea
  2. 5d ago First seen · 272 lines · 16 tokens per session scan A 8e1d39b5049f

Subscribe to this mod's changes

tfw-init is a command published in the GitHub repository saubakirov/trace-first-starter (29 stars, last pushed 2d ago), licensed MIT. It adds 16 tokens to every session and 3,452 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.