tidy-codebase

Identify and remove stale files, outdated documentation, and cruft from a codebase.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/smallorbit/smallorbit-plugins --skill tidy-codebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy-codebase
Source: https://github.com/smallorbit/smallorbit-plugins/tree/main/plugins/polishkit/skills/tidy-codebase
Command: npx skills add https://github.com/smallorbit/smallorbit-plugins --skill tidy-codebase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codebase hygiene sweep: find and clean up stale files, outdated documentation, build artifacts, and accumulated cruft across large repos to reduce maintenance overhead and confusion.

Core Features & Use Cases

  • Stale documentation cleanup: identify WIP or outdated docs and align with current features.
  • Artifact and directory cleanup: detect empty dirs and stray build outputs not ignored by VCS.
  • Documentation gaps & hygiene: flag missing or outdated docs, and suggest updates.
  • Git hygiene & ready-state: surface branches, orphaned or merged worktrees, and drift between local and remote.
  • Use Case: When a project lingers with old docs and generated artifacts, run this skill to restore clarity and reduce noise.

Quick Start

Run tidy-codebase to scan the repository and produce a prioritized cleanup plan for removal and updates.

Frequently Asked Questions about tidy-codebase

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

FAQPage Schema
How do I remove stale files and outdated documentation from my codebase?

Codebase cruft removal targets stale files, outdated documentation, and stray build artifacts by scanning for documentation drift and empty directories, delivering a prioritized plan for safe removal and updates across diverse repositories.

What is the best way to identify and clean up stray build artifacts in a git repository?

The best way to clean up stray build artifacts is to detect outputs not ignored by VCS and surface git hygiene issues like orphaned branches, generating a clear removal plan that restores repository clarity and reduces maintenance noise.

How do I fix documentation drift and find missing docs in large repositories?

Fixing documentation drift in large repositories involves flagging WIP or outdated docs and aligning them with current features, providing a multi-category analysis that highlights missing docs and suggests necessary updates to reduce confusion.

Can I scan for empty directories and orphaned git worktrees across diverse repos?

You can scan for empty directories and orphaned git worktrees across diverse repos by applying multi-category analysis with guardrails, safely surfacing drift between local and remote environments to produce a prioritized cleanup plan.

Does the cleanup process include guardrails to prevent accidental file removal?

Yes, the codebase cleanup process includes guardrails to prevent accidental file removal by generating a clear, prioritized removal and update plan, ensuring safe execution across diverse repositories without deleting necessary files.