.claude/skills/de-sloppify/SKILL.md
Two-agent cleanup pattern. Implementer works freely, then a dedicated cleanup agent removes unused imports, console.logs, commented-out code, dead code, and formatting issues. Produces a diff of what was cleaned.
npx skillsauth add oimiragieo/agent-studio de-sloppifyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
De-Sloppify implements a two-agent pattern for code cleanup:
This separation prevents "cleanup anxiety" from slowing down implementation while still producing clean final code.
Skill({ skill: 'de-sloppify' });
Invoke when:
CLEANUP AGENT MUST NOT CHANGE BEHAVIOR.
Every removal must be verifiable as dead code, unused import,
or formatting-only. If there is any doubt — LEAVE IT.
| Category | Examples | Safe to Remove |
| ------------------------ | -------------------------------------------- | -------------- |
| Unused imports | import foo from 'foo' — never referenced | YES |
| console.log / debug | console.log('debug here'), console.error | YES |
| Commented-out code | // const old = foo() (code, not docs) | YES |
| Dead code | Unreachable branches, unused variables | YES |
| Trailing whitespace | Spaces at end of lines | YES |
| Extra blank lines | 3+ consecutive blank lines | YES |
| TODO with no context | // TODO (no ticket, no description) | On flag only |
| Category | Why |
| ------------------------ | --------------------------------------------- |
| Commented doc blocks | /** ... */ JSDoc, /* ... */ section notes |
| console.error in catch | May be intentional error logging |
| Disabled test blocks | // it.skip(...) — intentional |
| Feature-flag dead code | May be awaiting activation |
| Complex logic | Even if it looks unused — leave it |
The implementer completes the feature without cleanup overhead. This is normal development.
After implementation, invoke de-sloppify. The cleanup agent runs these checks in order:
Command:
git diff HEAD -- {{target_files}} > C:/dev/projects/agent-studio/.claude/context/tmp/pre-cleanup-snapshot.diff
Expected output: A diff file capturing current state.
Verify: File exists at .claude/context/tmp/pre-cleanup-snapshot.diff.
Command (JavaScript/TypeScript):
node C:/dev/projects/agent-studio/.claude/skills/de-sloppify/scripts/main.cjs \
--action find-unused-imports \
--files "{{comma_separated_file_paths}}"
Expected output: JSON array of { file, line, import } objects for unused imports.
Verify: Exit code 0 and valid JSON array.
Command:
node C:/dev/projects/agent-studio/.claude/skills/de-sloppify/scripts/main.cjs \
--action find-console-logs \
--files "{{comma_separated_file_paths}}"
Expected output: JSON array of { file, line, statement } objects.
Verify: Exit code 0 and valid JSON array.
Command:
node C:/dev/projects/agent-studio/.claude/skills/de-sloppify/scripts/main.cjs \
--action find-commented-code \
--files "{{comma_separated_file_paths}}"
Expected output: JSON array of candidate commented-out code blocks.
Verify: Exit code 0 and valid JSON array.
For each finding that is safe to remove, use Edit to remove the line(s). Apply changes conservatively — when in doubt, leave it.
Command:
cd C:/dev/projects/agent-studio && pnpm lint:fix && pnpm format
Expected output: 0 errors, 0 warnings from lint; no changes from format.
Verify: Both commands exit 0 with no output indicating issues.
Command:
git diff -- {{target_files}}
Expected output: A diff showing only removals (lines starting with -). No additions should appear unless they are indentation fixes.
Verify: Review the diff — confirm every removed line was dead code or formatting. If any functional line was removed, revert with git checkout -- <file>.
Produce a cleanup summary:
De-Sloppify Report
==================
Files processed: N
Unused imports removed: N
Console.logs removed: N
Commented-out code blocks removed: N
Dead code blocks removed: N
Formatting fixes applied: N
Diff: git diff HEAD -- <files>
console.error inside a catch block without confirming it is debug-onlyInput validated against schemas/input.schema.json before execution.
Output contract defined in schemas/output.schema.json.
Pre-execution hook (hooks/pre-execute.cjs) validates:
action is a known enum valuefiles is a non-empty array of pathsPost-execution hook (hooks/post-execute.cjs) emits observability event to .claude/context/runtime/tool-events.jsonl.
developer — runs cleanup after implementationcode-simplifier — incorporates de-sloppify as a cleanup stepcode-reviewer — recommends de-sloppify when reviewing slop-heavy PRsqa — verifies cleanup did not alter behaviorBefore starting: Read .claude/context/memory/learnings.md for cleanup patterns specific to this codebase.
After completing: Append summary to .claude/context/memory/learnings.md:
**de-sloppify** — [date] Cleaned N files. Removed: M unused imports, K console.logs, J commented blocks.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
code-simplifier — structural refactoring (de-sloppify is style-only)finishing-a-development-branch — includes de-sloppify as a phasecodebase-cleaner — broader cleanup including file-level sloptools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.