跳到正文
cccskills
免费在 GitHub 公开

nw-agent-testing

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

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

Claude Code platform provides injection resistance through: subagent isolation (own context, no sub-subagents) | Tool restriction via frontmatter tools | Permission modes via permissionMode | Hook-based validation (PreToolUse, PostToolUse)

Do NOT add prose-based injection defense. Configure platform features:

---
tools: Read, Glob, Grep           # Only tools this agent needs
maxTurns: 30                       # Prevents runaway execution
permissionMode: default            # User approves dangerous actions
---

Security Validation Checklist

  • tools restricted to minimum necessary (least privilege)
  • maxTurns set to prevent runaway execution
  • permissionMode appropriate for risk level
  • No Bash unless agent requires command execution
  • No Write unless agent creates/modifies files
  • Description accurately describes scope
  • Subagent mode handles autonomous execution correctly
  • No sensitive data hardcoded in definition

Testing Workflow for New Agents

  1. Create with minimal definition
  2. Layer 1: Invoke with 2-3 representative inputs, check outputs
  3. Layer 2: Run in workflow chain if applicable
  4. Fix failures observed
  5. Validate: Run 11-point checklist
  6. Iterate: Add instructions only for observed failure modes

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review dimensions for validating agent quality - template compliance, safety, testing, and priority validation

中文简介正在准备中。当前显示原文说明。

nWave-ai/nWave6202026年9月16日 更新

Review dimensions for validating agent quality - template compliance, safety, testing, and priority validation

中文简介正在准备中。当前显示原文说明。

nWave-ai/nWave6202026年9月16日 更新

Review dimensions for acceptance test quality - happy path bias, GWT compliance, business language purity, coverage completeness, walking skeleton user-centricity, priority validation, observable behavior assertions, traceability coverage, and walking skeleton boundary proof

中文简介正在准备中。当前显示原文说明。

nWave-ai/nWave6202026年9月16日 更新

Detailed 5-phase workflow for creating agents - from requirements analysis through validation and iterative refinement

中文简介正在准备中。当前显示原文说明。

nWave-ai/nWave6202026年9月16日 更新

Architectural style selection decision matrices, trade-off analysis, structural enforcement rules, and combination patterns. Load when choosing or evaluating architecture styles.

中文简介正在准备中。当前显示原文说明。

nWave-ai/nWave6202026年9月16日 更新

Comprehensive architecture patterns, methodologies, quality frameworks, and evaluation methods for solution architects. Load when designing system architecture or selecting patterns.

中文简介正在准备中。当前显示原文说明。

nWave-ai/nWave6202026年9月16日 更新

查看 nWave-ai 的全部技能

报告此技能的问题