AgentSkillsCN

unslopify

战术代码清理,聚焦类型严格性、单一职责、快速失败模式与DRY。检测粗心代码、规避措施、无声失败、上帝类与重复。在提交前或代码评审期间进行快速代码质量检查时使用。

SKILL.md
--- frontmatter
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

code
/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

AnalyzerQuestion
type-strictness-analyzerAre types as strong as possible?
srp-analyzerDoes each unit have one job?
fail-fast-analyzerDo errors surface immediately?
dry-analyzerIs there duplicated code?

What's "Sloppy"?

SloppyClean
any, interface{}, unwrap()Strong domain types
God classes, 500-line functionsFocused, single-purpose
catch (e) { } swallowedExplicit error handling
// HACK: commentsFix the root cause
Silent fallbacksFail fast, fail loud
Copy-pasted code blocksExtracted helpers/utilities

When to Use

  • Quick code review
  • Before committing
  • Cleaning up tech debt
  • Checking for obvious issues

Supported Languages

  • TypeScript / JavaScript
  • Go
  • Rust

Reference Documentation