Shell Tool · engineering · Sentinel

TDD a Feature

Red → green → refactor. Failing test first, minimum-code to pass, refactor only after green.

Updated today
View as MarkdownsentinelsonnetstandardMax 15 turns

Overview

Strict TDD discipline. Writes the failing test via shell_write, runs it via shell_exec, watches it fail (red), implements the minimum code to make it pass (green), only then considers refactoring (per minimal-patch/SKILL.md). Forbidden to skip the red phase. Forbidden to refactor while red.

When to use this

  • user wants to build a new feature TDD-style
  • user says 'TDD this' / 'red green refactor' / 'write the test first'
  • user wants strong test coverage from day one

When NOT to use this

  • feature has no testable interface → use spin-up-web-app or shell_exec directly
  • user is fixing a bug, not adding a feature → use minimal-patch + add regression test

Example prompts

TDD a function that validates email addresses
build the rate-limiter TDD style
red-green-refactor a new endpoint /api/foo

Inputs and output

Inputs

FieldDescription
featurewhat to build in one sentence
test_runnerpnpm test | bun test | etc.

Output

Implementation file + test file + the green test-runner output.

Runtime profile

What the engine commits when this skill runs.

PropertyValueMeaning
Model tiersonnetThe balanced default model class. Trades quality against cost for the vast majority of skill runs.
Cost classstandardThe balanced default model. Right for most skills.
Turn budget15Hard cap on tool-calling iterations before the engine forces a final answer.
ExecutionsynchronousRuns inside the live turn; result lands in the same response.

Under the hood

Tools the engine exposes to this skill and integrations it needs.

ResourceKind
shell_exectool
shell_writetool
shell_readtool

Tags: engineering, test, discipline

Execution template

Shell tools dispatch via a command template. The model substitutes user inputs into the placeholders before firing the underlying tool.

shell_execbash
1write failing test for {{feature}} -> {{test_runner}} (RED) -> implement min code -> {{test_runner}} (GREEN) -> refactor per minimal-patch/SKILL.md

Invoking this from an agent

Three paths reach this skill. From the chat UI, a user can type the persona slash command followed by a natural request and the discovery step resolves to this skill automatically. From the MCP server, fetch the skill detail with get_skill({id: "tdd-feature"}) and then invoke it through the agent runtime once the authenticated tier ships. From your own code, hit /docs/skills/tdd-feature/llm.txt for the token-efficient markdown body and feed it to your model directly.

Note
Every skill page has a canonical permalink and a markdown alternate that LLM crawlers consume via Accept: text/markdown. The full machine-readable catalog lives at /.well-known/agent-skills/index.json.