From sw
Deprecated: Writes failing tests for TDD red phase. Use sw:tdd-cycle --phase red instead.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sw:tdd-redThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> ⚠️ DEPRECATED: Use `sw:tdd-cycle --phase red` instead. This skill will be removed in v1.3.0.
⚠️ DEPRECATED: Use
sw:tdd-cycle --phase redinstead. This skill will be removed in v1.3.0.
This skill has been deprecated as part of the Opus 4.7 framework alignment (increment 0669).
sw:tdd-cycle --phase red runs only the RED phase (write failing tests)sw:tdd-cycle with a --phase flag. Alias routing in marketplace.json redirects /sw:tdd-red → /sw:tdd-cycle --phase red automatically.For the migration policy, see .specweave/docs/internal/specs/skill-deprecation-policy.md.
Skill Memories: If .specweave/skill-memories/tdd-red.md exists, read and apply its learnings.
Write comprehensive failing tests following TDD red phase principles.
Generate failing tests using Task tool with subagent_type="unit-testing::test-automator".
"Generate comprehensive FAILING tests for: $ARGUMENTS
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<{ decision: string }>(result.stdout);
expect(json?.decision).toBe('approve');
});
Process Spawning: Use getCleanEnv()/getIsolatedEnv() to strip NODE_OPTIONS. Set { timeout: 30000 }. Use normalizeOutput() and extractJson().
After generation:
Test requirements: $ARGUMENTS
npx claudepluginhub anton-abyzov/specweave --plugin swGenerates failing tests for the TDD red phase to define expected behavior and edge cases across multiple frameworks.
Generates failing tests from feature specifications (TDD RED phase). Parses acceptance criteria and user test cases, then produces runnable test files with clear assertions.
Enforces test-driven development: write failing tests first, then implement code, then refactor. Use for new features requiring test coverage.