Agent skill
repo-cleanup
Use when a repository needs cleanup of dead code, build artifacts, unused dependencies, outdated docs, or stale tests - provides safe cleanup workflows, validation steps, and reporting templates for code, deps, docs, tests, and sprint archives.
Install this agent skill to your Project
npx add-skill https://github.com/NickCrew/Claude-Cortex/tree/main/skills/repo-cleanup
SKILL.md
Repo Cleanup
Overview
Establish a safe, repeatable cleanup workflow for code, dependencies, docs, tests, and sprint artifacts. Minimize risk by validating usage, archiving before deletion, and verifying with tests.
When to Use
- Repository bloat (generated artifacts, caches, unused files)
- Dead code or unused dependencies suspected
- Docs drifted from actual behavior
- Tests are brittle, redundant, or mislocated
- Sprint closure needs structured archiving
Avoid when:
- Active incident response is ongoing
- The target area lacks owners or rollback coverage
Quick Reference
| Task | Load reference |
|---|---|
| Code cleanup | skills/repo-cleanup/references/code-cleanup.md |
| Dependency cleanup | skills/repo-cleanup/references/deps-cleanup.md |
| Docs cleanup | skills/repo-cleanup/references/docs-cleanup.md |
| Test cleanup | skills/repo-cleanup/references/test-cleanup.md |
| Sprint archive | skills/repo-cleanup/references/archive-sprint.md |
Workflow
- Define scope and safety mode (safe vs aggressive).
- Capture baseline state (git status, key tests, backups).
- Load the relevant reference file(s) for the target area.
- Execute cleanup steps with usage checks before removal.
- Validate changes (tests, build, lint, or doc checks).
- Report outcomes (actions taken, risks, follow-ups).
Output
- Summary of actions and files touched
- Validation results and remaining risks
- Follow-up recommendations or backlog items
Common Mistakes
- Deleting without confirming usage or regenerability
- Skipping baseline tests and rollback checkpoints
- Removing dependencies without updating build/test scripts
- Collapsing docs without preserving entry points
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
claude-consult
Consult Claude specialist agents during implementation for codebase understanding, pattern checking, security review, debugging help, and more. Use this skill whenever you're unsure about conventions, stuck on a failure, or need expert input before writing code. Does not replace the formal review gates in agent-loops — this is for mid-implementation consultation.
doc-quality-review
Assess documentation quality across readability, consistency, audience fit, and prose clarity. Produces a scored review with actionable findings. This skill should be used before releases, during doc reviews, or when documentation feels unclear or inconsistent.
event-driven-architecture
Event-driven architecture patterns with event sourcing, CQRS, and message-driven communication. Use when designing distributed systems, microservices communication, or systems requiring eventual consistency and scalability.
prompt-engineering
Optimize prompts for LLMs and AI systems with structured techniques, evaluation patterns, and synthetic test data generation. Use when building AI features, improving agent performance, or crafting system prompts.
compliance-audit
Regulatory compliance auditing across GDPR, HIPAA, PCI DSS, SOC 2, and ISO frameworks with automated evidence collection and gap analysis. Use when conducting compliance assessments, preparing for certifications, or implementing regulatory controls.
react-performance-optimization
React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.
Didn't find tool you were looking for?