unslopify
Tactical code cleanup focusing on type strictness, single responsibility, fail-fast patterns, and DRY. Detects sloppy code, workarounds, silent failures, god classes, and duplication. Use for quick code quality checks before committing or during code review.
When & Why to Use This Skill
Unslopify is a tactical code cleanup tool designed to enhance software quality by identifying and eliminating 'sloppy' coding patterns. It focuses on four critical pillars: type strictness, Single Responsibility Principle (SRP), fail-fast error handling, and DRY (Don't Repeat Yourself) logic. By analyzing TypeScript, Go, and Rust codebases, it helps developers detect god classes, silent failures, and technical debt, ensuring a cleaner and more maintainable production environment.
Use Cases
- Pre-commit Quality Checks: Use the skill to perform a final audit before committing code to catch 'any' types, 'HACK' comments, or swallowed exceptions.
- Automated Code Review: Act as a virtual peer reviewer to identify Single Responsibility Principle (SRP) violations and overly complex functions that need refactoring.
- Technical Debt Cleanup: Systematically identify and extract duplicated code blocks and utilities to improve codebase modularity and maintainability.
- Error Handling Hardening: Detect silent fallbacks and replace them with fail-fast patterns to ensure bugs are caught early in the development lifecycle.
| name | unslopify |
|---|---|
| description | Tactical code cleanup focusing on type strictness, single responsibility, fail-fast patterns, and DRY. Detects sloppy code, workarounds, silent failures, god classes, and duplication. Use for quick code quality checks before committing or during code review. |
Unslopify
Tactical code cleanup focused on immediate quality issues.
Usage
/unslopify # Run all 4 analyzers in parallel
/unslopify --types # Type strictness only
/unslopify --srp # Single responsibility only
/unslopify --fail-fast # Fail-fast only
/unslopify --dry # DRY only
Analyzers
| Analyzer | Question |
|---|---|
| type-strictness-analyzer | Are types as strong as possible? |
| srp-analyzer | Does each unit have one job? |
| fail-fast-analyzer | Do errors surface immediately? |
| dry-analyzer | Is there duplicated code? |
What's "Sloppy"?
| Sloppy | Clean |
|---|---|
any, interface{}, unwrap() |
Strong domain types |
| God classes, 500-line functions | Focused, single-purpose |
catch (e) { } swallowed |
Explicit error handling |
// HACK: comments |
Fix the root cause |
| Silent fallbacks | Fail fast, fail loud |
| Copy-pasted code blocks | Extracted helpers/utilities |
When to Use
- Quick code review
- Before committing
- Cleaning up tech debt
- Checking for obvious issues
Supported Languages
- TypeScript / JavaScript
- Go
- Rust