class-refactoring SKILL.md skillA

class-refactoring from pekral/cursor-rules is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add pekral/cursor-rules/class-refactoring@git:20260825.68f0a25

Pins git:20260825.68f0a25 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
pekral/cursor-rules
Path
skills/class-refactoring/SKILL.md
Versions recorded
5
Latest version
git:20260825.68f0a25, committed Aug 25, 2026
First version recorded
Aug 10, 2026
Size
24,618 bytes
Repository stars
12
License
MIT

Use when refactor PHP classes to improve structure, readability,.

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

# Class Refactoring

## Purpose
Improve code structure and quality without changing behavior.

Focus on:
- clarity
- separation of concerns
- testability
- maintainability

---

## Modes

This skill runs in one of two modes, selected by the caller via `MODE` (default `apply`):

- **`apply` (default)** — full refactoring: modify code, author the pre-refactor coverage commit, run fixers / checkers, and chain the After Completion review. Every step below behaves as written unless it is explicitly flagged for `MODE=cr`.
- **`cr` (read-only lens — invoked by `@skills/code-review/SKILL.md`, `code-review-github`, `code-review-jira`, `code-review-bugsnag`)** — **never modify code, never author tests, never stage / commit / push, never run fixers or checkers, and never chain any After Completion review.** Scope the analysis to the lines added or modified by the PR diff and return the refactoring opportunities as markdown only, for the CR to fold into its Refactoring (DRY / tech debt) and Refactoring proposals sections. Every "apply / extract / split / consolidate" instruction below is emitted as a written proposal, not applied to code; the Test Coverage Gate becomes a read-only audit…
…

Read the whole file at its exact version.

How to install

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_5o6cjsxpz3m2xelg/6c508f3eaeeac508ab8c4b8fc048be03f3650aa058f2f5528266f664fbe1bd77.json

Then /plugin install class-refactoring@markdownregistry-5o6cjsxpz3m2xelg in Claude Code. It installs git:20260825.68f0a25, the one graded A here, pinned to the commit it was graded at, and leaves it there.

The exact contents, by fingerprint
mdr add pekral/cursor-rules/class-refactoring@sha256:6c508f3eaeeac508

The line at the top of this page pins the label git:20260825.68f0a25, 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_5o6cjsxpz3m2xelg.svg)](https://markdownregistry.com/a/art_5o6cjsxpz3m2xelg)

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

Ask from your agent
claude mcp add --transport http markdownregistry https://markdownregistry.com/mcp/registry

Then ask it: what changed in pekral/cursor-rules/class-refactoring since the version I have? It reads every saved version here, no key and no account. Any agent that speaks MCP can add it.

Got a copy of class-refactoring from somewhere else? Ask it: where did my class-refactoring come from, and what was changed? It names the public original, the version yours is closest to and every changed line. The text is not kept.

Versions

The registry has recorded 5 versions of this file, between Aug 10, 2026 and Aug 25, 2026, about one every 4 days.

Watch this file (sign in, one email per new version)

versioncommittedcommitsizeaudit
git:20260825.68f0a25 latest2026-08-25 68f0a25 24,618 BA view · diff
git:20260817.6e3e4842026-08-17 6e3e484 24,058 BA view · diff
git:20260815.5a48f322026-08-15 5a48f32 23,934 BA view · diff
git:20260812.063e88e2026-08-12 063e88e 23,301 BA view · diff
git:20260810.a617f982026-08-10 a617f98 23,345 BA view
Keep it current by itself, install once

Committed this skill to a repository? Install the markdownregistry skill updates app on it, or on all of them. When the registry saves a newer version, a pull request brings your copy to it within minutes, the newest version first, then what changed and any check it newly trips. A copy you edited is never touched, and nothing is deleted.

Install on GitHub

It asks to read and write contents and pull requests, and to read metadata. No workflow file, no Actions setting, nothing runs on your runners. Uninstall it and everything the registry kept about your repository is deleted.

Keep it current by itself

Committed this skill to a repository? Add one workflow file, and when a newer version is saved, a pull request brings your copy to it, the newest version first, then what changed and any check it newly trips. A copy you edited is never touched, and nothing is deleted.

mkdir -p .github/workflows && curl -fsSL https://markdownregistry.com/ci/skill-updates.yml -o .github/workflows/skill-updates.yml

It runs daily on GitHub Actions, no key and no account. Read the workflow before you add it.

Check a whole project

From the root of your project, one line hashes each installed skill's SKILL.md, your AGENTS.md and your CLAUDE.md, and asks the registry once. Only the fingerprints and paths are sent.

sha256sum .claude/skills/*/SKILL.md AGENTS.md CLAUDE.md | curl -s --data-binary @- https://markdownregistry.com/api/v1/check-copies

In CI, add --fail-with-body: the answer is 409 when any file is behind, so the step fails and still prints which files.

sha256sum .claude/skills/*/SKILL.md AGENTS.md CLAUDE.md | curl -s --fail-with-body --data-binary @- https://markdownregistry.com/api/v1/check-copies

No sha256sum on your machine? shasum -a 256 prints the same lines.

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 (24618 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

pekral/cursor-rules · 12 stars · license MIT · pushed 2026-10-03 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_5o6cjsxpz3m2xelg
GET https://markdownregistry.com/api/v1/resolve?ref=pekral/cursor-rules/class-refactoring
GET https://markdownregistry.com/api/v1/blob/6c508f3eaeeac508ab8c4b8fc048be03f3650aa058f2f5528266f664fbe1bd77

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 pekral/cursor-rules

CLAUDE.md CLAUDE.md file
pekral/cursor-rules · CLAUDE.md
git:20260809.a06a16f · audit A · 12 stars
analyze-problem SKILL.md skill
pekral/cursor-rules · skills/analyze-problem/SKILL.md · Use when structured problem analysis for debugging, root cause
git:20260825.343ade7 · audit A · 12 stars
api-review SKILL.md skill
pekral/cursor-rules · skills/api-review/SKILL.md · Use when reviewing HTTP API design in a PR or change set — endpoints, routes, HTTP methods, status codes, idempotency…
git:20260716.7828b68 · audit A · 12 stars
article-writing SKILL.md skill
pekral/cursor-rules · skills/article-writing/SKILL.md · Use when writing articles, guides, blog posts, tutorials, newsletter issues, or other long-form content longer than a…
git:20260614.7dae13a · audit A · 12 stars
assignment-compliance-check SKILL.md skill
pekral/cursor-rules · skills/assignment-compliance-check/SKILL.md · Use when checking that the pull request implementation actually fulfills the business requirements stated in the linked…
git:20260716.7828b68 · audit A · 12 stars
automation-audit-ops SKILL.md skill
pekral/cursor-rules · skills/automation-audit-ops/SKILL.md · Use when you need an evidence-first, read-only inventory of every automation in this repo (GitHub Actions, Claude Code…
git:20260615.cc39a4d · audit A · 12 stars
autonomous-loops SKILL.md skill
pekral/cursor-rules · skills/autonomous-loops/SKILL.md · Use when choosing how to run Claude Code autonomously on this project — from a single sequential pipeline to…
git:20261003.14c8a0b · audit A · 12 stars
benchmark-optimization-loop SKILL.md skill
pekral/cursor-rules · skills/benchmark-optimization-loop/SKILL.md · Use when a goal is vague speed ("make it faster", "reduce p95", "cut query time") and you need a bounded, measured loop…
git:20260615.62f6e3e · audit A · 12 stars
benchmark SKILL.md skill
pekral/cursor-rules · skills/benchmark/SKILL.md · Use when measuring performance baselines or detecting regressions before and after a change in a Laravel app — page…
git:20260615.d3ee2d6 · audit A · 12 stars
blueprint SKILL.md skill
pekral/cursor-rules · skills/blueprint/SKILL.md · Use when a single objective is too large for one pull request and must span multiple sessions or PRs. Turns the…
git:20260716.78e7355 · audit A · 12 stars
cleanup-local-branches SKILL.md skill
pekral/cursor-rules · skills/cleanup-local-branches/SKILL.md · Use when cleaning up local Git branches after origin pruning. Deletes local branches whose upstream was deleted on…
git:20260613.ac1fa4e · audit A · 12 stars
code-review-bugsnag SKILL.md skill
pekral/cursor-rules · skills/code-review-bugsnag/SKILL.md · Use when run code review for a Bugsnag error and publish results to
git:20260825.343ade7 · audit A · 12 stars

Every file in pekral/cursor-rules

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