/agent-engineer:agent-guardrailsfrom Agent Engineer
Secures LLM agents against prompt injection, data exfiltration, and excessive agency with threat modeling, least-privilege architecture, sandboxing, human approvals, and red-teaming. Use when agents read untrusted content or have write/send/pay/delete/code-execution tools.
Ships in Agent Engineer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Goal: a fully hijacked model can cause only harm the user explicitly accepted. Injection
is unsolved, so the boundary is architecture and permissions enforced in code; classifiers
and prompt wording are extra layers. Re-run on every new tool, data source or MCP server.
A chat-only bot with no tools or private data needs only references/input-output-guards.md.
references/threat-model.md).references/approvals-and-permissions.md).references/injection-resistant-patterns.md).agent-evals as a
regression suite (references/red-teaming.md).design.md; the user accepts residual risks by name.agent-observability to trace guard decisions, approvals and sinks;
agent-production for rollout.| Situation | Do |
|---|---|
| All three trifecta legs | Cut a leg — usually exfil (no open fetch, allowlisted domains, no auto-rendered images) — or a pattern below |
| Fixed set of actions | Action-selector: model never sees tool output |
| Plan knowable from the trusted request | Plan-then-execute |
| Facts from many untrusted docs | Map-reduce, quarantined readers returning constrained values |
| Open-ended reasoning over untrusted data + actions | Dual LLM or provenance policy on sinks (CaMeL-style) |
| Irreversible, external send, permission change, over-cap money | Approval + code cap, or remove the tool. Capped reversible refund: Medium |
| Runs generated code | Sandbox: filesystem and network isolation, egress allowlist |
| Third-party MCP server | Review, pin, scope credentials; descriptions untrusted |
| Output rendered in a UI | Escape HTML, block/proxy images, allowlist link domains |
| Multi-tenant data | Tenant from the session, enforced in the data layer |
Write these to agent-engineering/ only if the project keeps one (see agent-engineer → Project record (optional)); otherwise put them in your reply or the PR description.
Risks & guardrails in agent-engineering/design.md:
## Risks & guardrails
Trifecta: private data YES (CRM) · untrusted YES (email) · exfil NO (no send; links allowlisted)
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| LLM01 indirect injection: email body → `issue_refund` | High | High | plan-then-execute; $200 + daily per-user caps in code |
| LLM02 PII in traces | Med | Med | redact in collector (see observability.md) |
Residual risk accepted by: <name>, <date>
Plus: tool risk table (tool, effect, tier, control) under Architecture → Tools;
datasets/attacks.jsonl (listed in eval-plan.md); an experiment-log.md entry per
defence with ASR and utility deltas.
references/threat-model.md — entry points, OWASP IDs, exfil channels, trifecta
worksheet, threat notes. Read at step 2.references/injection-resistant-patterns.md — six patterns, fit and cost. Read when the
trifecta check fails.references/approvals-and-permissions.md — risk tiers, authz executor, credentials,
sandboxing, HITL, MCP trust. Read before adding write tools.references/input-output-guards.md — guard layers, small detectors, output handling,
PII, secrets. Read when adding guards.references/red-teaming.md — attack set, payloads, grading, metrics. Read before launch
and on any tool, prompt or model change.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sarthakrastogi/agent-engineer --plugin agent-engineer13 skills in this plugin
/agent-accuracyDebug and fix an LLM agent or RAG system that gives wrong, inconsistent, hallucinated or low-quality results: reproduce, localise the failing component, one hypothesis, the least-powerful fix, measure, check regressions, log. Use when the user says "it hallucinates", "wrong answers", "accuracy dropped", "flaky / right only sometimes", "worse after the model upgrade", "should I add RAG / a bigger model / fine-tune?", or wants a pass rate up. Not for building evals (agent-evals), errors/timeouts/migrations (agent-production), retrieval internals (agent-rag), prompt rewrites (agent-prompting) or tool redesign (agent-tools)./agent-contextEngineer what an agent's context window holds over long or multi-turn runs: ordering and token budgets, just-in-time loading, tool-result clearing and compaction, scratchpads, progress files, long-term memory, subagent isolation, prompt-cache hit rate, and measuring context from traces. Use when the agent forgets instructions or decisions, degrades or loops as runs grow, hits context limits, has token bloat or low cache hits, needs memory across sessions, or runs for hours. Not for prompt wording (agent-prompting), document search (agent-rag), one tool's output size (agent-tools), or overall cost and latency (agent-production).Other plugins' skills for the same job