Wrap the system-under-test and route a turn to it, returning its real response with its real defenses in place — the target side of any adversarial or eval loop. A reusable primitive. Use to represent "the system under test" when composing attacker/judge, or whenever a turn must be sent to a target agent and its response captured.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Defender?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/asterguard-defender)
---
name: defender
description: Wrap the system-under-test and route a turn to it, returning its real response with its real defenses in place — the target side of any adversarial or eval loop. A reusable primitive. Use to represent "the system under test" when composing attacker/judge, or whenever a turn must be sent to a target agent and its response captured.
---
# Defender
A composable primitive: `defender(attack_turn) → target_response`. The defender **is** the target — it
sends the turn to the system-under-test with its *real* system prompt, tools, memory, and defenses, and
returns the response. It never weakens the target to make a break easier; a break must be a real bypass.
Reusable beyond red team: this is "the system under test" in any eval.
## When to Activate
- As the target role in a red-team / eval / continuous-testing loop (composed with `attacker` + `judge`).
- Whenever a turn must be delivered to a target agent and its response + side effects captured.
## The contract
`defender(attack_turn) → target_response`. Both the `attack_turn` and the `target_response` are inputs
to `judge`. Route through the **AsterVault proxy** (so egress is observed and canaries are detected on
the wire) or a **pluggable target adapter** — the same adapter seam as `dast-generation` (the target's
internal HTTP harness, or a provider base-URL shim). Swapping the transport never changes the contract.
## Method
1. Hold the **exact** target config: real system prompt, tool set, memory policy, and whatever defenses
it ships (instruction hierarchy, I/O classifiers, HITL gates). Red-teaming a different config is the
classic mistake.
2. Deliver the `attack_turn`; capture the `target_response` **and** the side effects (tool calls, egress,
state changes) — those are the judge's out-of-band evidence.
3. Run a concurrent **benign task** so `judge` can measure **utility under attack** (a target that
refuses everything isn't secure, it's broken).
4. Return `target_response` + the observed side effects; append it to the attacker's context (adaptive).
## Self-improvement
Capture the **defense posture** over time: which attacks *held*, which controls fired, where utility
dropped. `memory.capture` the holds and the regressions so the next run recalls "this target already
resists X" and focuses effort — and so a control that *stops* working surfaces as drift.
## Practical Guidance
- **Exact config, every time** — the value of the result depends on testing the real release candidate.
- **Capture side effects, not just text** — the break is often a tool call or an egress, not the reply.
- **Observe through the gateway** — the egress path is where canaries are caught and the audit is written.
## Integration
- attacker — provides the `attack_turn`
- judge — consumes `(attack_turn, target_response, side effects/canary evidence)`
- canary-testing — canaries planted by the attacker are detected on the defender's egress
- AsterVault proxy — the observed transport; memory — defense-posture drift over time
- behavioral-redteam — the orchestrator
## References
- [AsterVault MCP tools](../weakness-graph/references/astervault-tools.md)