tachi: Command for Claude Code

.claude/commands/tachi.risk-score.md

tachi.risk-score is a command for Claude Code from davidmatousek/tachi. It costs 32 tokens per session (2,255 once invoked), scanned A, original, Apache-2.0.

A command that assigns quantitative scores to threats found in a threat model, which is a structured description of possible security problems. It writes a Markdown report and a SARIF file, a standard format for tool findings.

In plain words
What is it for?
Use it to locate threat-model output, calculate four-dimensional and combined risk ratings, and produce risk-scores.md and risk-scores.sarif.
Why use it?
It turns a list of threats into comparable ratings and governance information for deciding what needs attention first.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

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 →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/populate-affected-assets.py \.

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.risk-score.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.risk-score

README.md
[![agentmods](https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.risk-score/github.svg)](https://agentmods.dev/commands/davidmatousek/tachi/tachi.risk-score)
Your own site
<a href="https://agentmods.dev/commands/davidmatousek/tachi/tachi.risk-score"><img src="https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.risk-score/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.

agentmods 80×15 button for tachi.risk-score

Your own site · 80×15
<a href="https://agentmods.dev/commands/davidmatousek/tachi/tachi.risk-score"><img src="https://agentmods.dev/badge/commands/davidmatousek/tachi/tachi.risk-score.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,255 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.00032 $0.02255
Opus 5 $0.00016 $0.01128
Sonnet 5 $0.00006 $0.00451
Haiku 4.5 $0.00003 $0.00226

Measured 9d ago against content hash 931bdb88e2a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tachi.risk-score 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.

.claude/commands/tachi.risk-score.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 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

  1. If $ARGUMENTS contains --output-dir <path>:

    • Set output_dir to the specified path
    • Strip --output-dir <path> from $ARGUMENTS (trim extra whitespace)
  2. Default: output_dir = null (outputs written to same directory as input)

  3. Remaining $ARGUMENTS is treated as the input directory path.

  4. If no input directory was provided in $ARGUMENTS:

    • If ./docs/security/ exists in cwd: glob docs/security/*/, sort directory names descending (ISO-like YYYY-MM-DDTHH-MM-SS timestamps sort correctly as strings), and select the newest directory that contains threats.md or threats.sarif. Set input_dir to that path and display: Auto-detected input: {input_dir}.
    • Otherwise, default to current working directory (.).

Overview

Single-command entry point for tachi quantitative risk scoring. Validates prerequisites, locates threat model output, invokes the risk-scorer agent, and writes scored output files.

Flow: Validate → Locate Input → Score → Report

Output suite:

  • risk-scores.md — scored threat table, executive summary, dimensional breakdowns, governance fields, methodology
  • risk-scores.sarif — SARIF 2.1.0 with per-finding composite scores in security-severity and scoring properties in result property bags

Step 1: Validate Prerequisites

  1. Check tachi agents are installed:

    • Verify .claude/agents/tachi/risk-scorer.md exists
    • If missing, display:
      TACHI RISK SCORER NOT INSTALLED
      Run: cp -r <tachi-repo>/adapters/claude-code/agents/risk-scorer.md .claude/agents/tachi/
      See: https://github.com/davidmatousek/tachi
      
    • Halt if missing.
  2. Check input files exist:

    • Look for threats.md in the input directory
    • If not found, look for threats.sarif in the input directory
    • If neither exists, display:
      NO THREAT MODEL OUTPUT FOUND
      Neither threats.md nor threats.sarif found in: {input_dir}
      Run /threat-model first to generate threat model output.
      
    • Halt if neither exists.

Read the full file on GitHub · 201 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. 9d ago First seen · 201 lines · 32 tokens per session scan A 931bdb88e2a9

Subscribe to this mod's changes

tachi.risk-score is a command published in the GitHub repository davidmatousek/tachi (91 stars, last pushed 27d ago), licensed Apache-2.0. It adds 32 tokens to every session and 2,255 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.