development-style

Enforces TDD cycles, test discipline, and code design principles when writing production code.

Updated Apr 8, 2017
One-click install
npx skills add https://github.com/localmin/dotfiles --skill development-style-localmin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: development-style
Source: https://github.com/localmin/dotfiles/tree/main/coding-agents/skills/development-style
Command: npx skills add https://github.com/localmin/dotfiles --skill development-style-localmin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents common AI coding failures such as writing tests that merely mirror the implementation, skipping the Red verification step, over-testing internal details, and letting hardcoded values or tangled responsibilities slip into production code. ## Core Features & Use Cases - TDD Cycle Enforcement: Mandates the Explore → Red → Green → Refactor loop, requiring the failing test to actually be executed and confirmed before implementation begins. - Test Discipline Rules: Treats tests as specifications, bans implementation-fitted and tautological tests, limits test scope to agreed public seams, and requires documenting what the test suite does and does not guarantee. - Code Design Principles: Enforces separation of concerns, single responsibility, guard clauses, no hardcoding, security-first input handling, and delegating statically checkable rules to linters or ast-grep. - Use Case: When asking an AI agent to add a feature or fix a bug, this skill ensures it writes a failing test first, implements the minimum to pass, refactors cleanly, and documents the guarantee scope of the tests. ## Quick Start Apply the development-style rules while implementing this feature using test-driven development.

Frequently Asked Questions about development-style

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

FAQPage Schema
How do I enforce TDD with an AI coding assistant?

Use a skill that mandates the Red-Green-Refactor cycle: the AI must write one failing test, run it to confirm it fails for the expected reason, then write minimal code to pass. This skill encodes exactly that discipline plus refactoring guidance.

How to prevent AI from writing tests that just mirror the implementation?

Ban implementation-fitted tests by requiring tests be written from specifications before any implementation exists. If implementation was written first, discard it and redo test-first. Expected values must come from independent sources, not recomputed like the code under test.

What is a tautological test and why avoid it?

A tautological test recomputes the expected value using the same logic as the implementation, so it passes trivially and verifies nothing. Expected values should come from specifications, known correct examples, or hand calculation instead.

When should tests be changed if they fail?

Failing tests mean the code should be fixed, not the test. Tests may only change when the specification itself changes, and that must be explicitly declared as a spec change with user agreement before modifying them.

Should code style rules live in prompts or linters?

Any rule that can be statically checked, such as naming conventions, magic numbers, or DRY violations, should be enforced by a linter or ast-grep rather than prose instructions. Prompts should only carry rules machines cannot verify.