Skip to content

Conversation

@p19dixon
Copy link

Summary

Comprehensive codebase cleanup and documentation audit skill for identifying orphaned code, unused files, documentation gaps, and infrastructure bloat.

This skill provides a systematic 10-step workflow that produces a detailed CODEBASE-STATUS.md document as a single source of truth for what's actually implemented in a codebase.

Key Features

  • 10-step systematic audit workflow: Routes analysis, data models audit, lib/components scanning, documentation gap analysis, infrastructure status, and prioritized removal candidates
  • Automated detection scripts: Python scripts for finding orphaned Prisma models and unused imports
  • Parallel execution pattern: Uses multiple Explore agents concurrently for fast audits
  • Comprehensive template: CODEBASE-STATUS.md template with categorized inventories and emoji status indicators
  • Framework agnostic: Works with Next.js, React, Vue, Express, FastAPI, and other stacks

What's Included

codebase-inventory-audit/
├── SKILL.md                      # 10-step audit workflow (209 lines)
├── README.md                     # Complete documentation for users
├── scripts/
│   ├── find_orphaned_models.py   # Automated Prisma model orphan detection
│   └── find_unused_imports.py    # Automated unused file detection
└── references/
    └── audit-template.md         # CODEBASE-STATUS.md template

Testing

Successfully tested on production Next.js/Prisma codebase:

  • Analyzed: 94 routes, 94 Prisma models, 300+ components, 169 lib files
  • Identified: 2 orphaned models, 24+ unused components, 5 documentation gaps, 60+ docs to archive
  • Generated: Comprehensive 387-line CODEBASE-STATUS.md with executive summary, feature status matrix, removal candidates inventory, and prioritized action items
  • Execution: Used 5 parallel Explore agents for efficient analysis

Use Cases

  • Spring cleaning before major releases
  • Auditing inherited codebases
  • Creating accurate inventory documentation
  • Identifying and removing code bloat
  • Finding test coverage gaps

Why This Skill is Needed

As codebases grow, it becomes difficult to track what's actually implemented vs. what's planned, what code is still in use vs. orphaned, and whether documentation reflects reality. This skill provides a repeatable, comprehensive audit process that can be run periodically to maintain codebase health.

The automation scripts save significant time by handling the tedious detection work, while the parallel execution pattern ensures audits complete quickly even on large codebases.

🤖 Generated with Claude Code

Comprehensive codebase cleanup and documentation audit skill that identifies orphaned code, unused files, documentation gaps, and infrastructure bloat.

Key features:
- 10-step systematic audit workflow
- Automated orphan detection (Prisma models, unused imports)
- Parallel Explore agent execution pattern
- CODEBASE-STATUS.md template with categorized inventories
- Python scripts for model and import analysis

Tested with: Successfully audited Next.js/Prisma production codebase with 94+ models, 300+ components, 169 lib files. Generated comprehensive status document identifying 2 orphaned models and 24+ unused components.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@zzshiro
Copy link

zzshiro commented Dec 16, 2025

Nice work.

@p19dixon
Copy link
Author

p19dixon commented Dec 16, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants