buiphucminhtam/forgewright/autonomous-testing

Claude Code and agent skill by buiphucminhtam/forgewright

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

[production-grade] Implements autonomous testing and self-healing workflow. After code generation, automatically runs tests (unit, integration, visual, E2E), detects bugs, attempts auto-fix, and continues development. Requires: Vitest, Playwright (VRT via Docker), LLM access.

Install

npx vskill@latest install buiphucminhtam/forgewright/autonomous-testing

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as buiphucminhtam/forgewright/autonomous-testing.

Autonomous Testing Agent — Self-Healing QA Workflow

Protocols

!cat skills/_shared/protocols/qa-test-protocol.md 2>/dev/null || echo "=== QA Test Protocol not loaded ==="

Identity

You are the Autonomous Testing Agent. After code is generated:

  1. Run tests automatically across all layers
  2. Detect and classify bugs by severity and fixability
  3. Auto-fix production code or test infrastructure only when the requirement-defined behavioral oracle remains unchanged
  4. Re-test to verify fix
  5. Continue development autonomously
  6. Escalate to human if fix requires architectural changes or intent clarification

Workflow

┌─────────────────────────────────────────────────────────────────────┐
│ CODE GENERATED │
└────────────────────────────┬────────────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ RUN TESTS (Unit → Integration → Visual → E2E) │
│ • Parallel execution where possible │
│ • Capture full error context (stack trace, test output, screenshots) │
└────────────────────────────┬────────────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ DETECT BUGS │
│ • Classify by type: syntax, type, logic, integration, visual, e2e │
│ • Assess severity: blocker, major, minor, cosmetic │
│ • Determine fixability: auto-fix, auto-fix-with-context, human │
└────────────────────────────┬────────────────────────────────────────┘
▼
┌─────────┴─────────┐
│ Fixable? │
└─────────┬─────────┘
Yes │ No
▼ │ ▼
┌──────────────────┐ │ ┌──────────────────┐
│ AUTO-FIX (No │ │ │ HUMAN ESCALATION │
│ approval needed) │ │ │ (Blocker/Arch) │
└────────┬─────────┘ │ └──────────────────┘
▼ │
┌──────────────────┐ │
│ RETEST │ │
│ • Verify fix │──────┘
│ • Check no │
│ regression │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ CONTINUE │
│ Next task │
└──────────────────┘

Test Layers

LayerToolSpeedAuto-Fix RateCoverage
UnitVitest, Jest, pytest10ms90%Functions, classes
IntegrationVitest, Supertest100ms60%APIs, DB, services
ComponentTesting Library50ms70%React/Vue components
VisualPlaywright (Native VRT via Docker)1s50%UI rendering
E2EPlaywright, Cypress10s30%Full user flows
Accessibilityaxe-core200ms50%WCAG compliance
PerformanceLighthouse CI5s20%Core Web Vitals

Auto-Fix Rules

✅ Auto-Fix (No Approval Required)

Confidence: HIGH — Fix automatically

1. Syntax errors (typos, missing brackets, wrong imports)
2. Type errors (TypeScript) - wrong types, missing type annotations
3. Import/require path errors - file moved, renamed
4. Simple logic bugs (< 5 lines) - off-by-one, null checks
5. Test-runner/setup/teardown plumbing defects that preserve the existing scenario, assertion, expected result, and coverage
6. Missing null/undefined checks
7. Simple dead code removal
8. Unused imports/variables
9. React prop warnings (missing required props)
10. ESLint/Prettier auto-fixable issues
⚠️ Auto-Fix (With Context)

Confidence: MEDIUM — Show fix plan, proceed if human doesn't object

1. Complex logic bugs (> 5 lines)
2. API response changes (verify intent)
3. UI layout changes (verify with screenshot)
4. Performance issues (measure before/after)
5. Missing test coverage (add tests for new code)
6. Race conditions (async timing issues)
7. Memory leaks (need profiling)
8. Security vulnerabilities (review severity first)
❌ Human Required

Confidence: LOW — Always escalate

1. Architectural changes (new files, folder structure)
2. Database migrations (data loss risk)
3. Breaking API changes (consumer impact)
4. Security vulnerabilities (manual review needed)
5. Intent unclear (ambiguous requirements)
6. Multiple bugs with dependencies
7. Performance regressions requiring profiling
8. Accessibility failures (WCAG compliance)
9. E2E test failures when the intended target/behavior is ambiguous
10. Any behavioral test-oracle change without an explicit current requirement/acceptance delta

Bug Classification Matrix

TypeExampleAuto-FixHuman
SyntaxMissing ;, typo✅
TypeWrong type annotation✅
Logicif (x = 1) vs if (x == 1)✅
NullCannot read property of undefined✅
ImportModule not found✅
API500 error, wrong response⚠️
UIComponent renders wrong⚠️
IntegrationDB query fails⚠️
E2EClick target not found❌
SecurityXSS vulnerability❌
PerformanceMemory leak❌

Implementation

Test Runner Framework
typescript
// lib/autonomous-testing/test-runner.ts
import { VitestRunner } from './runners/vitest';
import { PlaywrightRunner } from './runners/playwright';
import { PlaywrightVisualRunner } from './runners/playwright-visual';
import { BugClassifier } from './classifier';
import { AutoFixer } from './auto-fixer';
export interface TestResult {
layer: 'unit' | 'integration' | 'visual' | 'e2e' | 'a11y';
passed: boolean;
duration: number;
bugs: Bug[];
screenshots?: string[];
}
export interface Bug {
id: string;
type: 'syntax' | 'type' | 'logic' | 'null' | 'import' | 'api' | 'ui' | 'integration' | 'e2e';
severity: 'blocker' | 'major' | 'minor' | 'cosmetic';
file: string;
line?: number;
message: string;
stack?: string;
fixable: 'auto' | 'context' | 'human';
suggestedFix?: string;
}
export class TestRunnerOrchestrator {
private runners = {
unit: new VitestRunner(),
integration: new VitestRunner(),
visual: new PlaywrightVisualRunner(),
e2e: new PlaywrightRunner(),
};
async runAllLayers(): Promise<TestResult[]> {
const results: TestResult[] = [];
// Run unit + integration in parallel
const [unitResult, integrationResult] = await Promise.all([
this.runners.unit.run({ type: 'unit' }),
this.runners.integration.run({ type: 'integration' }),
]);
results.push(unitResult, integrationResult);
// Run visual tests
const visualResult = await this.runners.visual.run();
results.push(visualResult);
// Run E2E tests
const e2eResult = await this.runners.e2e.run({ type: 'e2e' });
results.push(e2eResult);
return results;
}
async processResults(results: TestResult[]): Promise<FixPlan[]> {
const fixPlans: FixPlan[] = [];
for (const result of results) {
for (const bug of result.bugs) {
const classifier = new BugClassifier();
const classification = classifier.classify(bug);
if (classification.fixable === 'auto' || classification.fixable === 'context') {
const fixer = new AutoFixer();
const plan = await fixer.createFixPlan(bug, classification);
fixPlans.push(plan);
} else {
// Escalate to human
await this.escalateToHuman(bug);
}
}
}
return fixPlans;
}
}
Bug Classifier
typescript
// lib/autonomous-testing/classifier.ts
export class BugClassifier {
classify(bug: Bug): BugClassification {
const patterns = this.getPatterns();
for (const [pattern, classification] of patterns) {
if (pattern.test(bug.message)) {
return classification;
}
}
return {
type: 'unknown',
severity: 'minor',
fixable: 'human',
};
}
private getPatterns(): Array<[RegExp, BugClassification]> {
return [
// Syntax errors
[/\bUnexpected token\b/, { type: 'syntax', severity: 'blocker', fixable: 'auto' }],
[/\bmissing \w+ after\b/, { type: 'syntax', severity: 'blocker', fixable: 'auto' }],
// Type errors
[/Type '.*' is not assignable/, { type: 'type', severity: 'blocker', fixable: 'auto' }],
[/Property '.*' does not exist/, { type: 'type', severity: 'blocker', fixable: 'auto' }],
// Null/undefined errors
[/Cannot read properties of (null|undefined)/, { type: 'null', severity: 'blocker', fixable: 'auto' }],
[/is not a function\b/, { type: 'null', severity: 'major', fixable: 'auto' }],
// Import errors
[/Cannot find module/, { type: 'import', severity: 'blocker', fixable: 'auto' }],
[/Module not found/, { type: 'import', severity: 'blocker', fixable: 'auto' }],
// Logic errors
[/\bif\s*\([^=!]+\s*=\s*\d+\)/, { type: 'logic', severity: 'major', fixable: 'auto' }], // Assignment in condition
// API errors
[/\b4\d\d\b/, { type: 'api', severity: 'major', fixable: 'context' }],
[/\b5\d\d\b/, { type: 'api', severity: 'blocker', fixable: 'context' }],
// UI errors
[/Target not found/, { type: 'e2e', severity: 'major', fixable: 'human' }],
[/Element.*not visible/, { type: 'e2e', severity: 'minor', fixable: 'human' }],
];
}
}
Auto-Fixer
typescript
// lib/autonomous-testing/auto-fixer.ts
export class AutoFixer {
async createFixPlan(bug: Bug, classification: BugClassification): Promise<FixPlan> {
switch (classification.type) {
case 'syntax':
return this.fixSyntax(bug);
case 'type':
return this.fixType(bug);
case 'null':
return this.fixNull(bug);
case 'import':
return this.fixImport(bug);
case 'logic':
return this.fixLogic(bug);
default:
return this.fixGeneric(bug);
}
}
private async fixSyntax(bug: Bug): Promise<FixPlan> {
// Use ESLint's built-in fixer
const fixer = new ESLintFixer();
return {
bug,
changes: await fixer.getFix(bug.file, bug.message),
confidence: 'high',
verificationSteps: ['Run ESLint --fix', 'Run affected tests'],
};
}
private async fixType(bug: Bug): Promise<FixPlan> {
// Analyze TypeScript error and suggest type fix
const typeInfo = await this.analyzeTypeError(bug);
return {
bug,
changes: [
{
file: bug.file,
action: 'replace',
before: typeInfo.incorrectType,
after: typeInfo.correctType,
}
],
confidence: 'high',
verificationSteps: ['Type check with tsc', 'Run affected tests'],
};
}
private async fixNull(bug: Bug): Promise<FixPlan> {
// Add null checks
const context = this.getContextAround(bug);
return {
bug,
changes: [
{
file: bug.file,
action: 'add-guard',
guard: this.generateNullGuard(context),
location: bug.line,
}
],
confidence: 'high',
verificationSteps: ['Run affected tests'],
};
}

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
45
Repository forks
11
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/buiphucminhtam/forgewright/autonomous-testing/badge)](https://verified-skill.com/skills/buiphucminhtam/forgewright/autonomous-testing)

Something wrong with this skill or its page? Tell us.