tidy

Archive stale artifacts, correct documentation, and remove dead code in repositories.

Updated May 14, 2026
One-click install
npx skills add https://github.com/bonjohen/claude-local --skill tidy-bonjohen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy
Source: https://github.com/bonjohen/claude-local/tree/main/bundle/skills/tidy
Command: npx skills add https://github.com/bonjohen/claude-local --skill tidy-bonjohen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves messy, stale repositories by archiving obsolete artifacts, correcting inaccurate documentation, and removing dead code while keeping the project’s behavior unchanged.

Core Features & Use Cases

  • Archive stale files safely: Moves one-time scripts, superseded drafts, and temporary scratch files into an archive only after confirming they are not referenced by active code.
  • Update documentation with factual accuracy: Fixes stale counts, file references, module maps, and outdated status sections without rewriting documentation style or adding new sections.
  • Tidy codebase hygiene: Detects unused imports, unreferenced modules, orphaned fixtures, and large non-TODO commented-out blocks, while avoiding dynamic/plugin entrypoints and runtime registrations.

Quick Start

Run the tidy skill with an optional scope like: "Execute tidy for docs-only changes to refresh README and documentation counts and references."

Frequently Asked Questions about tidy

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

FAQPage Schema
How do I clean up dead code and stale files in a repository without changing runtime behavior?

To clean up dead code and stale files without behavior changes, use a repository housekeeping approach that archives obsolete artifacts, corrects inaccurate documentation, and removes verified dead code while preserving authoritative build and runtime assets.

Does repository housekeeping verify that removed code is truly unreferenced before deletion?

Repository housekeeping verifies unreferenced code before deletion by using grep-based reference checks to ensure files are not actively used, while deliberately avoiding dynamic plugin entrypoints and runtime registrations to prevent accidental removal.

Can I run documentation updates and dead code cleanup scoped to a specific directory like docs?

Documentation updates and dead code cleanup can be scoped to specific directories such as docs, scripts, or code paths, allowing targeted housekeeping that refreshes file references and module maps without affecting the entire project.

What is the best way to ensure repository cleanup does not break existing tests?

The best way to ensure repository cleanup does not break tests is to run consistency checks using pytest and ruff after archiving files and removing dead code, verifying that project behavior remains completely unchanged.

How does git archiving work for one-time scripts and superseded drafts during codebase tidying?

Git archiving during codebase tidying works by moving one-time scripts, superseded drafts, and temporary scratch files into an archive directory only after confirming they are not referenced by active code, bundling all changes into a single non-pushed commit.

What limitations exist when tidying a codebase with dynamic plugin entrypoints and runtime registrations?

When tidying a codebase, a key limitation is that unused imports and unreferenced modules are removed while dynamic plugin entrypoints and runtime registrations are deliberately avoided, meaning dynamically loaded code is preserved even if it appears statically unreferenced.