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.
curl -O https://raw.githubusercontent.com/davidmatousek/tachi/main/.claude/commands/tachi.threat-model.mdgit clone --depth 1 https://github.com/davidmatousek/tachiWrote 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.
[](https://agentmods.dev/commands/davidmatousek/tachi/tachi.threat-model)<a href="https://agentmods.dev/commands/davidmatousek/tachi/tachi.threat-model"><img src="https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.threat-model/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.
<a href="https://agentmods.dev/commands/davidmatousek/tachi/tachi.threat-model"><img src="https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.threat-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.02695 |
| Opus 5 | $0.00012 | $0.01347 |
| Sonnet 5 | $0.00005 | $0.00539 |
| Haiku 4.5 | $0.00002 | $0.00269 |
Grade A, and why
tachi.threat-model 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 9d 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 — 253 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).
Step 0: Parse Flags
-
If
$ARGUMENTScontains--output-dir <path>:- Set
output_dirto the specified path - Strip
--output-dir <path>from$ARGUMENTS(trim extra whitespace)
- Set
-
Default:
output_dir = docs/security/ -
If
$ARGUMENTScontains--version <tag>:- Set
version_tagto the specified tag (e.g.,v1.0.0) - Append
version_tagtooutput_dir(e.g.,docs/security/v1.0.0/) - Strip
--version <tag>from$ARGUMENTS(trim extra whitespace)
- Set
-
Default:
version_tag = none(outputs go directly tooutput_dir) -
Remaining
$ARGUMENTSis treated as the architecture file path. -
Default architecture path:
docs/security/architecture.md -
Generate a unique run folder:
- Compute timestamp:
YYYY-MM-DDTHH-MM-SS(e.g.,2026-03-25T14-30-22) - Set
parent_dirto the currentoutput_dirvalue (before appending timestamp) - Append to output_dir:
{output_dir}/{timestamp}/ - This ensures each run produces output in a unique subfolder
- Example:
examples/agentic-app/test-output/2026-03-25T14-30-22/
- Compute timestamp:
-
Auto-detect baseline from previous runs (unless
--baselinewas explicitly provided):- List all subdirectories in
parent_dir - Exclude the current run's timestamp directory
- Sort remaining directories lexicographically descending (ISO timestamps sort naturally)
- Check each directory (most recent first) for a
threats.mdfile - If found: set
baseline_pathto that file - If none found:
baseline_path = null(first run — stateless mode) - Display when detected:
Baseline detected: {baseline_path}
- List all subdirectories in
Overview
Single-command entry point for tachi threat modeling. Validates prerequisites, invokes the tachi orchestrator agent against an architecture description, and writes the full output suite to the target directory.
Flow: Validate → Analyze → Report
Output suite:
threats.md— structured threat model (7 sections + correlated findings)threats.sarif— SARIF 2.1.0 for CI/CD integrationthreat-report.md— narrative report with executive summary and remediation roadmapattack-trees/— Mermaid attack tree per Critical/High finding
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.
- 9d ago First seen · 253 lines · 23 tokens per session scan A 634e2a84ce63
tachi.threat-model is a command published in the GitHub repository davidmatousek/tachi (91 stars, last pushed 27d ago), licensed Apache-2.0. It adds 23 tokens to every session and 2,695 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.
Other commands, from other repositories
fortigate
Run cs-security-analyst (AT + CA workflows) against the Fintech FortiGate zero-day scenario and produce a 7-task scorecard.
challenge
Run cs-security-analyst (AT workflow) against the Perfect Storm 8-vector crisis scenario and produce a 12-check mock comparison scorecard.
run
Load a USAP skill SKILL.md and activate it as your operating persona. Argument: skill slug.
test
Run a USAP skill against the FortiGate zero-day test scenario and produce a 6-problem compliance scorecard.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.