# Software Test Creation

Write failing tests for a TDD slice based on acceptance criteria and codebase conventions.

- Repository: https://github.com/stencila/stencila (914 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add stencila/stencila --skill software-test-creation -g -a claude-code -y`
Codex: `npx skills add stencila/stencila --skill software-test-creation -g -a codex -y`
Cursor: `npx skills add stencila/stencila --skill software-test-creation -g -a cursor -y`
Gemini CLI: `npx skills add stencila/stencila --skill software-test-creation -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add stencila/stencila`

## Description

Write failing tests for a TDD slice based on acceptance criteria and codebase conventions. Use when the "red" phase of red-green-refactor requires tests that define expected behavior before implementation exists. Discovers codebase test conventions first, writes test files that compile or parse but fail because the implementation does not yet exist, and reports test metadata. Works with any language or test framework.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## Overview

Write failing tests for a TDD slice as part of a red-green-refactor cycle. This skill handles the "red" phase: given slice scope, acceptance criteria, and target packages, it discovers the codebase's existing test conventions, writes test files that compile or parse but fail because the implementation does not yet exist, and reports the test file paths and test command.

The core principle is **discover first, prescribe only as fallback**. The agent must adapt to whatever language, framework, and conventions the codebase already uses. Language-specific defaults are provided only for the case where no existing test conventions can be found.

The tests must:

- Cover the slice's acceptance criteria
- Follow the codebase's existing test conventions (framework, assertion style, directory layout, naming)
- Compile or parse successfully (no syntax errors)
- Fail because the code under test does not exist or does not yet behave correctly
- Be minimal, test only what the slice requires, not more
- Earn their maintenance cost, every test must provide meaningful confidence beyond what the compiler, type system, or trivial construction already guarantees

Not every acceptance criterion should become an automated unit or integration test. If a slice includes documentation, comments, commit-message, changelog, release-note, or other non-executable deliverables, do **not** create tests that inspect source files merely to assert those artifacts exist. Those criteria should instead be treated as implementation or review obligations to be satisfied by the implementation/refactor/human-review stages. Only write automated tests for executable behavior or other machine-checkable product behavior where such tests are a natural fit.

## Required Inputs

This skill requires the following information to operate:

The rest: https://github.com/stencila/stencila/blob/HEAD/.stencila/skills/software-test-creation/SKILL.md
