tachi: Command for Claude Code

.claude/commands/tachi.architecture.md

tachi.architecture is a command for Claude Code from davidmatousek/tachi. It costs 10 tokens per session (1,721 once invoked), scanned A, original, Apache-2.0.

An architecture description generator for security threat modeling. It maps the system’s parts, data movements, trust boundaries, and outside services in a structured document.

In plain words
What is it for?
Use it to prepare architecture.md as input for a threat-modeling process. It can analyze source code or project documentation and create a new version of an existing description.
Why use it?
It removes the need to manually assemble the system overview needed before examining security threats. It also keeps versions and checksums when an architecture document already exists.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is davidmatousek/tachi's own configuration. It tells Claude Code how to work on tachi itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tachi configures →

Reuse

Borrowing it

Nothing to install: this file belongs to davidmatousek/tachi. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/davidmatousek/tachi/main/.claude/commands/tachi.architecture.md
Clone the repo
git clone --depth 1 https://github.com/davidmatousek/tachi

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 tachi.architecture

README.md
[![agentmods](https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.architecture.svg)](https://agentmods.dev/commands/davidmatousek/tachi/tachi.architecture)
Your own site
<a href="https://agentmods.dev/commands/davidmatousek/tachi/tachi.architecture"><img src="https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 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,721 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.00010 $0.01721
Opus 5 $0.00005 $0.00860
Sonnet 5 $0.00002 $0.00344
Haiku 4.5 $0.00001 $0.00172

Measured 8d ago against content hash 7d876a09f92a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

tachi.architecture 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 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.

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/tachi.architecture.md · 166 lines

How it starts

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

User Input

$ARGUMENTS

Consider user input before proceeding (if not empty).

Overview

Generates a structured architecture description suitable as input for /tachi.threat-model. Analyzes the target codebase or project documentation to produce a DFD-style architecture description with components, data flows, trust boundaries, and external entities.

Output: architecture.md — structured architecture description in the target directory.

Step 0: Detect Existing File

  1. After determining the output path (Step 1), check if an architecture file already exists at that path
  2. If the file exists:
    • Read the file contents
    • Check for YAML frontmatter (content between opening --- and closing --- delimiters at the start of the file)
    • If frontmatter exists, parse these fields:
      • version — integer version number
      • date — generation date (YYYY-MM-DD)
      • description — change summary
      • checksumsha256:{hash} of the content body
      • previous_version — archive path or null
    • If no frontmatter is found: treat as a legacy file with version 0
  3. If no file exists at the output path: this is a fresh generation (version will be 1)
  4. Store the detected state (file exists, current version, has frontmatter) for use by Step 0a and Step 3a

Step 0a: Archive Current Version

  1. Skip this step entirely if no existing file was detected (first-time generation)
  2. Derive the archive path: {parent_dir}/.archive/v{N}/{filename} where:
    • {parent_dir} = directory containing the architecture file
    • {N} = current version number (0 for legacy files without frontmatter, extracted version for managed files)
    • {filename} = architecture filename (default: architecture.md)
  3. Create the archive directory: mkdir -p {parent_dir}/.archive/v{N}/
  4. Copy the complete file (including frontmatter, if present) to the archive location
  5. If the same version already exists in the archive, overwrite it (idempotent retry — supports re-runs after failed generations)
  6. Display:
    Archived v{N} to {archive_path}
    

Read the full file on GitHub · 166 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. 8d ago First seen · 166 lines · 10 tokens per session scan A 7d876a09f92a

Subscribe to this mod's changes

tachi.architecture is a command published in the GitHub repository davidmatousek/tachi (90 stars, last pushed 26d ago), licensed Apache-2.0. It adds 10 tokens to every session and 1,721 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.