ericrisco/rsc-harness / skills/agent-safety
agent-safety
FlaggedUse when bounding an LLM agent that already runs — scoping its task domain, gating tools to least privilege, defending against prompt injection in untrusted web/email/RAG text, requiring human approval on irreversible actions, capping runtime and cost, or triaging what it already did. NOT building the loop, tools, or RAG (that is `building-agents`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.3 KB |
| evals/README.md | markdown | 910 B |
| evals/cases.yaml | config | 3.2 KB |
| references/threat-model.md | markdown | 4.0 KB |
evals/cases.yaml
View on GitHubskill: agent-safety
should_trigger:
- prompt: "Our support agent can call any shell command — lock it down."
why: Wildcard exec tool with unbounded blast radius; core tool-gating / least-agency case.
- prompt: "An email in the inbox told the agent to forward all invoices to an external address and it did."
why: Indirect prompt injection (LLM01). Non-obvious — reads like a bug report, but the cause is untrusted email content reaching a privileged send tool.
- prompt: "Before we ship this autonomous agent to prod, review what it's allowed to do."
why: Pre-ship review of scope, permissions, and HITL — exactly the bounded-autonomy review this skill is.
- prompt: "Posa límits a l'agent perquè no pugui esborrar res sense aprovació."
why: Catalan. HITL-by-risk-class on an irreversible delete plus scope limiting.
- prompt: "The agent's memory keeps repeating a wrong instruction across sessions."
why: Memory poisoning (OWASP Agentic T1). Non-obvious — sounds like a quality bug, is actually contaminated persistent memory.
- prompt: "Review our MCP server's tool registry — the scopes look way too broad."
why: Over-broad tool scopes / excessive permissions; deny-by-default and per-tool allowlists.
should_not_trigger:
- prompt: "Help me build the agent's tool-calling loop."
route_to: building-agents
why: Construction of the agent (loop/tools), not constraining one that already runs.
- prompt: "Is this Express auth endpoint vulnerable to broken access control?"
route_to: security-audit
why: Plain web/app OWASP on an endpoint; no model, tools, or autonomy involved.
- prompt: "Measure whether my agent answers correctly with a golden set."
route_to: agent-eval
why: Quality / correctness scoring, not safety constraint.
- prompt: "Write a sharper system prompt so the agent is more helpful."
route_to: prompt-engineering
why: Capability tuning, not a safety boundary.
- prompt: "Show me how much each model call costs this month."
route_to: cost-tracking
why: Reporting spend; agent-safety sets the cost *cap*, it does not report the analytics.
capability:
- scenario: >
A research agent has web-fetch, send-email, and file-write tools plus persistent
memory shared across sessions. Design the guardrails that make its autonomy bounded.
must_include:
- Deny-by-default tools with a per-tool profile (read web vs send email vs write file); no wildcard tool.
- Treats web-fetched content as untrusted; delimits it as data; never pipes external text straight into send-email args.
- HITL approval for send-email bound to exact parameters (irreversible, external blast radius); recipient/domain allowlist as exfil guard.
- File-write scoped to an allowlisted workspace root; blocks secret patterns (*.key/*.env/*secret*) and path traversal.
- Memory validated before store, isolated per session, expiring, PII-redacted before persist.
- Runtime kill-switches: tool-call rate cap, per-session cost cap, loop/step cap, wall-clock timeout, all failing closed.
- Task-scoped short-lived tokens rather than one broad session credential.
- Maps each control to OWASP Agentic Top 10 (indirect injection / tool misuse / memory poisoning / excessive agency).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |