harden-agent-against-model-trust

Harden LLM-consuming agents against prompt injection with deterministic fail-closed verification rules.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/shuddl/shuddl-os --skill harden-agent-against-model-trust-shuddl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: harden-agent-against-model-trust
Source: https://github.com/shuddl/shuddl-os/tree/main/.claude/skills/harden-agent-against-model-trust
Command: npx skills add https://github.com/shuddl/shuddl-os --skill harden-agent-against-model-trust-shuddl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? LLM output is untrusted input: a prompt-injected email can inflate parse confidence, impersonate a party via a model-extracted email address, or fabricate price-affecting fields like weight and dimensions. This Skill codifies the doctrine that model output is advisory only and must never gate auto-actions, bind identity, or set prices without independent deterministic confirmation. ## Core Features & Use Cases - Four hardening rules: model confidence never gates actions, identity keys off the authenticated envelope sender (from_ref) rather than party_hint, auto-send requires deterministic re-extraction that fails closed per price-affecting field, and missing physics queues as UNKNOWN instead of accepting a model guess. - Redelivery purity guidance: redelivery fast-paths re-render from committed events only, pinning config inputs into the message.sent payload and never re-parsing. - Reference checklists: a per-field fail-closed corroboration table (zips, weight, accessorials, dims) and an identity-resolution checklist for new agents. - Use Case: When extending a freight agent that parses inbound emails with an LLM and auto-sends quotes, apply these rules so an injected email cannot trigger an under-priced auto-send or impersonate an existing customer. ## Quick Start Ask the AI to review your agent's auto-send and party-resolution logic against the harden-agent-against-model-trust rules and identify any place where model output gates an action.

Frequently Asked Questions about harden-agent-against-model-trust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely use LLM output in an automated agent?▼

Treat LLM output as advisory only: never gate auto-actions on model confidence, and re-derive every decision-critical field with an independent deterministic parser. If the deterministic check cannot confirm the model's value, queue the action for a human instead of proceeding.

How do I prevent prompt injection from impersonating a user via email?▼

Key party identity off the authenticated envelope sender (from_ref), never a model-extracted email address from the message body. Model-extracted contacts should be cosmetic or routing metadata only, and sender authentication like SPF/DKIM must be verified upstream.

Why is gating on LLM confidence scores unsafe?▼

Model-reported confidence is itself model output over untrusted input, so a prompt-injected message can simply instruct the model to output a high confidence score. Instead, compute your own confidence from database-verified structural facts, such as whether the party already exists on the authenticated key.

What does fail-closed mean for price-affecting fields?▼

Fail-closed means that when an independent deterministic parser cannot confirm a price-affecting field like weight or dimensions, the action queues for human review rather than proceeding. This applies even to currently price-inert fields, since the divergence-can't-send doctrine covers present and future pricing inputs.

When should this hardening doctrine not be applied?▼

It does not apply to purely deterministic flows with no model in the loop, such as projections or gates over committed events. It is specifically for agents that consume LLM parses, resolve identity from messages, or make auto-send decisions.