# Build TypeScript Features with TDD

Teams often struggle to keep tests focused during fast TypeScript changes. This skill guides RED-GREEN-REFACTOR work with practical Node.js patterns.

## Install

```bash
npx skillstore add doubleslashse/tdd-workflow
```

## Metadata

- Status: approved
- Slug: doubleslashse-tdd-workflow
- Skillstore revision: r1
- Version status: missing
- Tree hash: 4f46e94c09a618d5e6e37344aff2bbdab0d1d1d4f3fafc673226b987d98e1b3e
- Author: DoubleslashSE
- GitHub username: DoubleslashSE
- License: MIT
- Repository: https://github.com/DoubleslashSE/claude-workflows/tree/main/Plugins/dotnet-tdd/skills/tdd-workflow
- Ref: 72d5025b022c77f7a51bdf5c1637c689c80e89d1
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/doubleslashse-tdd-workflow
- Manifest: https://skillstore.pages.dev/api/skills/doubleslashse-tdd-workflow/manifest

## Capabilities

- Explain the RED-GREEN-REFACTOR cycle for Node.js and TypeScript features.
- Provide AAA test structure examples and clear naming conventions.
- Describe unit, integration, contract, and async test patterns.
- Show test double patterns such as stubs, mocks, fakes, and spies.
- Guide refactoring while keeping the related test set passing.

## Use Cases

- Add a Feature Safely: Plan failing tests, implement the smallest behavior, and refactor after the test passes.
- Standardize Team Testing: Use shared naming, AAA structure, and test organization patterns across a Node.js codebase.
- Teach Practical TDD: Explain test doubles, parameterized tests, async tests, and dependency injection with concise examples.

## Prompt Templates

### Start a TDD Cycle

```
Use the tdd-workflow skill to plan a RED-GREEN-REFACTOR cycle for [feature] in a Node.js TypeScript project.
```

### Write First Failing Tests

```
Use the tdd-workflow skill to identify the first failing tests for [behavior], including happy path, edge cases, and error cases.
```

### Design Test Doubles

```
Use the tdd-workflow skill to choose suitable stubs, mocks, fakes, or spies for [module] and explain why each one fits.
```

### Refactor With Tests

```
Use the tdd-workflow skill to review [test plan or module behavior] and propose safe refactoring steps while preserving test coverage.
```

## Limitations

- Does not run tests or inspect a project by itself.
- Examples are generic and may need changes for local frameworks.
- Focuses on Node.js and TypeScript, not every language.
- Does not replace security, performance, or accessibility testing.

## Best Practices

- Start with one observable behavior and write the failing test first.
- Keep test data builders clear and close to the domain language.
- Refactor only after the relevant test set passes.

## Anti Patterns

- Testing private state instead of user-visible behavior.
- Sharing mutable test state across unrelated cases.
- Overusing snapshots for logic that needs explicit assertions.

## Security Audit

- Audited at: 2026-07-06T11:37:52.809\+00:00
- Summary: The static alerts are false positives caused by Markdown code blocks, inline backticks, common test names, and sample dependency names. No prompt injection, command execution instructions, credential access, network access, or malicious intent were found in SKILL.md or patterns.md.

## Stats

- Views: 250
- Downloads: 10
- Favorites: 0
- Popularity score: 0
