Install
$ agentstack add skill-anton-abyzov-specweave-tdd-red ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
> ⚠️ DEPRECATED: Use sw:tdd-cycle --phase red instead. This skill will be removed in v1.3.0.
Migration
This skill has been deprecated as part of the Opus 4.7 framework alignment (increment 0669).
- Use instead:
sw:tdd-cycle --phase redruns only the RED phase (write failing tests) - Removal: Scheduled for v1.3.0 (2 minor releases after v1.1.0)
- Why: The three TDD phase skills (tdd-red, tdd-green, tdd-refactor) were consolidated into
sw:tdd-cyclewith a--phaseflag. Alias routing inmarketplace.jsonredirects/sw:tdd-red→/sw:tdd-cycle --phase redautomatically.
For the migration policy, see .specweave/docs/internal/specs/skill-deprecation-policy.md.
TDD Red Phase - Write Failing Tests
Project Overrides
Skill Memories: If .specweave/skill-memories/tdd-red.md exists, read and apply its learnings.
Write comprehensive failing tests following TDD red phase principles.
Role
Generate failing tests using Task tool with subagent_type="unit-testing::test-automator".
Prompt Template
"Generate comprehensive FAILING tests for: $ARGUMENTS
Core Requirements
- Test Structure: Framework-appropriate setup, Arrange-Act-Assert, shouldXwhen_Y naming, isolated fixtures
- Behavior Coverage: Happy path, edge cases (empty/null/boundary), error handling, concurrent access
- Failure Verification: Tests MUST fail when run, for RIGHT reasons (not syntax/import errors), meaningful diagnostics
- Test Categories: Unit (isolated), Integration (interaction), Contract (API/interface), Property (invariants)
CLI Integration Test Patterns
Temp Home Isolation (prevents touching real ~/.specweave/):
import { withIsolatedHome, getIsolatedEnv } from '../test-utils/temp-home.js';
it('should run CLI command in isolated environment', async () => {
const { homePath, restore } = await withIsolatedHome('my-test');
try {
const { stdout } = await execAsync('node bin/cli.js --version', {
env: getIsolatedEnv(homePath),
});
expect(normalizeOutput(stdout)).toMatch(/^\d+\.\d+\.\d+$/);
} finally {
await restore();
}
});
Hook Execution Testing:
import { HookTestHarness } from '../test-utils/hook-test-harness.js';
import { extractJson } from '../test-utils/normalize-output.js';
it('should return approve decision from hook', async () => {
const harness = new HookTestHarness(testDir, hookPath);
const result = await harness.execute({ CI: 'true' });
const json = extractJson(result.stdout);
expect(json?.decision).toBe('approve');
});
Process Spawning: Use getCleanEnv()/getIsolatedEnv() to strip NODE_OPTIONS. Set { timeout: 30000 }. Use normalizeOutput() and extractJson().
Validation
After generation:
- Run tests — confirm they fail
- Verify helpful failure messages
- Check test independence
- Ensure comprehensive coverage"
Test requirements: $ARGUMENTS
Resources
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: anton-abyzov
- Source: anton-abyzov/specweave
- License: MIT
- Homepage: https://spec-weave.com
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.