refactor SKILL.md skillA

This file is byte-identical to the first copy the registry indexed, one of 23 indexed copies. Same content hash, so the same checks give both the same grade.

refactor from marcoemrich/agentic_coding_lab is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add marcoemrich/agentic_coding_lab/refactor@git:20260525.0a75e2c

Pins git:20260525.0a75e2c in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
marcoemrich/agentic_coding_lab
Path
experiments/runs/2026-05-25_17-43-15_claim-office-example-mapping_v5.1-testlist-scope-fix-oc_glm-5-1/.opencode/skills/refactor/SKILL.md
Versions recorded
1
Latest version
git:20260525.0a75e2c, committed May 25, 2026
Size
9,827 bytes
Repository stars
37
License
MIT

TDD Refactor Phase - Improve code while keeping tests green using Simple Design Rules and APP mass.

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

# TDD Refactor Phase

You are now in the **Refactor Phase** of TDD. Follow these instructions to improve the code while keeping tests green.

## Your Mission

Guide developers through the Refactor phase of TDD by helping them:
1. **MUST attempt at least one refactoring** - mandatory, not optional
2. Apply the Four Rules of Simple Design in priority order
3. Use Absolute Priority Premise (APP) to measure code improvements
4. Improve code quality while keeping all tests green
5. Document refactoring decisions and mass calculations
6. If no improvement is possible, explicitly document why

## Context: $ARGUMENTS

## Refactor Phase Rules
- **Mandatory refactoring attempt**: MUST try at least one improvement
- **Tests must stay green**: Never break passing tests
- **Apply Simple Design Rules**: In priority order (1 -> 2 -> 3 -> 4)
- **Calculate APP mass**: Before and after refactoring
- **Document decisions**: Explain improvements or why none were possible
- **Naming is first priority**: Evaluate if function name still fits its purpose

### Simple Design Rules (Priority Order)

#### Rule 1: Tests Pass
- **Highest priority** - never compromise working code
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add marcoemrich/agentic_coding_lab/refactor@sha256:7bda94ec9601030b

The line at the top of this page pins the label git:20260525.0a75e2c, 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_3oszpaz6ge4ik3f5.svg)](https://markdownregistry.com/a/art_3oszpaz6ge4ik3f5)

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

Versions

The registry has recorded 1 version of this file, committed on May 25, 2026.

versioncommittedcommitsizeaudit
git:20260525.0a75e2c latest2026-05-25 0a75e2c 9,827 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 (9827 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

marcoemrich/agentic_coding_lab · 37 stars · license MIT · pushed 2026-11-01 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_3oszpaz6ge4ik3f5
GET https://markdownregistry.com/api/v1/resolve?ref=marcoemrich/agentic_coding_lab/refactor
GET https://markdownregistry.com/api/v1/blob/7bda94ec9601030ba178e6cdad20234471e1d86f068f4a8a335032ea880e29df

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 marcoemrich/agentic_coding_lab

build-overview SKILL.md skill
marcoemrich/agentic_coding_lab · .claude/skills/build-overview/SKILL.md · Generates an experiment-overview snapshot of all research questions under research/reports/. Invoke when a new…
git:20261011.b7a9cef · audit A · 37 stars
exact-coding-baseline-export SKILL.md skill
marcoemrich/agentic_coding_lab · .claude/skills/exact-coding-baseline-export/SKILL.md · Mint a new YYYY-MM-DD-exact-coding-baseline snapshot under research/workflow-dev/export/. Detects the current best…
git:20261001.51935f9 · audit A · 37 stars
reanalyze SKILL.md skill
marcoemrich/agentic_coding_lab · .claude/skills/reanalyze/SKILL.md · Re-run the analysis pipeline on all runs matching an RQ, reaggregate metrics, and propose findings updates against the…
git:20261011.b7a9cef · audit A · 37 stars
run-rq SKILL.md skill
marcoemrich/agentic_coding_lab · .claude/skills/run-rq/SKILL.md · Use this skill to drive a research question (RQ) end-to-end: validate the RQ README, generate a fill batch-plan, start…
git:20261014.b8e5e79 · audit A · 37 stars
build-overview SKILL.md skill
marcoemrich/agentic_coding_lab · .opencode/skills/build-overview/SKILL.md · Generates an experiment-overview snapshot of all research questions under research/reports/. Invoke when a new…
git:20261011.b7a9cef · audit A · 37 stars
exact-coding-baseline-export SKILL.md skill
marcoemrich/agentic_coding_lab · .opencode/skills/exact-coding-baseline-export/SKILL.md · Mint a new YYYY-MM-DD-exact-coding-baseline snapshot under research/workflow-dev/export/. Detects the current best…
git:20261001.69926be · audit A · 37 stars
reanalyze SKILL.md skill
marcoemrich/agentic_coding_lab · .opencode/skills/reanalyze/SKILL.md · Re-run the analysis pipeline on all runs matching an RQ, reaggregate metrics, and propose findings updates against the…
git:20261001.18c28e0 · audit A · 37 stars
run-rq SKILL.md skill
marcoemrich/agentic_coding_lab · .opencode/skills/run-rq/SKILL.md · Use this skill to drive a research question (RQ) end-to-end: validate the RQ README, generate a fill batch-plan, start…
git:20261011.b7a9cef · audit A · 37 stars
CLAUDE.md CLAUDE.md file
marcoemrich/agentic_coding_lab · CLAUDE.md
git:20261014.a2b7ca5 · audit A · 37 stars
AGENTS.md@experiments/runs/2026-05-25_06-19-06_claim-office-prose_v1-oneshot-oc_opus-4-7-portkey/.opencode AGENTS.md file
marcoemrich/agentic_coding_lab · experiments/runs/2026-05-25_06-19-06_claim-office-prose_v1-oneshot-oc_opus-4-7-portkey/.opencode/AGENTS.md
git:20260525.03fa58e · audit A · 37 stars
AGENTS.md@experiments/runs/2026-05-25_06-19-06_claim-office-prose_v1-oneshot-oc_opus-4-7-portkey AGENTS.md file
marcoemrich/agentic_coding_lab · experiments/runs/2026-05-25_06-19-06_claim-office-prose_v1-oneshot-oc_opus-4-7-portkey/AGENTS.md
git:20260525.03fa58e · audit A · 37 stars
AGENTS.md@experiments/runs/2026-05-25_06-43-28_claim-office-prose_v1-oneshot-oc_opus-4-7-portkey/.opencode AGENTS.md file
marcoemrich/agentic_coding_lab · experiments/runs/2026-05-25_06-43-28_claim-office-prose_v1-oneshot-oc_opus-4-7-portkey/.opencode/AGENTS.md
git:20260525.a1239d0 · audit A · 37 stars

Every file in marcoemrich/agentic_coding_lab

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.