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.
git clone --depth 1 https://github.com/davidmatousek/tachinpx agentmods add rules/davidmatousek/tachi/prompt-injectionWrote 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/rules/davidmatousek/tachi/prompt-injection)<a href="https://agentmods.dev/rules/davidmatousek/tachi/prompt-injection"><img src="https://agentmods.dev/badge/rules/davidmatousek/tachi/prompt-injection.svg" alt="Measured on agentmods" 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.00033 | $0.01853 |
| Opus 5 | $0.00016 | $0.00927 |
| Sonnet 5 | $0.00007 | $0.00371 |
| Haiku 4.5 | $0.00003 | $0.00185 |
Grade B, and why
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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 164 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):
LLMmodelGPTClaudelanguage modelcompletionchatinferencepromptgenerative 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
-
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
-
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
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.
- 3d ago First seen · 164 lines · 33 tokens per session scan B a9326ec37a42
prompt-injection is a cursor rule published in the GitHub repository davidmatousek/tachi (90 stars, last pushed 25d ago), licensed Apache-2.0. It adds 33 tokens to every session and 1,853 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.
Other cursor rules, from other repositories
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.