refactor SKILL.md skillB

refactor from oprogramadorreal/optimus-claude is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add oprogramadorreal/optimus-claude/refactor@git:20260924.2e3842c

Pins git:20260924.2e3842c in mdr.lock. Pin the fingerprint instead.

Audit grade
B, 16 of 17 checks passed
Kind
SKILL.md skill
Repository
oprogramadorreal/optimus-claude
Path
skills/refactor/SKILL.md
Versions recorded
12
Latest version
git:20260924.2e3842c, committed Sep 24, 2026
First version recorded
Jul 27, 2026
Size
10,963 bytes
Repository stars
75
License
MIT

Refactors code toward project-guideline compliance and testability (so /optimus:unit-test can safely increase coverage) across four analysis lenses, fanned out to parallel agents when the scope warrants it. Supports "testability" or "guidelines" focus plus flexible scoping. Read-only until the user approves the plan; applied changes stay local. Use after /optimus:init, before /optimus:unit-test; for an iterative loop, use /optimus:deep refactor.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Project-Wide Code Refactoring

Analyze existing source code against the project's own guidelines across four lenses — inline for a small scope, fanned out to parallel agents otherwise — present a prioritized refactoring plan, then apply only user-approved changes with test verification. Two goals:

1. **Guideline compliance** — align code with coding-guidelines.md, architecture.md, styling.md, and testing.md
2. **Testability** — restructure code so `/optimus:unit-test` can safely increase coverage without risky refactoring

## Step 1: Prerequisites and scope

If `git rev-parse --is-inside-work-tree` does not return `true`, read `$CLAUDE_PLUGIN_ROOT/skills/init/references/multi-repo-detection.md` and apply it. When it returns `true`, resolve the repository root with `git rev-parse --show-toplevel`, including in a linked worktree or subdirectory. In a multi-repo workspace, load each targeted repo's `.claude/CLAUDE.md` and `.claude/docs/` (not the workspace root's) and apply that repo's context to its files; if the scope doesn't determine a repo, ask which one.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add oprogramadorreal/optimus-claude/refactor@sha256:969ce1aa45993e14

The line at the top of this page pins the label git:20260924.2e3842c, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_gga6se4bpwdjxhdc.svg)](https://markdownregistry.com/a/art_gga6se4bpwdjxhdc)

6 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 12 versions of this file, between Jul 27, 2026 and Sep 24, 2026, about one every 5 days.

versioncommittedcommitsizeaudit
git:20260924.2e3842c latest2026-09-24 2e3842c 10,963 BB view · diff
git:20260924.37d81502026-09-24 37d8150 10,893 BB view · diff
git:20260924.dd91bd42026-09-24 dd91bd4 11,082 BB view · diff
git:20260924.7b135e42026-09-24 7b135e4 10,955 BB view · diff
git:20260924.88d38b62026-09-24 88d38b6 11,862 BB view · diff
git:20260910.59857932026-09-10 5985793 11,884 BB view · diff
git:20260909.63879c32026-09-09 63879c3 11,777 BB view · diff
git:20260902.b4a28882026-09-02 b4a2888 11,278 BB view · diff
git:20260729.c3b4e222026-07-29 c3b4e22 11,272 BB view · diff
git:20260728.6373eea2026-07-28 6373eea 11,329 BB view · diff
git:20260727.f03d2852026-07-27 f03d285 11,208 BB view · diff
git:20260727.65c3faa2026-07-27 65c3faa 11,492 BB view

Audit of the latest version

B  16 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: Frontmatter declares a name
  • pass: Frontmatter block present
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (10963 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

oprogramadorreal/optimus-claude · 75 stars · license MIT · pushed 2026-09-28 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_gga6se4bpwdjxhdc
GET https://markdownregistry.com/api/v1/resolve?ref=oprogramadorreal/optimus-claude/refactor
GET https://markdownregistry.com/api/v1/blob/969ce1aa45993e1433d4bb6932eccd4a7ef6395e871401faf5fd2296a61bbab3

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from oprogramadorreal/optimus-claude

CLAUDE.md@.claude CLAUDE.md file
oprogramadorreal/optimus-claude · .claude/CLAUDE.md
git:20260924.f62b60d · audit A · 75 stars
AGENTS.md AGENTS.md file
oprogramadorreal/optimus-claude · AGENTS.md
git:20260908.3faa288 · audit A · 75 stars
brainstorm SKILL.md skill
oprogramadorreal/optimus-claude · skills/brainstorm/SKILL.md · Runs a structured design conversation — clarifies intent, proposes 2-3 approaches with trade-offs, iterates the design…
git:20260924.414aa59 · audit B · 75 stars
code-review SKILL.md skill
oprogramadorreal/optimus-claude · skills/code-review/SKILL.md · Reviews local changes, an open PR/MR, or a branch diff for bugs, security issues, and violations of the project's own…
git:20260924.88d38b6 · audit B · 75 stars
commit SKILL.md skill
oprogramadorreal/optimus-claude · skills/commit/SKILL.md · Stages, commits, and optionally pushes local changes with a Conventional Commits message — always previews and confirms…
git:20260924.009a4c7 · audit B · 75 stars
deep SKILL.md skill
oprogramadorreal/optimus-claude · skills/deep/SKILL.md · Runs an iterative auto-fix loop on a chosen target — review, refactor, or coverage — dispatching the base skill into…
git:20260924.b779cdd · audit B · 75 stars
dream SKILL.md skill
oprogramadorreal/optimus-claude · skills/dream/SKILL.md · Prunes and consolidates the project's auto-memory to keep it minimal — deletes stale, wrong, or redundant memories…
git:20260924.e3c7a16 · audit B · 75 stars
gauntlet SKILL.md skill
oprogramadorreal/optimus-claude · skills/gauntlet/SKILL.md · Runs a Gauntlet Loop: turns an ambitious goal into a builder/critic prompt judged against a concrete quality bar…
git:20260925.7013524 · audit B · 75 stars
handoff SKILL.md skill
oprogramadorreal/optimus-claude · skills/handoff/SKILL.md · Compacts the current conversation into one self-contained, tool-agnostic handoff document at docs/handoffs/<slug>.md so…
git:20260924.3b87324 · audit B · 75 stars
how-to-run SKILL.md skill
oprogramadorreal/optimus-claude · skills/how-to-run/SKILL.md · Generates or updates a project's HOW-TO-RUN.md — one verified document teaching a new developer to set up their…
git:20260924.b74e13d · audit B · 75 stars
init SKILL.md skill
oprogramadorreal/optimus-claude · skills/init/SKILL.md · Bootstraps a project for Claude Code or Codex — generates routed project guidance from detected structure, reconciles…
git:20260928.76d799b · audit B · 75 stars
jira SKILL.md skill
oprogramadorreal/optimus-claude · skills/jira/SKILL.md · Fetches a JIRA issue via a configured MCP server and distills it into a structured task file at docs/jira/<KEY>.md that…
git:20260924.99b54d0 · audit B · 75 stars

Every file in oprogramadorreal/optimus-claude

Other files named refactor

refactor SKILL.md skill
code-yeongyu/oh-my-openagent · packages/shared-skills/skills/refactor/SKILL.md · Guides a refactor, cleanup, or restructure with the right decomposition. Use when the user asks to refactor, simplify…
git:20261106.b98a091 · audit A · 70,763 stars
refactor SKILL.md skill
sethgammon/citadel · skills/refactor/SKILL.md · Safe multi-file refactoring with automatic rollback. Establishes a type/test baseline, plans all changes, executes…
git:20260611.0f3f8e7 · audit A · 927 stars
refactor SKILL.md skill
greenfield-inc/pane · main/src/services/paneChatBundle/skills/refactor/SKILL.md · Quality pass on a branch against its remote default branch. Runs a simple analysis (conventions and smells) and, on…
git:20261105.60e9622 · audit A · 603 stars
refactor SKILL.md skill
dcouple/pane · main/src/services/paneChatBundle/skills/refactor/SKILL.md · Quality pass on a branch against its remote default branch. Runs a simple analysis (conventions and smells) and, on…
git:20261105.60e9622 · audit A · 603 stars
refactor SKILL.md skill
rsmdt/the-startup · plugins/start/skills/refactor/SKILL.md · Refactor, simplify, or clean up code for improved maintainability without changing business logic
git:20261011.48bd3ee · audit A · 577 stars
refactor SKILL.md skill
boshu2/agentops · skills/refactor/SKILL.md · Restructure or clean up code with no behavior change, proved by before-and-after checks. Use when: asked to clean up…
git:20261031.73cbeae · audit A · 453 stars
refactor SKILL.md skill
boshu2/agentops · plugin/skills/refactor/SKILL.md · Restructure or clean up code with no behavior change, proved by before-and-after checks. Use when: asked to clean up…
git:20261026.1b5f59a · audit A · 453 stars
refactor SKILL.md skill
justxor/claude-code-pro-course · starter-kit/.claude/skills/refactor/SKILL.md · Безопасный рефакторинг маленькими шагами без изменения поведения. Используй, когда просят отрефакторить, упростить…
git:20260930.76c4189 · audit A · 341 stars

Browse by kind, by grade B, or by owner.