Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/pekral/cursor-rules/class-refactoringnpx skills add pekral/cursor-rules --skill class-refactoringgit clone --depth 1 https://github.com/pekral/cursor-rulesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00022 | $0.05257 |
| Opus 5 | $0.00011 | $0.02629 |
| Sonnet 5 | $0.00004 | $0.01051 |
| Haiku 4.5 | $0.00002 | $0.00526 |
Grade A, and why
class-refactoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 forMODE=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 (report coverage gaps as findings, do not author tests).Completeness contract (
MODE=cr). The lens walks the complete guideline set of this skill against the diff — every bullet of Refactoring Guidelines, every bullet of Laravel Context, and the behavior-preservation clauses of the Execution section — not only the DRY / oversized-method subset the caller happens to name in its invocation line. A caller's summary of the lens ("surface DRY duplication and oversized methods") is a description of the common case, never a restriction of the walk. Each matched guideline produces one item, and the caller must render every returned item in the published report — the CR routes it, it never drops it. The routing and de-duplication contract lives in@rules/code-review/general.mdcRefactoring & Tech Debt (DRY) Analysis — diff-scoped detail.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 168 lines · 22 tokens per session scan A 6c508f3eaeea
class-refactoring is a skill published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 7d ago), licensed MIT. It adds 22 tokens to every session and 5,257 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
vue-pages
Generate Vue frontend pages using catch-table for CatchAdmin module with full component features.
curd
Generates complete CRUD module from database table definition. Orchestrates 9 sub-skills. Use when user says "create CRUD", "generate module from table", or provides a table structure.
model
Generate Eloquent model for CatchAdmin module with full CatchModel features.
parse-table
Parse table definition to extract module name, model name, table name, and field definitions. First step of CRUD generation.
controller
Generate CRUD controller for CatchAdmin module.
migration
Generate database migration file for CatchAdmin module.