Skip to content
Back to skills

Execution

ASecurity

**Pattern:** Coordinator-Cached Test Execution **Status:** OPERATIONAL - Specialized for multi-agent concurrent testing

  • 13 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 5, 2026
ai-agentstypescriptbashtestingdatabaseperformance

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add masharratt/claude-flow-novice --skill execution --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Execution?

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

Security grade badge for Execution
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/masharratt-execution-claude-flow-novice/badge)](https://www.skillsdirectory.com/skills/masharratt-execution-claude-flow-novice)

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
---
name: Test Execution
version: 1.2.0
complexity: High
status: OPERATIONAL (Specialized Use Case)
keywords: [
    "coordinator-pattern",
    "distributed test framework",
    "single-run caching",
    "conflict prevention",
    "resource-optimized testing",
    "test distribution",
    "parallel test management"
]
triggers: [
    "3+ agents need test results simultaneously",
    "preventing test conflicts in multi-agent scenarios",
    "distributed test environments with resource contention"
]
performance_targets: {
    "test_run_time_ms": 5000,
    "coverage_accuracy_pct": 95,
    "caching_efficiency_pct": 90,
    "max_concurrent_workers": 10
}
---

# Test Execution Skill

**Pattern:** Coordinator-Cached Test Execution
**Status:** OPERATIONAL - Specialized for multi-agent concurrent testing

## When to Use This Skill

**USE when:**
- 3+ agents need test results simultaneously
- Multi-agent swarms testing in parallel
- Preventing port/resource conflicts is critical
- Distributed testing environments

**DO NOT USE when:**
- Single agent testing → Use `npm test` directly
- Code validation → Use `.claude/hooks/invoke-post-edit.sh`
- Simple test execution → Use `npm test` directly
- Development workflow → Use standard npm scripts

## Problem Statement

Concurrent test execution causes conflicts, resource contention, and flaky results. Multiple agents running tests simultaneously creates:
- Port conflicts (test servers)
- Database/file system race conditions
- Unreliable coverage reports
- Wasted computation from duplicate test runs

## Solution: Coordinator Pattern

**Single Test Execution:** One coordinator agent runs all tests once
**Cached Results:** Results stored in Redis + JSON file
**Worker Reads:** All other agents read cached results (never execute tests)

## Implementation

### Scripts Available

1. **test-coordinator-pattern.sh** - Coordinator runs tests, caches to Redis
2. **test-cache-reader.sh** - Workers read cached results
3. **test-concurrent-conflicts.sh** - Validates coordinator pattern (20 runs)

### Usage

**Coordinator Agent (runs tests):**
```bash
# Run tests once and cache results
./.claude/skills/test-execution/test-coordinator-pattern.sh swarm-123
```

**Worker Agents (read cache):**
```bash
# Read cached test results (waits for coordinator)
./.claude/skills/test-execution/test-cache-reader.sh swarm-123 worker-1
```

**Validate Pattern:**
```bash
# Test concurrent execution (20 cycles)
./.claude/skills/test-execution/test-concurrent-conflicts.sh
```

## Workflow

```
1. Coordinator detects "run tests" signal
2. Coordinator terminates existing test processes
3. Coordinator runs: npm test -- --run --reporter=json
4. Results cached to:
   - Redis: swarm:${SWARM_ID}:tests:metadata
   - File: test-results.json
5. Workers wait for completion signal (max 5min timeout)
6. Workers read cached results
7. All agents use same test results (no conflicts)
```

## Performance Metrics

- Test execution: 1x instead of Nx (N = number of agents)
- Cache read latency: <100ms
- Conflict prevention: 100% (validated with 20 concurrent runs)
- Resource savings: ~90% (no duplicate test processes)

## Integration with Other Skills

- **Post-Edit Hooks:** Use `.claude/hooks/invoke-post-edit.sh` for TypeScript validation (simpler, faster)
- **Redis Coordination:** Uses same Redis pub/sub infrastructure
- **CFN Loop Validation:** Can integrate test results into consensus calculation

## Current Project Status

**Active Tests:** None in `/src` (legacy tests in `/packages`)
**Jest Configuration:** Installed (29.7.0) but not actively used
**Recommendation:** Skill is operational but currently unnecessary. Use `npm test` directly for development.

## Future Use Cases

When multi-agent swarms become active and need concurrent testing:
1. Designate one agent as test coordinator
2. Coordinator uses `test-coordinator-pattern.sh`
3. Workers use `test-cache-reader.sh`
4. Validate with `test-concurrent-conflicts.sh`

Files in this skill

  • README.md3.4 KB
  • SKILL.md3.9 KB
  • check-dependencies.sh805 B
  • test-cache-reader.sh4.6 KB
  • test-concurrent-conflicts.sh4.1 KB
  • test-coordinator-pattern.sh3.6 KB

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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