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.