Systematic Code Refactoring
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
Codebase health scanner and technical debt tracker. An agent skill from Git-on-my-level/codex-autorunner.
$ npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Git-on-my-level/codex-autorunner desloppify --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Git-on-my-level/codex-autorunner.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/desloppify .claude/skills/desloppify && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "desloppify" agent skill from https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppify into .claude/skills/desloppify/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desloppify", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppifyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Git-on-my-level/codex-autorunner desloppify --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Git-on-my-level/codex-autorunner.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/desloppify .agents/skills/desloppify && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "desloppify" agent skill from https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppify into .agents/skills/desloppify/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desloppify", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Git-on-my-level/codex-autorunner desloppify --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Git-on-my-level/codex-autorunner.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/desloppify .cursor/skills/desloppify && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "desloppify" agent skill from https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppify into .cursor/skills/desloppify/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desloppify", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Git-on-my-level/codex-autorunner.git --path .agents/skills/desloppify--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Git-on-my-level/codex-autorunner desloppify --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Git-on-my-level/codex-autorunner.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/desloppify .gemini/skills/desloppify && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "desloppify" agent skill from https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppify into .gemini/skills/desloppify/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desloppify", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Git-on-my-level/codex-autorunner desloppifyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Git-on-my-level/codex-autorunner.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/desloppify .github/skills/desloppify && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "desloppify" agent skill from https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppify into .github/skills/desloppify/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desloppify", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Git-on-my-level/codex-autorunner desloppify --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Git-on-my-level/codex-autorunner.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/desloppify .opencode/skills/desloppify && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "desloppify" agent skill from https://github.com/Git-on-my-level/codex-autorunner/tree/main/.agents/skills/desloppify into .opencode/skills/desloppify/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desloppify", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
desloppifyCodebase health scanner and technical debt tracker. An agent skill from Git-on-my-level/codex-autorunner.
Desloppify is an agent skill from Git-on-my-level/codex-autorunner. Codebase health scanner and technical debt tracker. Use when the user asks about code quality, technical debt, dead code, large files, god classes, duplicate functions, code smells, naming issues, import cycles, or coupling problems. Also use when asked for a health score, what to fix next, or to create a cleanup plan. Supports 29 languages.
Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Refactoring, Technical debt and Customer success. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6cee7df. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(desloppify *)From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitpythonghFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Desloppify loads about 3.4k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 1,050 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Git-on-my-level/codex-autorunner at commit 6cee7df, republished under its MIT licence (© Git-on-my-level). 1,050 words, ~3,414 tokens.
.claude/skills/desloppify/SKILL.md (or your agent's skills folder).<!-- desloppify-begin -->
<!-- desloppify-skill-version: 5 -->
Maximise the strict score honestly. Your main cycle: scan → plan → execute → rescan. Follow the scan output's INSTRUCTIONS FOR AGENTS — don't substitute your own analysis.
Don't be lazy. Do large refactors and small detailed fixes with equal energy. If it takes touching 20 files, touch 20 files. If it's a one-line change, make it. No task is too big or too small — fix things properly, not minimally.
Three phases, repeated as a cycle.
desloppify scan --path . # analyse the codebase
desloppify status # check scores — are we at target?The scan will tell you if subjective dimensions need review. Follow its instructions. To trigger a review manually:
desloppify review --prepare # then follow your runner's review workflowAfter reviews, triage stages and plan creation appear in the execution queue surfaced by next. Complete them in order — next tells you what each stage expects in the --report:
desloppify next # shows the next execution workflow step
desloppify plan triage --stage observe --report "themes and root causes..."
desloppify plan triage --stage reflect --report "comparison against completed work..."
desloppify plan triage --stage organize --report "summary of priorities..."
desloppify plan triage --complete --strategy "execution plan..."For automated triage: desloppify plan triage --run-stages --runner codex (Codex) or --runner claude (Claude). Options: --only-stages, --dry-run, --stage-timeout-seconds.
Then shape the queue. The plan shapes everything next gives you — next is the execution queue, not the full backlog. Don't skip this step.
desloppify plan # see the living plan details
desloppify plan queue # compact execution queue view
desloppify plan reorder <pat> top # reorder — what unblocks the most?
desloppify plan cluster create <name> # group related issues to batch-fix
desloppify plan focus <cluster> # scope next to one cluster
desloppify plan skip <pat> # defer — hide from nextTrust the plan and execute. Don't rescan mid-queue — finish the queue first.
Branch first. Create a dedicated branch — never commit health work directly to main:
git checkout -b desloppify/code-health # or desloppify/<focus-area>
desloppify config set commit_pr 42 # link a PR for auto-updated descriptionsThe loop:
# 1. Get the next item from the execution queue
desloppify next
# 2. Fix the issue in code
# 3. Resolve it (next shows the exact command including required attestation)
# 4. When you have a logical batch, commit and record
git add <files> && git commit -m "desloppify: fix 3 deferred_import findings"
desloppify plan commit-log record # moves findings uncommitted → committed, updates PR
# 5. Push periodically
git push -u origin desloppify/code-health
# 6. Repeat until the queue is emptyScore may temporarily drop after fixes — cascade effects are normal, keep going.
If next suggests an auto-fixer, run desloppify autofix <fixer> --dry-run to preview, then apply.
When the queue is clear, go back to Phase 1. New issues will surface, cascades will have resolved, priorities will have shifted. This is the cycle.
next. Drill in with next --cluster <name>.zone set.Overall score = 25% mechanical + 75% subjective.
Four paths to get subjective scores:
Local runner (Codex): desloppify review --run-batches --runner codex --parallel --scan-after-import — automated end-to-end.
Local runner (Claude): desloppify review --prepare → launch parallel subagents → desloppify review --import merged.json — see skill doc overlay for details.
Cloud/external: desloppify review --external-start --external-runner claude → follow session template → --external-submit.
Manual path: desloppify review --prepare → review per dimension → desloppify review --import file.json.
Import first, fix after — import creates tracked state entries for correlation.
Target-matching scores trigger auto-reset to prevent gaming. Use the blind-review workflow described in your agent overlay doc (e.g. docs/CLAUDE.md, docs/HERMES.md).
Even moderate scores (60-80) dramatically improve overall health.
Stale dimensions auto-surface in next — just follow the queue.
Integrity rules: Score from evidence only — no prior chat context, score history, or target-threshold anchoring. When evidence is mixed, score lower and explain uncertainty. Assess every requested dimension; never drop one.
Return machine-readable JSON for review imports. For --external-submit, include session from the generated template:
{
"session": {
"id": "<session_id_from_template>",
"token": "<session_token_from_template>"
},
"assessments": {
"<dimension_from_query>": 0
},
"findings": [
{
"dimension": "<dimension_from_query>",
"identifier": "short_id",
"summary": "one-line defect summary",
"related_files": ["relative/path/to/file.py"],
"evidence": ["specific code observation"],
"suggestion": "concrete fix recommendation",
"confidence": "high|medium|low"
}
]
}findings MUST match query.system_prompt exactly (including related_files, evidence, and suggestion). Use "findings": [] when no defects found. Import is fail-closed: invalid findings abort unless --allow-partial is passed. Assessment scores are auto-applied from trusted internal or cloud session imports. Legacy --attested-external remains supported.
desloppify review --external-start --external-runner claude → use generated prompt/template → run printed --external-submit command.desloppify review --import findings.json --attested-external --attest "I validated this review was completed without awareness of overall score and is unbiased."desloppify review --import findings.jsonRunners that support agent definitions (Cursor, Copilot, Gemini) can create a dedicated reviewer agent. Use this system prompt:
You are a code quality reviewer. You will be given a codebase path, a set of
dimensions to score, and what each dimension means. Read the code, score each
dimension 0-100 from evidence only, and return JSON in the required format.
Do not anchor to target thresholds. When evidence is mixed, score lower and
explain uncertainty.See your editor's overlay section below for the agent config format.
desloppify plan reorder <cluster> top # move all cluster members at once
desloppify plan reorder <a> <b> top # mix clusters + findings in one reorder
desloppify plan reorder <pat> before -t X # position relative to another item/cluster
desloppify plan cluster reorder a,b top # reorder multiple clusters as one block
desloppify plan resolve <pat> # mark complete
desloppify plan reopen <pat> # reopen
desloppify backlog # broader non-execution backlogdesloppify plan commit-log # see uncommitted + committed status
desloppify plan commit-log record # record HEAD commit, update PR description
desloppify plan commit-log record --note "why" # with rationale
desloppify plan commit-log record --only "smells::*" # record specific findings only
desloppify plan commit-log history # show commit records
desloppify plan commit-log pr # preview PR body markdown
desloppify config set commit_tracking_enabled false # disable guidanceAfter resolving findings as fixed, the tool shows uncommitted work, committed history, and a suggested commit message. After committing externally, run record to move findings from uncommitted to committed and auto-update the linked PR description.
desloppify next --count 5 # top 5 execution items
desloppify next --cluster <name> # drill into a cluster
desloppify backlog --count 5 # top 5 backlog items outside execution
desloppify show <pattern> # filter by file/detector/ID
desloppify show --status open # all open findings
desloppify plan skip --permanent "<id>" --note "reason" --attest "..." # accept debt
desloppify exclude <path> # exclude a directory from scanning
desloppify config show # show all config including excludes
desloppify scan --path . --reset-subjective # reset subjective baseline to 0When desloppify itself appears wrong or inconsistent — a bug, a bad detection, a crash, confusing output — fix it and open a PR. If you can't confidently fix it, file an issue instead.
Clone the tool repo to a temp directory, make the fix there, and verify it works against the project you're scanning before pushing.
git clone https://github.com/peteromallet/desloppify.git /tmp/desloppify-fix
cd /tmp/desloppify-fix
git checkout -b fix/<short-description>Make your changes, then run the test suite and verify the fix against the original project:
python -m pytest desloppify/tests/ -q
python -m desloppify scan --path <project-root> # the project you were scanningOnce it looks good, push and open a PR:
git add <files> && git commit -m "fix: <what and why>"
git push -u origin fix/<short-description>
gh pr create --title "fix: <short description>" --body "$(cat <<'EOF'
## Problem
<what went wrong — include the command and output>
## Fix
<what you changed and why>
EOF
)"Clean up after: rm -rf /tmp/desloppify-fix
If the fix is unclear or the change needs discussion, open an issue at https://github.com/peteromallet/desloppify/issues with a minimal repro: command, path, expected output, actual output.
command -v desloppify >/dev/null 2>&1 && echo "desloppify: installed" || echo "NOT INSTALLED — run: pip install --upgrade git+https://github.com/peteromallet/desloppify.git"
<!-- desloppify-end -->
This is the canonical Codex overlay used by the README install command.
desloppify review --run-batches --runner codex --parallel --scan-after-import..desloppify/review_packets/holistic_packet_*.json; use those for reproducible retries.desloppify review --run-batches --packet <packet.json> --only-batches <idxs>.--allow-partial, and provisional manual scores expire on the next scan unless replaced by trusted internal or attested-external imports.Prefer automated triage: desloppify plan triage --run-stages --runner codex
Options: --only-stages observe,reflect (subset), --dry-run (prompts only), --stage-timeout-seconds N (per-stage).
Run artifacts go to .desloppify/triage_runs/<timestamp>/ — each run gets its own directory with run.log (live timestamped events), run_summary.json, per-stage prompts/, output/, and logs/. Check run.log to diagnose stalls or failures. Re-running resumes from the last confirmed stage.
If automated triage stalls, check run.log for the last event, then use desloppify plan triage --stage-prompt <stage> to get the full prompt with gate rules.
<!-- desloppify-overlay: codex -->
<!-- desloppify-end -->
© Git-on-my-level, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/desloppify of Git-on-my-level/codex-autorunner.
Open the folder on GitHubat commit 6cee7df
Desloppify next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Desloppify this skillGit-on-my-level/codex-autorunner | 875 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Tech Debt Analyzerailabs-393/ai-labs-claude-skills | 454 | 2 repos | ~3.9k | Automated safety check: Pass | MIT | |
| FIXME Resolvertailcallhq/forgecode | 7.6k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Code Quality Gatefengshao1227/ccg-workflow | 5.9k | — | ~593 | Automated safety check: Notes | MIT |
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
ailabs-393/ai-labs-claude-skills
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability.
tailcallhq/forgecode
Finds every FIXME comment in a codebase, groups related ones across files into one task, implements the work they describe and removes the comments once it is done.
fengshao1227/ccg-workflow
Scans code for complexity, long functions, duplicated blocks, naming problems and code smells with a Node script, then reports and suggests refactors.
Zhen-Bo/smell-check
Runs a smell-first audit on a user-chosen path set: measures structure metrics, applies a named size profile, and reports code smells and test smells with evidence strength.
Categories
Codebase health scanner and technical debt tracker. An agent skill from Git-on-my-level/codex-autorunner. Desloppify is an agent skill from Git-on-my-level/codex-autorunner. Codebase health scanner and technical debt tracker.
Desloppify fits situations like: the user asks about code quality; duplicate functions; coupling problems; asked for a health score.
Run `npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a claude-code`. Or copy the skill folder (.agents/skills/desloppify in Git-on-my-level/codex-autorunner) into .claude/skills/desloppify in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a codex`. Or copy the skill folder (.agents/skills/desloppify in Git-on-my-level/codex-autorunner) into .agents/skills/desloppify in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Git-on-my-level/codex-autorunner --skill desloppify -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/desloppify, .gemini/skills/desloppify, .github/skills/desloppify and .opencode/skills/desloppify in your project.
Going by SKILL.md and its folder, Desloppify needs the command-line tools its instructions call (git, python and gh). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash(desloppify *).
SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Desloppify is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Desloppify: Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Code Refactoring Workflow (luongnv89/claude-howto, 42k stars), Tech Debt Analyzer (ailabs-393/ai-labs-claude-skills, 454 stars) and FIXME Resolver (tailcallhq/forgecode, 7.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Git-on-my-level (a GitHub user) maintains it in Git-on-my-level/codex-autorunner, which has 875 GitHub stars. The repository was last updated on October 1, 2026.
Source: Git-on-my-level/codex-autorunner on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.