Skip to content
Back to skills

Auto Test Execution

ASecurity

Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern

  • 211 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 21, 2026
ai-agentsgoexpressdocumentation

Security analysis

A100/100

Scanned September 21, 2026

npx -y skills add jmagly/ai-writing-guide --skill auto-test-execution --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Auto Test Execution?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Auto Test Execution
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jmagly-auto-test-execution-fa333de7/badge)](https://www.skillsdirectory.com/skills/jmagly-auto-test-execution-fa333de7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

```yaml
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: true
```

## Integration

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/agent-loop/docs/executable-feedback-guide.md - Guide
- @$AIWG_ROOT/agentic/code/addons/agent-loop/schemas/debug-memory.yaml - Memory schema
- @.aiwg/research/findings/REF-013-metagpt.md - Research foundation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.