session-cleanup
БесплатноБез исполняемых скриптовНе проверен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.
Об этом скилле
Session Cleanup Skill
What This Skill Does
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:
- Find debug print statements (eprintln!, dbg!, println! for debug)
- Find commented-out debug code
- Find leftover test files or temporary code
- Report any cleanup needed before commit
When to Use This Skill
Use this skill:
- At the end of a debug/investigation session
- Before creating a commit
- After fixing a bug to ensure debug code is removed
- When you've been adding/removing diagnostic code
Automatic Reminder: Consider adding to your session-end routine.
Manual Triggers:
/session-cleanup- "Check for debug artifacts"
- "Clean up session"
Artifacts to Find
Rust Debug Artifacts
// 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
Temporary Test Code
// Look for these patterns:
#[test]
fn temp_test() { ... } // Temporary tests
#[ignore] // Tests that should be removed or fixed
fn test_disabled() { ... }
Debug Logging Levels
// 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?
Cleanup Checklist
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!'
Example Session Flow
[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
Integration
This skill pairs well with:
/commit- Run cleanup before committing/validate-constitution- Validate standards after cleanup- Git pre-commit hooks - Automatic detection
Remember
- Debug code is useful during development
- Debug code should NOT be committed
- The "good boy scout" rule: leave code cleaner than you found it
- A few minutes of cleanup saves reviewers time
This skill ensures debug artifacts from investigation sessions don't pollute the codebase.
Установить session-cleanup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadGrepGlobFAQ
Что делает скилл session-cleanup?
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.
Как установить скилл session-cleanup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-cleanup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic