# Nw Agent Testing

5-layer testing approach for agent validation including adversarial testing, security...

- Repository: https://github.com/nWave-ai/nWave (628 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-09-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nWave-ai/nWave --skill nw-agent-testing -g -a claude-code -y`
Codex: `npx skills add nWave-ai/nWave --skill nw-agent-testing -g -a codex -y`
Cursor: `npx skills add nWave-ai/nWave --skill nw-agent-testing -g -a cursor -y`
Gemini CLI: `npx skills add nWave-ai/nWave --skill nw-agent-testing -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add nWave-ai/nWave`

## Description

5-layer testing approach for agent validation including adversarial testing, security validation, and prompt injection resistance

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Agent Testing Framework

## 5-Layer Testing Approach

### Layer 1: Output Quality (Unit-Level)

Validate agent produces correct, well-structured outputs for typical inputs.

**Test**: Agent follows workflow phases | Outputs match expected format/structure | Domain-specific rules correctly applied | Token efficiency within bounds

**How**: Manual invocation with representative inputs. Check against acceptance criteria in agent description.

### Layer 2: Integration / Handoff Validation

Validate correct input/output between agents in workflows.

**Test**: Input parsing handles upstream format | Output format matches downstream expectations | Error signals propagate correctly | Subagent mode activation works (skip greet, execute autonomously)

**How**: End-to-end workflow execution through full agent chain (e.g., DISCUSS -> DESIGN -> DELIVER).

### Layer 3: Adversarial Output Validation

Challenge validity of agent outputs rather than accepting at face value.

**Test**: Source verification (cited sources real and accurate?) | Bias detection (favors one approach without evidence?) | Edge case coverage | Completeness (required sections present?)

**How**: Peer review by `-reviewer` agent using structured critique dimensions.

### Layer 4: Adversarial Verification (Peer Review)

Independent review to catch biases and blind spots in agent design.

**Test**: Definition follows validation checklist? | Redundant Claude default instructions? | Over/under-specified? | Could simpler agent achieve same results?

**How**: `@nw-agent-builder` validates via 11-point checklist or `@agent-builder-reviewer` runs structured review.

### Layer 5: Security Validation

Test resilience against misuse and prompt injection.

**Test**: Tool restriction enforcement | maxTurns respected | Permission mode correctly scoped | Agent stays within declared scope

**How**: Frontmatter fields enforce at platform level. Verify configuration.

## Prompt Injection Resistance

The rest: https://github.com/nWave-ai/nWave/blob/HEAD/nWave/skills/nw-agent-testing/SKILL.md
