Files
everything-claude-code/commands/refactor-clean.md
Affaan Mustafa 45959c326e Initial release: Complete Claude Code configuration collection
Battle-tested configs from 10+ months of daily Claude Code usage.
Won Anthropic x Forum Ventures hackathon building zenith.chat.

Includes:
- 9 specialized agents (planner, architect, tdd-guide, code-reviewer, etc.)
- 9 slash commands (tdd, plan, e2e, code-review, etc.)
- 8 rule files (security, coding-style, testing, git-workflow, etc.)
- 7 skills (coding-standards, backend-patterns, frontend-patterns, etc.)
- Hooks configuration (PreToolUse, PostToolUse, Stop)
- MCP server configurations (15 servers)
- Plugin/marketplace documentation
- Example configs (project CLAUDE.md, user CLAUDE.md, statusline)

Read the full guide: https://x.com/affaanmustafa/status/2012378465664745795
2026-01-17 17:49:33 -08:00

719 B

Refactor Clean

Safely identify and remove dead code with test verification:

  1. Run dead code analysis tools:

    • knip: Find unused exports and files
    • depcheck: Find unused dependencies
    • ts-prune: Find unused TypeScript exports
  2. Generate comprehensive report in .reports/dead-code-analysis.md

  3. Categorize findings by severity:

    • SAFE: Test files, unused utilities
    • CAUTION: API routes, components
    • DANGER: Config files, main entry points
  4. Propose safe deletions only

  5. Before each deletion:

    • Run full test suite
    • Verify tests pass
    • Apply change
    • Re-run tests
    • Rollback if tests fail
  6. Show summary of cleaned items

Never delete code without running tests first!