tidy

Refactors the dirty git change set for readability without changing behavior before commit.

9|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/eventbalancer/agent-quorum --skill tidy-eventbalancer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy
Source: https://github.com/eventbalancer/agent-quorum/tree/main/.agents/skills/tidy
Command: npx skills add https://github.com/eventbalancer/agent-quorum --skill tidy-eventbalancer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After implementing a feature or fix, the modified and untracked files in a working tree often contain readability issues, dead code, and inconsistent style. This Skill performs a disciplined pre-commit cleanup of exactly that dirty change set, improving structure without altering behavior or touching unrelated files. ## Core Features & Use Cases - Scoped refactoring: Operates only on dirty tracked and untracked files (or explicitly listed paths), rejecting clean files, lockfiles, and generated artifacts. - Quality criteria enforcement: Applies TypeScript readability, typing, and architecture rules such as guard clauses, named constants, exhaustive union handling, and layer-direction constraints. - Documentation reconciliation gate: Searches the repository for every changed symbol, path, flag, or behavior and updates or triages all affected docs before reporting success. - Mirror synchronization: Keeps .agents/skills/<name>/SKILL.md and .claude/commands/<name>.md counterparts byte-identical, verified with cmp -s. - Use Case: After finishing a feature branch change, run the tidy workflow to clean up the modified files, reconcile docs, and verify with pnpm run check before committing. ## Quick Start Ask the agent to tidy the current dirty change set, optionally naming specific paths or a target worktree, and it will refactor, reconcile docs, and report verification results.

Frequently Asked Questions about tidy

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

FAQPage Schema
How do I clean up modified files before committing in git?

Run the tidy workflow on the dirty change set: it identifies modified and untracked files via git status, refactors them for readability without changing behavior, reconciles related documentation, and verifies with pnpm run check before you commit.

How to refactor TypeScript code without changing behavior?

Apply the smallest local refactors that improve readability, such as guard clauses, named constants, extracted helpers, and explicit return statements. Then run type checks, lint, and the full test suite to confirm behavior is unchanged.

Can I tidy only specific files instead of the whole change set?

Yes. Pass one or more paths as scope, and each path is verified as dirty with git status before editing. Clean files, files outside the checkout, lockfiles, and generated artifacts are rejected.

What are the limitations of a dirty-change-set-only refactor?

It cannot edit files outside the dirty set except extracted helpers, documented mirror counterparts, or docs required by the reconciliation gate. Refactors needing new dependencies, public API changes, or design decisions are surfaced as separate work instead.

Why does the tidy workflow require documentation reconciliation?

When names, paths, flags, config keys, or observable behavior change, existing docs can become stale. The gate searches the repository for every changed term and updates or triages each hit, so success is only reported once documentation is accurate.