testing-before-coding

Define and run tests to verify software behavior before implementing changes.

11|Updated Sep 6, 2011
One-click install
npx skills add https://github.com/tclem/dotfiles --skill testing-before-coding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-before-coding
Source: https://github.com/tclem/dotfiles/tree/main/copilot/skills/testing-before-coding
Command: npx skills add https://github.com/tclem/dotfiles --skill testing-before-coding

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers define and verify expected behaviors through tests or other checks before modifying production code, reducing errors and improving reliability.

Core Features & Use Cases

  • Behavior Specification: Define or choose a test, fixture, or manual check to verify a feature or bug fix.
  • Verification Process: Run the check to confirm it fails for the expected reason, then implement code to pass it.
  • Use Case: A developer writes a unit test for a new feature, runs it to see it fail, then modifies code and reruns until it passes, ensuring correctness.

Quick Start

Specify the expected behavior using a test or verification check before editing the main codebase.

Frequently Asked Questions about testing-before-coding

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

FAQPage Schema
Why define expected behavior with tests before modifying production code?

Defining expected behavior with tests before modifying production code ensures expected outcomes are specified in advance. This reduces errors during development by validating that new changes pass automated or manual checks.

How do I verify a bug fix before implementing the code changes?

To verify a bug fix, define a test, fixture, or manual check to confirm the expected behavior. Run the check to see it fail for the expected reason, implement the code change, then rerun until it passes.

What is the best way to ensure software behavior correctness during development?

The best way to ensure behavior correctness is specifying expected outcomes through verification checks before editing the main codebase. This approach supports reliable development workflows by catching errors early.

Can I use manual checks instead of automated tests to verify expected behavior?

Yes, you can use manual checks instead of automated tests. The verification process supports defining and running both automated tests and manual checks to validate software behavior before making changes.

When do I need to run a verification check during a development workflow?

You need to run a verification check during a development workflow whenever implementing a new feature or bug fix. Run it initially to confirm it fails for the expected reason, then rerun after modifying code until it passes.

Does this testing approach work for both new features and bug fixes?

Yes, this testing approach works for both new features and bug fixes. It facilitates defining verification checks to validate expected software behavior before implementing changes across various development workflows.