Agent skill
tdd-tidy-first
Kent Beck style workflow for code changes using small verifiable steps, Red-Green-Refactor, and Tidy First separation of structural versus behavioral changes. Use when: - Implementing or fixing code where a cheap failing test or reproducer is possible - Refactoring mixed changes into structural and behavioral slices - Choosing the smallest safe next step for a code change
Install this agent skill to your Project
npx add-skill https://github.com/i9wa4/dotfiles/tree/main/nix/home-manager/agents/skills/tdd-tidy-first
SKILL.md
TDD Tidy First Skill
Use this skill to keep code changes small, verifiable, and easy to review.
1. Core Defaults
- Prefer the smallest next step that can be verified quickly
- For behavioral changes, start with a failing test or minimal reproducer when that is cheap to add
- Implement only enough code to pass the new check
- Refactor only after the behavior is verified
- Keep structural changes separate from behavioral changes when practical
2. Red -> Green -> Refactor
- Write the smallest failing test or reproducer that demonstrates the next behavior
- Make it pass with the minimum code change
- Run the fastest relevant verification for that slice
- Refactor for clarity or duplication removal only after the check passes
- Re-run verification after each refactor step
3. Tidy First Split
- Structural changes: renames, extraction, moves, dependency reshaping, or cleanup that should not change behavior
- Behavioral changes: new features, bug fixes, changed outputs, or changed side effects
- When both are needed, do structural work first, verify it preserved behavior, then apply the behavioral change
4. Bug-Fix Pattern
- Start with a failing API-level test when one is easy to add
- If the failure is hard to isolate, add the smallest reproducer that exposes the defect clearly
- If the bug is not yet understood, use
systematic-debuggingfirst to gather evidence and narrow the root cause before changing code - Fix the bug only after the reproducer fails for the expected reason
5. Repo Fit
- Do not assume a
plan.mdworkflow; this repo usesmkmdplan and research artifacts when planning is needed - Do not adopt a universal "run all tests every time" rule; run the fastest relevant checks during iteration, then run broader verification before reporting success when available
- When commits are requested and structural plus behavioral changes are both present, prefer separate commits or state the split explicitly
- Skip this workflow for doc-only or config-only tasks with no meaningful test surface
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
subagent-review
Argument-driven code/design review wrapper. Invokes reviewer sub-skills for each specified engine+tier label. Defaults to 'cc cx' (10 reviewers) if no arguments given. Argument format: space-separated labels from {cc, cc-deep, cx, cx-deep} Examples: 'cc cx' (default), 'cc-deep cx-deep', 'cc', 'cx-deep' Use when: - Running code reviews on PRs, commits, or branches - Running design reviews on issues or documents - Need multi-perspective review (security, architecture, code, QA, historian)
brainstorming
Ambiguity-reduction workflow for requests that are not yet plan-ready or implementation-ready. Use when there are multiple plausible approaches, the task is user-facing or design-shaping, requirements are fuzzy, or Codex needs to compare 2-3 options with trade-offs before choosing a direction.
databricks-local
Databricks local additions - Queries API, VARIANT/JSON, Dashboard API, dbt integration, Jupyter kernel Supplements the official `databricks` skill with project-specific patterns. Use when: - Working with Databricks Queries API (saved queries) - Handling VARIANT type or JSON operations - Working with Lakeview Dashboard API - Integrating dbt with Databricks JSON/VARIANT columns - Running Jupyter notebooks with Databricks kernel
codex-prompting-local
Portable Codex prompt, review-contract, and resume-handoff guidance adapted from codex-plugin-cc for this repo's Nix-managed Codex CLI and Claude Code setup. Use when: - Composing prompts for Codex or GPT-5.4-based subagents - Designing structured review or adversarial-review prompt contracts - Writing resumable task prompts or result handoffs - Re-expressing useful old slash-command workflows on the skills side instead of reviving slash commands
nix
Nix commands and package management guide. Use when: - Using nurl for hash acquisition
bigquery-local
BigQuery local additions - cost-aware query patterns and project conventions. Supplements general BigQuery knowledge with guardrails. Use when: - Running bq commands - Writing GoogleSQL queries - Designing partitioned/clustered tables
Didn't find tool you were looking for?