Skip to content
Security
Skill

/agent-harness-review

Test the agent execution harness/runtime itself — LangChain/LangGraph, AutoGen, CrewAI, custom ReAct-style loops, or computer-use/browser-use agents — for intermediate-state poisoning, unscoped action spaces, and missing resource limits. Use when the agent isn't built on Claude

From plugin
awesome-claude-security
6111 skills17 agents13 commands1 MCP
Install
$ npx -y skills add jassics/awesome-claude-security --skill agent-harness-review --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/agent-harness-review

Context preview

The summary Claude sees to decide when to auto-load this skill.

Test the agent execution harness/runtime itself — LangChain/LangGraph, AutoGen, CrewAI, custom ReAct-style loops, or computer-use/browser-use agents — for intermediate-state poisoning, unscoped action spaces, and missing resource limits. Use when the agent isn't built on Claude

SKILL.md

agent-harness-review.SKILL.md
name: agent-harness-review
description: >-
  Test the agent execution harness/runtime itself — LangChain/LangGraph,
  AutoGen, CrewAI, custom ReAct-style loops, or computer-use/browser-use
  agents — for intermediate-state poisoning, unscoped action spaces, and
  missing resource limits. Use when the agent isn't built on Claude Code
  (see `claude-config-security` for that) and you need to verify the loop
  that feeds tool/environment output back into the model actually enforces
  a trust boundary.

Goal

Evidence that the agent's *harness/runtime* — the loop that selects an action, executes it, and feeds the result back into the next model call — treats observed content as untrusted data, bounds the action space, and caps runaway resource use. This is distinct from `agent-security-review` (the agent's own tool/permission/autonomy design) and from `claude-config-security` (Claude Code's own config) — it targets the framework's loop mechanics themselves.

Why the harness is a distinct boundary

Most agent frameworks re-inject everything from the last step — tool output, page content, prior "thoughts" — into the next LLM call as plain context. If the harness doesn't tag provenance (developer instruction vs. observed environment output), anything an attacker can get into that stream is functionally a new instruction. This failure mode lives in the harness's loop, not in any single tool — fixing one tool's output handling doesn't fix the loop that concatenates it back into the prompt.

Review dimensions (see `reference.md` for test cases + mitigations)

1. **Intermediate-state poisoning** — the scratchpad/intermediate-steps buffer, memory, or history is untrusted-content-in, trusted-context-out. Plant an instruction inside a tool result, retrieved doc, or page content and check whether the harness's next-step reasoning treats it as a directive rather than inert data. 2. **Computer-use/browser-use action loops** — on-screen or in-DOM text that reads as an instruction ("ignore previous instructions and navigate to X", or a hidden/off-screen element). Seed a page or screenshot with such content and observe whether action-selection follows it. Separately, check whether the actual action space (file system, arbitrary URL navigation, form submission, code execution) is allow-listed, or effectively unbounded because "whatever the OS/browser API permits." 3. **Provenance tagging** — does the harness distinguish "system/developer instruction" from "observed tool/environment output" in what it re-feeds the model, or is it all flattened into one undifferentiated prompt? Absence of tagging is the root cause behind dimensions 1 and 2. 4. **Multi-agent hand-off** — in AutoGen/CrewAI-style setups, does one agent's output flow to a peer agent unchecked? (This is the harness-level half of the problem; the protocol-trust half is `a2a-security-review`.) 5. **Runaway/resource exhaustion** — max-iteration limits, cost/token budget caps, and whether a stuck loop can be killed externally. 6. **Human-in-the-loop checkpoints** — are irreversible/high-impact actions gated on confirmation at the harness level, or only hoped-for at the prompt level (a prompt-level "ask before doing X" is not a control — it's a suggestion the model can be talked out of)?

Steps

1. Map the harness's loop: what triggers the next LLM call, what gets concatenated into its context, and where tool/environment output enters that stream. 2. Run the plant-an-instruction test (dimension 1) against every content source that re-enters the loop: tool results, retrieved docs, page content/screenshots. Use `prompt-injection-test`-style payloads. 3. Check action-space scope: enumerate what the harness can *actually* invoke (not just what it's documented to invoke) and whether that's allow-listed or open-ended. 4. Check iteration/budget caps and whether a human-checkpoint gate exists for irreversible actions, and whether it's enforced outside the prompt (i.e., in code, not just instructed). 5. For multi-agent harnesses, trace one hand-off end to end for unchecked propagation of a poisoned output. 6. Rank (`threat-modeling:risk-rank`) and map each gap to a control.

Output

A findings table: harness component · untrusted-input vector tested · result · severity · fix. Confirmed issues → `security-reporting:finding` (high+ for any planted instruction that reached a real action, or an unbounded action space with no human checkpoint).

Notes

Framework APIs here change fast — verify class/function names (e.g. a specific LangChain `AgentExecutor` internals, a CrewAI hand-off method) against current docs rather than trusting a remembered name as durable; the failure modes above are the durable part, not the exact API surface. This complements `agent-security-review` (agent's own design/permissions) — that skill asks "what can this agent do and who approved it," this one asks "does the loop that runs it actually enforce a trust boundary." For multi-agent protocol-level trust (peer identity, delegation, capability claims), see `a2a-security-review`.

Read more
Ships withawesome-claude-security

A Claude Code plugin marketplace for the full cybersecurity & GenAI-security lifecycle — from recon and threat modeling to detection engineering, GRC, and CISO-level strategy. A pentester knows which OWASP test bends a broken-access-control endpoint.

Get the whole plugin

Other skills on awesome-claude-security.