One-click install
npx skills add https://github.com/sigitpoerwo/repoworkspace_zahra --skill core-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: core-tdd
Source: https://github.com/sigitpoerwo/repoworkspace_zahra/tree/main/skills/01-SIAP-PAKAI/coding/core-tdd
Command: npx skills add https://github.com/sigitpoerwo/repoworkspace_zahra --skill core-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers adopt strict Test-Driven Development by providing a complete, example-driven workflow that ensures tests define behavior before implementation, reducing bugs and improving code quality.

Core Features & Use Cases

  • Red-Green-Refactor cycle: outlines the three-step loop to write failing tests, implement minimal code, and refactor safely.
  • Comprehensive guidelines: includes best practices, patterns (AAA, mocks, parameterized tests), and common mistakes to avoid.
  • Educational examples: contains end-to-end examples in TypeScript/JavaScript demonstrating test-first development.

Quick Start

Begin by selecting a small feature and run the Red-Green-Refactor cycle to drive implementation with tests.

Frequently Asked Questions about core-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the red-green-refactor cycle work in test-driven development?

The red-green-refactor cycle in test-driven development enforces writing a failing test first, implementing minimal code to pass it, then refactoring safely. This workflow reduces bugs by ensuring tests define behavior before implementation across TypeScript and JavaScript projects.

What is the best way to start test-driven development for a new TypeScript feature?

The best way to start test-driven development for a new TypeScript feature is to select a small feature scope and run the red-green-refactor loop. You drive implementation by writing failing unit tests first, then introducing minimal code to satisfy them.

Can I use test-driven development best practices for JavaScript unit testing and refactoring?

Yes, you can apply test-driven development best practices for JavaScript unit testing and refactoring. It provides comprehensive guidelines including AAA patterns, mocks, and parameterized tests to ensure clean, maintainable code during feature introduction.

What common mistakes should I avoid when writing unit tests before implementation?

Common mistakes to avoid when writing unit tests before implementation include skipping the refactor phase or writing tests after the code. Following strict test-first development rules prevents these errors and ensures code quality remains high.

Does test-driven development work with both TypeScript and JavaScript projects?

Test-driven development works seamlessly across both TypeScript and JavaScript projects. It standardizes unit testing, refactoring, and feature introduction scenarios with explicit rules and educational examples tailored for these specific ecosystems.