/auto-test-execution
Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
$ npx -y skills add jmagly/aiwg --skill auto-test-execution --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/auto-test-execution
Context preview
The summary Claude sees to decide when to auto-load this skill.
Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
SKILL.md
auto-test-execution.SKILL.mdnamespace: aiwg
name: auto-test-execution
platforms: [all]
description: Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
auto-test-execution
Automatically execute tests when code-generating agents write to source files, enforcing the execute-before-return pattern.
Triggers
Primary phrases matched automatically from skill description. No additional alternate expressions defined.
Purpose
This skill enforces the MetaGPT executable feedback pattern: code-generating agents must execute tests before returning results to the user. It activates automatically when agents modify source code files.
Behavior
When triggered, this skill:
1. **Detect modified files**:
- Track which source files the agent has written to
- Identify the relevant test framework
2. **Find related tests**:
- Look for test files matching the modified source
- Convention: `src/foo/bar.ts` -> `test/unit/foo/bar.test.ts`
- If no tests exist, prompt agent to generate them
3. **Execute tests**:
- Run the project's test command focused on relevant tests
- Capture results: passed, failed, errors
4. **Handle results**:
- All pass: Allow agent to return results
- Failures: Trigger debug-and-retry loop (max 3 attempts)
- Persistent failures: Escalate with debug memory context
5. **Update debug memory**:
- Record session in `.aiwg/ralph/debug-memory/sessions/`
- Extract patterns for future reference
Activation Conditions
activation:
always_active_for:
- software-implementer
- debugger
- test-engineer
triggered_by:
- file_write:
patterns:
- "src/**/*.ts"
- "src/**/*.js"
- "src/**/*.py"
- "**/*.go"
- "**/*.rs"
skip_when:
- test_files_only: true
- documentation_only: true
- configuration_only: trueIntegration
This skill uses:
- `project-awareness`: Detect test framework and configuration
- Debug memory at `.aiwg/ralph/debug-memory/` for pattern learning
References
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md - Feedback rules
- @$AIWG_ROOT/agentic/code/addons/ralph/docs/executable-feedback-guide.md - Guide
- @$AIWG_ROOT/agentic/code/addons/ralph/schemas/debug-memory.yaml - Memory schema
- @.aiwg/research/findings/REF-013-metagpt.md - Research foundation
Read more
namespace: aiwg name: auto-test-execution platforms: [all] description: Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
auto-test-execution
Automatically execute tests when code-generating agents write to source files, enforcing the execute-before-return pattern.
Triggers
Primary phrases matched automatically from skill description. No additional alternate expressions defined.
Purpose
This skill enforces the MetaGPT executable feedback pattern: code-generating agents must execute tests before returning results to the user. It activates automatically when agents modify source code files.
Behavior
When triggered, this skill:
1. **Detect modified files**:
- Track which source files the agent has written to
- Identify the relevant test framework
2. **Find related tests**:
- Look for test files matching the modified source
- Convention: `src/foo/bar.ts` -> `test/unit/foo/bar.test.ts`
- If no tests exist, prompt agent to generate them
3. **Execute tests**:
- Run the project's test command focused on relevant tests
- Capture results: passed, failed, errors
4. **Handle results**:
- All pass: Allow agent to return results
- Failures: Trigger debug-and-retry loop (max 3 attempts)
- Persistent failures: Escalate with debug memory context
5. **Update debug memory**:
- Record session in `.aiwg/ralph/debug-memory/sessions/`
- Extract patterns for future reference
Activation Conditions
activation:
always_active_for:
- software-implementer
- debugger
- test-engineer
triggered_by:
- file_write:
patterns:
- "src/**/*.ts"
- "src/**/*.js"
- "src/**/*.py"
- "**/*.go"
- "**/*.rs"
skip_when:
- test_files_only: true
- documentation_only: true
- configuration_only: trueIntegration
This skill uses:
- `project-awareness`: Detect test framework and configuration
- Debug memory at `.aiwg/ralph/debug-memory/` for pattern learning
References
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md - Feedback rules
- @$AIWG_ROOT/agentic/code/addons/ralph/docs/executable-feedback-guide.md - Guide
- @$AIWG_ROOT/agentic/code/addons/ralph/schemas/debug-memory.yaml - Memory schema
- @.aiwg/research/findings/REF-013-metagpt.md - Research foundation
Multi-agent AI framework for Claude Code, Copilot, Cursor, Warp, and 6 more platforms 200+ agents, 109+ CLI commands, 400+ deployable agent/skill/command/rule artifacts, 8 core frameworks, 32 addons, and a 40-plugin Claude Code marketplace.
Repo: jmagly/aiwg
Other skills on aiwg.
- /agent-loop-ext
Crash-resilient external agent loop with state persistence and CI/CD integration
Open skill - /agent-loop
Detect requests for iterative autonomous agent loops and route to the appropriate loop executor
Open skill - /cross-task-learner
Enable agent loops to learn from similar past tasks and share patterns across loops
Open skill - /debug-memory
Query and manage the executable feedback debug memory
Open skill - /execute-feedback
Execute tests on generated code and iterate until passing
Open skill - /infer-completion-criteria
Infer measurable completion criteria for an agent-loop task from project docs, code, and AIWG standards when the user has not supplied --completion explicitly
Open skill

