tidying

Apply small, behavior-preserving structural tidies in separate commits.

3|1|Updated Feb 3, 2012
One-click install
npx skills add https://github.com/shishi/dotfiles --skill tidying
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidying
Source: https://github.com/shishi/dotfiles/tree/main/claude/skills/tidying
Command: npx skills add https://github.com/shishi/dotfiles --skill tidying

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers apply Kent Beck's Tidy First philosophy to make small, safe structural changes that improve code without changing behavior. Tidying is a separate activity from feature work and is often performed before or after implementing features or during code reviews to keep code clean.

Core Features & Use Cases

  • Safe, incremental refactoring that preserves existing behavior
  • Clear guidelines for when to tidy (tidy first, tidy after, tidy later)
  • Applicable across Frontend, Backend, CLI, and Library contexts to reduce technical debt

Quick Start

Identify a small, non-behavior-changing tidying opportunity in the target module. Perform the tidy as a separate commit labeled tidy:first before any behavioral changes. If the change reveals a better structure, continue with subsequent tidies following the same discipline.

Frequently Asked Questions about tidying

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

FAQPage Schema
What is behavior-preserving code refactoring and how does it work?

Behavior-preserving refactoring applies tiny structural code changes that improve readability without altering functionality. It works by isolating each structural tidy into a separate commit, ensuring the software's existing behavior remains completely unchanged throughout the process.

How do I clean up messy code safely during a code review?

To clean up messy code safely during a review, identify small structural issues and perform tiny tidies as separate commits. Follow a tidy-first or tidy-after workflow, keeping each change under fifteen minutes to guarantee no behavioral shifts occur.

Can I apply the tidy-first workflow to both frontend and backend code?

Yes, the tidy-first workflow applies across frontend, backend, CLI, and library contexts. It is designed to reduce technical debt in any codebase by guiding developers to make small, safe structural improvements without changing behavior.

What is the best way to structure commits when tidying code?

The best way to structure commits when tidying code is to isolate every small structural change into its own commit, labeled tidy:first. This separates structural cleanup from feature work, keeping changes reviewable and guaranteeing behavior remains unchanged.

How long should a code tidy take when reducing technical debt?

A code tidy should take less than fifteen minutes. Keeping structural changes small ensures they remain safe and behavior-preserving, allowing developers to incrementally reduce technical debt without risking large functional regressions.