Use when improving codebase quality systematically across dead code, duplication, complexity, naming, and architecture issues. Runs the desloppify scoring flow and favors real maintainability gains over cosmetic score-chasing. Triggers on literal `/flux:desloppify`.
From fluxnpx claudepluginhub nairon-ai/flux --plugin fluxThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Codebase quality scanner and fix orchestrator powered by desloppify.
Role: quality assessor, iterative fixer Goal: raise strict score to target (default 95) through systematic improvements
On entry, set the session phase:
PLUGIN_ROOT="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}}"
[ ! -d "$PLUGIN_ROOT/scripts" ] && PLUGIN_ROOT=$(ls -td ~/.claude/plugins/cache/nairon-flux/flux/*/ 2>/dev/null | head -1)
FLUXCTL="${PLUGIN_ROOT}/scripts/fluxctl"
$FLUXCTL session-phase set desloppify
On completion, reset:
$FLUXCTL session-phase set idle
Combines mechanical detection (dead code, duplication, complexity) with subjective LLM review (naming, abstractions, module boundaries). Works through prioritized fix loop until target score reached.
| Tier | Fix Type | Examples |
|---|---|---|
| T1 | Auto-fixable | Unused imports, debug logs |
| T2 | Quick manual | Unused vars, dead exports |
| T3 | Needs judgment | Near-dupes, single_use abstractions |
| T4 | Major refactor | God components, mixed concerns |
Score is weighted (T4 = 4× T1). Strict score penalizes both open and wontfix.
Full request: $ARGUMENTS
Accepts:
scan → scan only, show scorestatus → current score and progressnext → next priority fixplan → prioritized markdown plan--path <dir> → scan specific directory (default: .)--target <N> → target strict score (default: 95)Examples:
/flux:desloppify — full improvement workflow/flux:desloppify scan --path src/ — scan src only/flux:desloppify status — check current score/flux:desloppify next --tier 2 — next T2 fixCheck if desloppify is installed:
which desloppify || pip install --upgrade "desloppify[full]"
Install the Claude skill (provides workflow guidance):
desloppify update-skill claude
Run full scan on target path:
desloppify scan --path .
Parse output for:
Repeat until target score reached or no more fixable issues:
Get next issue:
desloppify next
Understand the issue: Read the file, understand context
Fix it properly: Make the code genuinely better
Resolve:
desloppify resolve fixed <pattern>
Re-scan periodically to refresh findings:
desloppify scan --path .
When target reached or session ending:
| Command | Description |
|---|---|
scan [--path <dir>] | Run all detectors, update state |
status | Score + per-tier progress |
next [--tier N] | Highest-priority open finding |
resolve <status> <pattern> | Mark: fixed, wontfix, false_positive |
fix <fixer> [--dry-run] | Auto-fix mechanical issues |
plan | Prioritized markdown plan |
tree | Annotated codebase tree |
show <pattern> | Findings by file/detector/ID |
| Score | Quality Level |
|---|---|
| <70 | Needs significant work |
| 70-84 | Functional but rough |
| 85-94 | Good, minor issues |
| 95-97 | Clean, well-maintained |
| 98+ | Beautiful, engineer-approved |
Default target: 95 — achievable for most codebases with focused effort.
Desloppify maintains state in .desloppify/:
state.json — findings, resolutions, scoresconfig.json — project settingsscorecard.png — badge for READMEState persists across sessions, so improvements accumulate.
ALWAYS run at the very end of command execution:
PLUGIN_ROOT="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}}"
[ -z "$PLUGIN_ROOT" ] && PLUGIN_ROOT=$(ls -td ~/.claude/plugins/cache/nairon-flux/flux/*/ 2>/dev/null | head -1)
UPDATE_JSON=$("$PLUGIN_ROOT/scripts/version-check.sh" 2>/dev/null || echo '{"update_available":false}')
UPDATE_AVAILABLE=$(echo "$UPDATE_JSON" | jq -r '.update_available')
LOCAL_VER=$(echo "$UPDATE_JSON" | jq -r '.local_version')
REMOTE_VER=$(echo "$UPDATE_JSON" | jq -r '.remote_version')
If update available, append to output:
---
Flux update available: v${LOCAL_VER} → v${REMOTE_VER}
Update Flux from the same source you installed it from, then restart your agent session.
---