Verify debug/dev artifacts are removed before commit. Use at session end to apply 'good boy scout' rule - leave code cleaner than you found it.
This skill verifies that debug and development artifacts are cleaned up before committing code. It embodies the "good boy scout" principle: leave the code cleaner than you found it.
Key Responsibilities:
Use this skill:
Automatic Reminder: Consider adding to your session-end routine.
Manual Triggers:
/session-cleanup// These should be removed before commit:
eprintln!("DEBUG: ..."); // Debug prints
println!("[DEBUG] ..."); // Debug prints
dbg!(variable); // Debug macro
#[allow(dead_code)] // Only if for debug code
// TODO: REMOVE // Temporary markers
// Look for these patterns:
#[test]
fn temp_test() { ... } // Temporary tests
#[ignore] // Tests that should be removed or fixed
fn test_disabled() { ... }
// These are fine (production logging):
tracing::debug!(...); // OK - controlled by log level
tracing::info!(...); // OK - informational
// These may be debug artifacts:
tracing::warn!("DEBUG: ..."); // Suspicious - debug in warn?
When running this skill:
Scan for eprintln!/println! debug
grep -rn "eprintln!" src/ | grep -i debug
grep -rn 'println!.*DEBUG' src/
Scan for dbg! macros
grep -rn 'dbg!' src/
Scan for TODO markers
grep -rn 'TODO.*REMOVE\|TEMPORARY\|DEBUG' src/
Check for test artifacts
grep -rn 'temp_test\|test_debug' src/ tests/
Review git diff for debug additions
git diff --cached | grep -E '^\+.*eprintln|^\+.*dbg!'
[During Debug Session]
- Add eprintln! statements to trace execution
- Add temporary tests to verify fixes
- Use dbg! for quick value inspection
[At Session End]
- Invoke /session-cleanup
- Remove all debug artifacts found
- Verify changes still work
- Commit clean code
This skill pairs well with:
/commit - Run cleanup before committing/validate-constitution - Validate standards after cleanupThis skill ensures debug artifacts from investigation sessions don't pollute the codebase.