refactor SKILL.md skillA

refactor from borda/ai-rig is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add borda/ai-rig/refactor@git:20261031.2278c0c

Pins git:20261031.2278c0c in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
borda/ai-rig
Path
plugins/cc_develop/skills/refactor/SKILL.md
Versions recorded
23
Latest version
git:20261031.2278c0c, committed Oct 31, 2026
First version recorded
Aug 8, 2026
Size
42,852 bytes
Repository stars
31
License
Apache-2.0

Test-first refactoring — audit coverage, add characterization tests, apply changes with safety net, run quality stack and a bounded independent challenge. TRIGGER when: user wants to restructure existing Python code without changing behaviour; phrases: "refactor X", "clean up Y", "extract Z", "restructure this module", "improve code quality". SKIP when: bug fixes (use `/develop:fix`); new features (use `/develop:feature`); mixed refactor+feature — run `/develop:refactor` first, then…

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

<objective>

Test-first refactoring. Audit coverage, add characterization tests if missing, apply changes with safety net.

NOT for:

- bug fixes (use `/develop:fix`)
- new features (use `/develop:feature`)
- `.claude/` config changes (use `/foundry:manage` (requires foundry plugin))
- non-Python projects (JS/TS/Go/Rust) — toolchain assumes pytest; use language-native toolchain instead
- mixed refactor+feature tasks — run /develop:refactor first, then /develop:feature; never both in one run

Quality stack (Branch Safety Guard, Codex Pre-pass, Progressive Review) ships in this plugin's own `_shared` (`foundry--quality-stack.md`); missing → Step 5 quality stack skipped with visible warning — lower output quality but workflow still completes.

</objective>

<constants>

- MAX_INNER_CYCLES: 5 (change-test cycles per outer session — Step 4 safety break; mirrored via dev-max-inner-cycles/dev-max-wall-seconds sentinels in Step 4)

</constants>

<compaction>

- Key boundary: end of Step 2 — coverage audit complete, before characterization test writing in Step 3.
- Second boundary: end of Step 4 — refactor edits applied, before review stack in Step 5.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add borda/ai-rig/refactor@sha256:cb71489dd2474c0f

The line at the top of this page pins the label git:20261031.2278c0c, 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_2fpiykoagi4eaj7r.svg)](https://markdownregistry.com/a/art_2fpiykoagi4eaj7r)

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

Versions

The registry has recorded 23 versions of this file, between Aug 8, 2026 and Oct 31, 2026, about one every 4 days.

versioncommittedcommitsizeaudit
git:20261031.2278c0c latest2026-10-31 2278c0c 42,852 BA view · diff
git:20261023.0d5e7142026-10-23 0d5e714 39,218 BA view · diff
git:20261022.0ab984e2026-10-22 0ab984e 38,399 BA view · diff
git:20261021.7b6ff282026-10-21 7b6ff28 38,217 BA view · diff
git:20261019.0bfecb12026-10-19 0bfecb1 38,484 BA view · diff
git:20261012.8e6b67e2026-10-12 8e6b67e 38,094 BA view · diff
git:20261009.253fdb32026-10-09 253fdb3 38,024 BA view · diff
git:20261005.6367f832026-10-05 6367f83 37,683 BA view · diff
git:20261002.e974f382026-10-02 e974f38 37,674 BA view · diff
git:20261002.381549d2026-10-02 381549d 38,252 BA view · diff
git:20260930.470cd2e2026-09-30 470cd2e 33,019 BA view · diff
git:20260929.98a9e772026-09-29 98a9e77 33,019 BA view · diff
git:20260928.383bceb2026-09-28 383bceb 32,735 BA view · diff
git:20260923.39e3a482026-09-23 39e3a48 29,791 BA view · diff
git:20260918.666b5742026-09-18 666b574 29,188 BA view · diff
git:20260918.3e1a63d2026-09-18 3e1a63d 29,317 BA view · diff
git:20260912.65e8e292026-09-12 65e8e29 29,474 BA view · diff
git:20260911.182df572026-09-11 182df57 29,827 BA view · diff
git:20260904.9c1cbe22026-09-04 9c1cbe2 30,023 BA view · diff
git:20260822.a5f4fd62026-08-22 a5f4fd6 30,022 BA view · diff
git:20260821.d9793192026-08-21 d979319 29,154 BA view · diff
git:20260814.b9c6b5a2026-08-14 b9c6b5a 29,168 BA view · diff
git:20260808.a8a70fe2026-08-08 a8a70fe 29,003 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (42852 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

Source

GitHub

borda/ai-rig · 31 stars · license Apache-2.0 · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_2fpiykoagi4eaj7r
GET https://markdownregistry.com/api/v1/resolve?ref=borda/ai-rig/refactor
GET https://markdownregistry.com/api/v1/blob/cb71489dd2474c0f5db8c69f29e0a2a2e6b29c990eaa54b2ae9668a9575101ac

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 borda/ai-rig

AGENTS.md AGENTS.md file
borda/ai-rig · AGENTS.md
git:20261101.17fd3ab · audit A · 31 stars
CLAUDE.md CLAUDE.md file
borda/ai-rig · CLAUDE.md
git:20261101.17fd3ab · audit A · 31 stars
AGENTS.md@benchmarks AGENTS.md file
borda/ai-rig · benchmarks/AGENTS.md
git:20260814.b9c6b5a · audit A · 31 stars
llms.txt@docs llms.txt file
borda/ai-rig · docs/llms.txt
git:20260814.1bd25c1 · audit A · 31 stars
AGENTS.md@plugins AGENTS.md file
borda/ai-rig · plugins/AGENTS.md
git:20261101.17fd3ab · audit A · 31 stars
CLAUDE.md@plugins CLAUDE.md file
borda/ai-rig · plugins/CLAUDE.md
git:20261102.52ad0cc · audit B · 31 stars
advise SKILL.md skill
borda/ai-rig · plugins/bridge_cc-codex/claude-skills/advise/SKILL.md · Ask Codex a read-only question with explicit model, effort, budget, and compact results.
git:20261025.90f4430 · audit A · 31 stars
cancel SKILL.md skill
borda/ai-rig · plugins/bridge_cc-codex/claude-skills/cancel/SKILL.md · Request cancellation of a running detached Codex bridge job.
git:20261021.7b6ff28 · audit A · 31 stars
implement SKILL.md skill
borda/ai-rig · plugins/bridge_cc-codex/claude-skills/implement/SKILL.md · Ask Codex for one bounded write-capable change with compact results.
git:20261025.90f4430 · audit A · 31 stars
result SKILL.md skill
borda/ai-rig · plugins/bridge_cc-codex/claude-skills/result/SKILL.md · Read a completed detached Codex bridge job's compact result.
git:20261021.7b6ff28 · audit A · 31 stars
review SKILL.md skill
borda/ai-rig · plugins/bridge_cc-codex/claude-skills/review/SKILL.md · Request a read-only adversarial Codex review with explicit model, effort, budget, and compact findings.
git:20261025.90f4430 · audit A · 31 stars
setup SKILL.md skill
borda/ai-rig · plugins/bridge_cc-codex/claude-skills/setup/SKILL.md · Configure, authenticate, repair, and verify the Claude Code to Codex Bridge; safe stages run by default and sensitive…
git:20261021.7b6ff28 · audit A · 31 stars

Every file in borda/ai-rig

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 A, or by owner.