agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Comprehensive technical debt cleanup orchestrator with parallel analysis and safe automation
How it fires
How this command gets triggered: by you, by Claude, or both.
/cleanContext preview
What this command does when you run it.
Comprehensive technical debt cleanup orchestrator with parallel analysis and safe automation
allowed-tools: Task, Read, Write, Edit, MultiEdit, Bash(rg:*), Bash(fd:*), Bash(bat:*), Bash(jq:*), Bash(gdate:*), Bash(git:*), Bash(eza:*), Bash(wc:*), Bash(head:*), Bash(deno:*), Bash(npm:*), Bash(cargo:*), Bash(go:*) name: "Clean" description: "Comprehensive technical debt cleanup orchestrator with parallel analysis and safe automation" author: "wcygan" tags: ["workflow","manage"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize technical debt cleanup session and project analysis
# Initialize cleanup session state
echo '{
"sessionId": "'$SESSION_ID'",
"targetProject": "'$ARGUMENTS'",
"detectedLanguages": [],
"cleanupStrategy": "auto-detect",
"safetyLevel": "production",
"itemsProcessed": 0,
"linesRemoved": 0
}' > /tmp/cleanup-session-$SESSION_ID.jsonSTEP 2: Comprehensive technical debt analysis with parallel sub-agent coordination
TRY:
IF codebase_size > 500 files OR project_type == "enterprise":
LAUNCH parallel sub-agents for comprehensive technical debt discovery:
ELSE:
EXECUTE streamlined cleanup analysis for smaller codebases:
# Streamlined analysis for smaller projects echo "🔍 Analyzing technical debt in smaller codebase..."
STEP 3: Systematic cleanup execution with safety checkpoints
**Phase 1: Low-Risk Quality Improvements**
FOR EACH low_risk_improvement:
# Create safety checkpoint echo "📝 Creating safety checkpoint before cleanup phase" git add -A git commit -m "checkpoint: before $(date -Iseconds) cleanup session $SESSION_ID" || echo "No changes to commit" # Apply formatting and linting fixes echo "🔧 Applying automated code quality improvements..."
**Language-Specific Cleanup Patterns:**
**JavaScript/TypeScript Projects:**
# Remove console.log statements (excluding intentional logging) rg "console\.(log|debug|warn)" --type typescript -l | while read file; do echo "Cleaning debug statements in: $file" # Interactive review of each console statement done # Convert var to let/const rg "\bvar\s+" --type typescript -l | while read file; do echo "Modernizing variable declarations in: $file" # Apply var → let/const transformations with validation done # Clean up unused imports if command -v deno >/dev/null; then echo "🦕 Running Deno linting and formatting" deno fmt $ARGUMENTS deno lint $ARGUMENTS fi
**Rust Projects:**
# Remove unused imports and dead code warnings if fd "Cargo.toml" . >/dev/null; then echo "🦀 Cleaning Rust project with cargo tools" cargo fmt --all cargo clippy --all-targets --all-features -- -D warnings cargo check --all fi # Clean up TODO/FIXME comments with context rg "(TODO|FIXME|XXX|HACK)" --type rust --context 2
**Go Projects:**
# Apply Go formatting and cleaning if fd "go.mod" . >/dev/null; then echo "🐹 Cleaning Go project with standard tools" go fmt ./... go vet ./... go mod tidy fi # Remove unused variables and imports go run golang.org/x/tools/cmd/goimports -w ./... 2>/dev/null || echo "goimports not avail
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies