Autonomous Agent Testing
БесплатноБез исполняемых скриптовНе проверенTesting patterns for autonomous AI coding agents like Devin and SWE-Agent including task verification, output validation, sandboxed execution, regression…
от PramodDutta★ 253 звезды на GitHubОб этом скилле
Autonomous Agent Testing Skill
You are an expert in testing autonomous AI coding agents. When the user asks you to validate autonomous agent output, build verification pipelines for AI-generated code, implement safety guardrails, or test agent task completion, follow these detailed instructions.
Core Principles
- Output verification over process observation -- Test what the agent produced (code, tests, configurations), not how it produced it. The output must meet specifications regardless of the generation process.
- Sandboxed execution -- Never run agent-generated code in production environments. Always execute in isolated sandboxes with limited permissions.
- Multi-layer validation -- Validate agent output at multiple levels: syntax checking, type checking, test execution, security scanning, and human review.
- Task specification clarity -- Autonomous agents are only as good as their task descriptions. Test that the agent correctly interprets ambiguous or incomplete specifications.
- Regression testing for agent behavior -- Track agent performance across versions. When the underlying model changes, verify that task completion quality does not degrade.
- Safety guardrails -- Implement hard limits on what agents can access, modify, and execute. Restrict file system access, network calls, and system commands.
- Determinism where possible -- For reproducible testing, pin agent model versions, temperature settings, and random seeds to reduce output variability.
Project Structure
agent-testing/
tasks/
definitions/
simple-function.task.yaml
api-endpoint.task.yaml
bug-fix.task.yaml
refactoring.task.yaml
test-writing.task.yaml
expected-outputs/
simple-function/
expected-code.ts
expected-tests.ts
api-endpoint/
expected-route.ts
expected-handler.ts
validators/
syntax-validator.ts
type-validator.ts
test-runner-validator.ts
security-scanner.ts
style-validator.ts
output-comparator.ts
sandbox/
docker-sandbox.ts
permission-manager.ts
resource-limiter.ts
network-policy.ts
runners/
task-runner.ts
batch-runner.ts
regression-runner.ts
safety/
guardrails.ts
file-access-policy.ts
command-allowlist.ts
secret-detector.ts
metrics/
task-completion-tracker.ts
quality-scorer.ts
cost-tracker.ts
reports/
agent-report.ts
comparison-report.ts
config/
agent-config.ts
sandbox-config.ts
Task Definition Format
# tasks/definitions/simple-function.task.yaml
id: task-001
name: "Implement debounce function"
description: |
Create a TypeScript debounce function that:
1. Takes a function and delay in milliseconds
2. Returns a debounced version of the function
3. Supports cancellation via a cancel() method
4. Preserves the 'this' context
5. Passes all arguments to the original function
type: code-generation
language: typescript
difficulty: medium
expected_files:
- path: src/utils/debounce.ts
must_contain:
- "export function debounce"
- "cancel"
- "clearTimeout"
- path: src/utils/debounce.test.ts
must_contain:
- "describe"
- "it("
- "expect"
constraints:
max_files_modified: 3
max_lines_of_code: 100
no_external_dependencies: true
must_pass_typecheck: true
must_pass_tests: true
must_pass_lint: true
verification:
syntax: true
types: true
tests: true
security: true
style: true
timeout_minutes: 10
Output Validator Pipeline
// validators/output-comparator.ts
import { execSync } from 'child_process';
import { existsSync, readFileSync } from 'fs';
export interface ValidationResult {
step: string;
passed: boolean;
details: string;
severity: 'critical' | 'warning' | 'info';
}
export interface AgentOutput {
taskId: string;
files: Array<{ path: string; content: string }>;
commands: string[];
duration: number;
agentVersion: string;
}
export class OutputValidator {
async validateAll(output: AgentOutput, taskDef: any): Promise<ValidationResult[]> {
const results: ValidationResult[] = [];
// Step 1: File existence check
results.push(this.validateFileExistence(output, taskDef));
// Step 2: Syntax check
results.push(await this.validateSyntax(output));
// Step 3: Type check
results.push(await this.validateTypes(output));
// Step 4: Content requirements
results.push(...this.validateContentRequirements(output, taskDef));
// Step 5: Security scan
results.push(await this.validateSecurity(output));
// Step 6: Test execution
results.push(await this.validateTests(output));
// Step 7: Constraint compliance
results.push(...this.validateConstraints(output, taskDef));
// Step 8: Style check
results.push(await this.validateStyle(output));
return results;
}
private validateFileExistence(output: AgentOutput, taskD
Установить Autonomous Agent Testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Autonomous Agent Testing?
Testing patterns for autonomous AI coding agents like Devin and SWE-Agent including task verification, output validation, sandboxed execution, regression testing for agent behavior, and safety guardrails for autonomous code generation.
Как установить скилл Autonomous Agent Testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Autonomous Agent Testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic