tachi-prompt-injection

tachi-prompt-injection is an agent for Claude Code from davidmatousek/tachi. It costs 43 tokens per session (1,856 once invoked), scanned B, original, Apache-2.0.

A security analysis agent for applications that use large language models, such as GPT or Claude. It looks for instructions that could trick the model into ignoring its intended rules.

In plain words
What is it for?
It checks direct prompt attacks, indirect attacks through RAG (retrieval-augmented generation), jailbreak attempts, system-prompt extraction, and attacks crossing plugin boundaries.
Why use it?
It helps find attacks hidden in user input, retrieved documents, or connected tools that could change the model’s behavior or expose its system instructions.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is output_schema: ../../../schemas/finding.yaml.

Good fit It checks direct prompt attacks, indirect attacks through RAG (retrieval-augmented generation), jailbreak attempts, system-prompt extraction, and attacks crossing plugin boundaries.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/davidmatousek/tachi
agentmods
npx agentmods add agents/davidmatousek/tachi/prompt-injection

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-prompt-injection

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/davidmatousek/tachi/prompt-injection"><img src="https://agentmods.dev/badge/agents/davidmatousek/tachi/prompt-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 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,856 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00043 $0.01856
Opus 5 $0.00022 $0.00928
Sonnet 5 $0.00009 $0.00371
Haiku 4.5 $0.00004 $0.00186

Measured 6d ago against content hash 262cd18cae82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

tachi-prompt-injection scanned grade B with 1 finding 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 6d 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.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

mitigation: "Implement rate limiting on prompt submissions per user session. Deploy a prompt classifier that flags known jailbreak patterns (role-play requests, 'ignore previous instructions' variants, DAN-style prompts)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

adapters/claude-code/agents/prompt-injection.md · 163 lines

How it starts

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

Metadata

category: llm
threat_class: LLM
dfd_targets: [Process]
owasp_references: [OWASP LLM01:2026, OWASP LLM08:2026]
output_schema: ../../../schemas/finding.yaml

Prompt Injection Threat Agent

Purpose

Detects prompt injection vulnerabilities in LLM-integrated components. Prompt injection is the most prevalent and highest-impact threat class for LLM applications: an attacker manipulates model behavior by embedding adversarial instructions in user input, retrieved context, or upstream data sources. This agent identifies direct injection (user-supplied malicious prompts), indirect injection (adversarial payloads embedded in data the model consumes), and jailbreaking (systematic attempts to override model safety constraints).

Detection Scope

Trigger Keywords

This agent activates when a DFD element name or description matches any of the following patterns (case-insensitive):

  • LLM
  • model
  • GPT
  • Claude
  • language model
  • completion
  • chat
  • inference
  • prompt
  • generative AI

Applicable DFD Element Types

  • Process: Any process node that invokes, wraps, or orchestrates an LLM. This includes API gateway processes that forward prompts, orchestration layers that compose multi-step LLM calls, and application logic that interpolates user input into prompt templates.

Detection Patterns

  1. Direct Prompt Injection: User-facing input fields whose contents are concatenated into LLM prompts without sanitization, boundary enforcement, or input classification. Look for:

    • Chat interfaces that pass raw user text to model APIs
    • Search bars or form fields whose values are interpolated into system prompts
    • API endpoints that accept freeform text and forward it to LLM completions
    • Absence of input validation or prompt boundary markers between system instructions and user content
  2. Indirect Prompt Injection: Data flows where external or semi-trusted content is retrieved and injected into the model context window. Look for:

    • RAG pipelines that retrieve documents from user-contributed or web-scraped sources
    • Email or message processing where attacker-controlled content enters the prompt
    • Database records, CMS content, or API responses that are embedded in LLM context
    • Tool outputs that are fed back into the model without sanitization

Read the full file on GitHub · 163 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. 6d ago First seen · 163 lines · 43 tokens per session scan B 262cd18cae82

Subscribe to this mod's changes

tachi-prompt-injection is an agent published in the GitHub repository davidmatousek/tachi (91 stars, last pushed 28d ago), licensed Apache-2.0. It adds 43 tokens to every session and 1,856 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories