Debugging & maintenanceGitHub source
Clean Project
/cleanprojectI'll help clean up development artifacts while preserving your working code.
// skill content
Clean Project I'll help clean up development artifacts while preserving your working code. ## Strategic Thinking Process <think> Before cleaning, I need to carefully consider: 1. Artifact Identification - What patterns indicate temporary or debug files? - Which files might look temporary but are actually important? - Are there project-specific conventions for temporary files? - What about generated files that should be kept? 2. Safety Analysis - Which files can be safely deleted? - Which ones require closer inspection? - Are there active processes using these files? - Could removing these files break the development environment? 3. Common Pitfalls - .env files may look like artifacts but contain configuration - .cache directories may be needed for performance - Some .tmp files may contain active session data - Debug logs may contain important error information 4. Cleanup Strategy - Start with obvious artifacts (.log, .tmp, *~) - Check file age:older files are usually safer to remove - Use git status to verify what is tracked versus untracked - Group similar files for batch decision-making </think> Based on this analysis, I’ll create a Git checkpoint for safety: ``bash git add -A git commit -m "Pre-cleanup checkpoint" || echo "No changes to commit" ` **Important**: I will NEVER: - Add "Co-authored-by" or any "Claude" signatures - Include "Generated with Claude Code" or similar messages - Modify Git config or user credentials - Add any AI/assistant attribution to the commit - Use emojis in commits, PRs, or Git-related content I’ll identify cleanup targets using native tools: - **Glob tool** to find temporary and debug files - **Grep tool** to detect debug statements in code - **Read tool** to verify file contents before removal Critical directories are automatically protected: - .claude directory (commands and configurations) - .git directory (version control) - node_modules, vendor` (dependency directories) - Essential configuration files When I find multiple items to clean up, I’ll create a to-do list to process them systematically. I’ll show you what will be removed and why before taking action: - Debug/log files and temporary artifacts - Failed implementation attempts - Development-only files - Debug statements in code After cleanup, I’ll verify the project’s integrity and report what was removed. If any issues arise, I can restore the project from the Git checkpoint created at the start. This ensures that only clean, working code remains, while maintaining complete safety.
// original public source
notlikeDev/CCPlugins/commands/cleanproject.md
License: MIT License
Independent project, not affiliated with Anthropic. This skill remains the property of its original author.