Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Hoja-Solutions/agent-stdlib --skill defending-against-prompt-injectiongit clone --depth 1 https://github.com/Hoja-Solutions/agent-stdlibWrote 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/skills/hoja-solutions/agent-stdlib/defending-against-prompt-injection)<a href="https://agentmods.dev/skills/hoja-solutions/agent-stdlib/defending-against-prompt-injection"><img src="https://agentmods.dev/badge/skills/hoja-solutions/agent-stdlib/defending-against-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.
<a href="https://agentmods.dev/skills/hoja-solutions/agent-stdlib/defending-against-prompt-injection"><img src="https://agentmods.dev/badge/skills/hoja-solutions/agent-stdlib/defending-against-prompt-injection.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.00189 | $0.01036 |
| Opus 5 | $0.00095 | $0.00518 |
| Sonnet 5 | $0.00038 | $0.00207 |
| Haiku 4.5 | $0.00019 | $0.00104 |
Grade A, and why
defending-against-prompt-injection 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 10d 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 — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Defending against prompt injection
Source: Mitigate jailbreaks and prompt injection and Building trustworthy agents. The sandboxing skill caps what an attack can reach; this skill keeps the model from obeying the attack in the first place. The two stack: one deterministic boundary around the agent, one discipline for how third-party text enters its context.
An agent that reads outside text inherits a new attacker: whoever wrote the page, the email, or the API response it fetches. That text can carry instructions aimed at the model, and a helpful model follows them unless you arrange the context so it can tell your instructions from the data. The steps below lower the odds it confuses the two.
Keep untrusted content in tool_result blocks
Put every piece of third-party text in a tool_result block. Instruction-tuned models weight instructions inside a tool result below those in the system prompt, so a sentence that would hijack the agent from the system prompt carries far less weight there. The converse holds too: do not put your own instructions in a tool result, because the model discounts those as well. Send your instructions in a user turn after the result lands.
Wrap the content as data
Encode untrusted strings as JSON with explicit fields, such as {"source": "inbound_email", "from": "...", "body": "..."}. The escaping gives a hard boundary the attacker cannot step across: a line that tries to open a new instruction stays a string value inside body. Raw concatenated text has no such edge, so a crafted line reads as a fresh command.
Label where each block came from
Tell the model what a block is and who produced it. "The following is the body of an email from an unverified sender" sets how much trust to extend. An unlabeled block reads as authoritative by default.
Screen tool output before the agent acts
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.
- 10d ago First seen · 61 lines · 189 tokens per session scan A 20b0832ea218
defending-against-prompt-injection is a skill published in the GitHub repository Hoja-Solutions/agent-stdlib (1 stars, last pushed 1mo ago), licensed MIT. It adds 189 tokens to every session and 1,036 once invoked, about $0.0009 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-31.
Other skills, from other repositories
nft-standards
Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.
postgresql-table-design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
istio-traffic-management
Configure Istio traffic management including routing, load balancing, circuit breakers, and canary deployments. Use when implementing service mesh traffic policies, progressive delivery, or resilience patterns.
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
projection-patterns
Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.
workflow-orchestration-patterns
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.