SkillsReviewed · rohitg00

SkillKit Red-Green-Refactor

Red-Green-Refactor is an instruction skill for developers and coding assistants practising test-driven development, but it leaves test setup and project-specific coverage to the user. It describes writing one failing test, implementing enough code to pass it, and refactoring while keeping tests passing, with JavaScript and Jest examples.

Researched 15 Nov 2026

In short.

Red-Green-Refactor is an instruction skill for developers and coding assistants who want to write tests before implementation, but it provides no test environment or automatic enforcement. Its version 1.0.0 document explains the cycle through a shopping-total example, gives rules for when to add tests, and lists verification checks. The example covers two discount cases while leaving boundary conditions, invalid inputs and monetary rounding unspecified. Nothing was executed; activation, compatibility and test outcomes remain unverified.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage comprises the complete supplied folder packages/core/src/methodology/packs/testing/red-green-refactor at commit d2e5c346f73325c326820efd3188dcf2b6eb704f, containing SKILL.md, plus the repository-level LICENSE outside that folder. Other SkillKit components, referenced skills, assistant integrations and external documentation are outside this evidence. No code or commands were executed; installation, activation, compatibility, test outcomes and performance remain unverified.

The overview

identity

The resource is the red-green-refactor skill in rohitg00/skillkit, located at packages/core/src/methodology/packs/testing/red-green-refactor/SKILL.md. Its front matter declares version 1.0.0, intermediate difficulty, trigger phrases and related skills. The folder's supplied contents consist of this instruction document.

The original folder address is [https://github.com/rohitg00/skillkit/tree/main/packages/core/src/methodology/packs/testing/red-green-refactor]. The source examined is pinned to commit d2e5c346f73325c326820efd3188dcf2b6eb704f.

assessment

This is a useful compact guide for keeping an assistant's implementation work focused on observable behavior. Its concrete examples make the sequence understandable, and its checklist prompts checks for unnecessary code, flaky tests and tests that still pass after the feature is removed.

Its usefulness depends on the surrounding project and assistant. The document supplies instructions rather than mechanisms that enforce the sequence, provision dependencies or establish adequate coverage. No evidence demonstrates improved code quality, reduced defects or consistent assistant compliance.

users

The intended audience includes developers asking a coding assistant to practise TDD, implement a feature from a failing test, or reproduce a bug before fixing it. Beginners get a worked example; experienced developers get a reusable process reminder.

The file labels its difficulty intermediate. Readers still need enough familiarity with their project's test framework to write assertions, run tests and distinguish a behavior failure from a broken test setup.

capabilities

The skill describes choosing one behavior, writing a failing test, checking why it fails, implementing the minimum needed change, and improving the implementation while rerunning tests. It applies the cycle to features, bug fixes and newly discovered edge cases.

It also identifies situations where an additional test is unnecessary, including formatting changes and pure refactoring already covered by existing tests. Its cautions address testing implementation details, adding multiple tests at once and skipping refactoring.

Using it

requirements

Applying the cycle requires a defined behavior, editable project files and a working way to run tests. Using it as an assistant skill also requires a host that can consume the document; supported hosts and model requirements are unspecified.

The example uses JavaScript, CommonJS require/module.exports and Jest's describe, it and expect assertions. Reproducing it requires a compatible JavaScript test environment. Runtime versions, dependency versions, a package manifest and a test command are absent.

mechanism

The skill works through written instructions. Its front matter lists intended triggers such as tdd, write tests first and failing test. The supplied file does not establish how any host detects those triggers or whether activation happens automatically.

The body organizes work into three phases: observe a failing test, make it pass with a small implementation, then refactor while preserving passing tests. Repeating that sequence adds one behavior at a time.

setup

A practical starting point is to obtain the pinned SKILL.md, make it available through the assistant host's documented skill-loading method, and identify the project's test command and desired behavior. Configure the test environment separately.

The document provides no SkillKit installation command, host-specific destination or activation procedure. Those details must come from the chosen host's documentation; successful installation and loading are unverified.

example

The worked example starts with two items priced at 60 each and an assertion expecting a total of 108 after a 10% discount. It then adds two items priced at 110 each and an assertion expecting 187 after a 15% discount. These values are the document's intended expectations, not observed execution results.

The implementation evolves from a conditional calculation into a descending list of discount tiers. Because it selects the first matching tier, that order matters. Its strict greater-than comparisons imply that a subtotal of 100 receives no discount and a subtotal of 200 receives 10%; neither boundary has an example test.

Assessment & evidence

limitations

The examples cover two totals above discount thresholds. They do not demonstrate the no-discount branch, exact thresholds, empty input, invalid prices or currency rounding. Passing those two assertions alone would leave substantial behavior unspecified.

The initial example treats a missing calculateTotal module as an acceptable failing state. That establishes a missing dependency; a useful follow-up is to confirm that, once imports work, the assertion also fails when the required behavior is absent.

There is no runner configuration, enforcement code or evidence of automatic assistant compliance in the supplied folder. Runtime behavior and results were not assessed through execution.

reasoning

The workflow's rationale is that observing failure before implementation helps establish that a test can detect missing behavior. Small implementation steps narrow the change being evaluated, while rerunning tests during refactoring checks that covered behavior remains intact.

These are reasons to consider the process, not measured benefits established by this resource. The document supplies no comparative study, benchmark or independent evidence that following it produces better outcomes.

alternatives

A developer can apply the described cycle manually with an existing test runner. Loading the skill adds reusable assistant guidance; comparative effectiveness is unknown.

The document references testing/test-patterns for test structure, testing/anti-patterns for common mistakes and debugging/root-cause-analysis for investigating unexpected failures. These are complementary references whose contents, availability and compatibility are not established by the supplied files.

evidence

The instruction source is [https://raw.githubusercontent.com/rohitg00/skillkit/d2e5c346f73325c326820efd3188dcf2b6eb704f/packages/core/src/methodology/packs/testing/red-green-refactor/SKILL.md]. Its SHA-256 is a20e71fb14287f9a9502b1c080f08ba54c6a869f9d5e6244caae3d24faeaaa73.

The accompanying repository licence is [https://raw.githubusercontent.com/rohitg00/skillkit/d2e5c346f73325c326820efd3188dcf2b6eb704f/LICENSE]. Its SHA-256 is 05615527346a6f809bf334a8374f28b4c6f58265f958c27a729b284a77962931.

The document describes expected failures and passing examples, but supplies no execution receipts establishing those outcomes. Nothing was executed; test results, host activation and compatibility remain unverified.

Access & freshness

costs

The repository licence grants copyright and applicable patent permissions without a licence charge, subject to its conditions. The supplied files state no subscription, purchase price or usage fee for the skill.

Total operating cost is unknown. Assistant or model charges, test infrastructure costs and setup effort depend on the environment and are not quantified.

rights

The repository-level LICENSE supplies Apache License 2.0 terms and a copyright notice naming Rohit Ghumare, 2025. It permits reproduction, modification and redistribution subject to the licence conditions.

Redistribution requires a licence copy, preservation of applicable notices and prominent notices on modified files. Relevant NOTICE attributions must also be preserved if such a file accompanies the work. The licence includes warranty disclaimers, limits trademark permission and sets conditions on its patent grant. No separate folder-specific licence appears in the supplied scope.

freshness

The document declares version 1.0.0. The source snapshot was captured on 2026-11-15 at 23:33:50.797 UTC from commit d2e5c346f73325c326820efd3188dcf2b6eb704f; that capture time is not a release or author-update date.

The resource's release date, subsequent changes and compatibility with current assistant hosts or test-runner versions are unknown.

actions

For adoption, confirm that the chosen assistant can load the file and that the project's test command works. Start with one small behavior, inspect the reason for the initial failure, then check the implementation and refactoring stages.

For the included discount example, add cases for exact thresholds, the no-discount branch and any required input or rounding rules. Check that removing the implemented behavior makes the relevant test fail, as the skill's checklist recommends. Preserve the licence and applicable attribution when sharing the file.

Evidence for this report

LICENSEnotice · checked 2026-11-15