Agent skill

Refactoring Patterns

by revfactory in revfactory/claude-code-harness

Systematic code refactoring guide with design patterns. An agent skill from revfactory/claude-code-harness.

No licenceAuto-check passedDevelopment

Install Refactoring Patterns

skills CLI
$ npx skills add revfactory/claude-code-harness --skill refactoring-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/claude-code-harness refactoring-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/claude-code-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/experiments/results/case-003/harness/.claude/skills/refactoring-patterns .claude/skills/refactoring-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
refactoring-patterns
GitHub stars
120
Token cost
~244 tokens
SKILL.md length
124 words
Files
2 (incl. references)
Skills in repo
15
Repo updated
First seen
Licence
None found

At a glance

Systematic code refactoring guide with design patterns. An agent skill from revfactory/claude-code-harness.

  • Works in 4 steps: 분석 → 설계 → 구현 → …
  • Refactoring spaghetti code
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Applying Strategy pattern to conditional branches

What it does

Refactoring Patterns is an agent skill from revfactory/claude-code-harness. Systematic code refactoring guide with design patterns. Use when refactoring spaghetti code, applying Strategy pattern to conditional branches, extracting functions by SRP, or replacing magic numbers with named constants.

Its SKILL.md is about 240 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/patterns.md`).

It sits in Development, covering Refactoring and Design patterns.

When your agent uses it

  • Refactoring spaghetti code
  • Applying Strategy pattern to conditional branches
  • Extracting functions by SRP
  • Replacing magic numbers with named constants

Example prompts

  • “/refactoring-patterns”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 분석
  2. 설계
  3. 구현
  4. 테스트

What it can do on your machine

Read from SKILL.md and the folder at commit 267005c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Refactoring Patterns loads about 244 tokens when it runs, and up to ~784 if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 124 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~244
With references · SKILL.md plus every file in references/, read only if the agent opens them
~784

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 124 words (~244 tokens).

name
refactoring-patterns

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (references) in experiments/results/case-003/harness/.claude/skills/refactoring-patterns of revfactory/claude-code-harness.

  • SKILL.md
  • references/patterns.md

Open the folder on GitHubat commit 267005c

Compare with similar skills

Refactoring Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Refactoring Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactoring Patterns this skillrevfactory/claude-code-harness120—~244Automated safety check: PassNone
Swiftui View RefactorDimillian/Skills4k5 repos~2kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Architecture PatternsKartikLabhshetwar/better-shot2.4k2 repos~1.4kAutomated safety check: PassCustom licence
AST Visitor Pattern for Unionsprisma/orm48k—~830Automated safety check: PassApache-2.0
Solidramziddin/solid-skills606—~2.7kAutomated safety check: PassNone

Similar skills

  • Swiftui View Refactor

    Dimillian/Skills

    Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.

    4k GitHub starsUsed in 5 repos~2k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Official

    Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.

    48k GitHub stars~830 tokensUpdated today
    DevelopmentAuto-check passed
  • Solid

    ramziddin/solid-skills

    A skill your agent uses when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging.

    606 GitHub stars~2.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Swiftui View Refactor

    harperreed/dotfiles

    Refactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage.

    334 GitHub starsUsed in 5 repos~1.3k tokens
    DevelopmentAuto-check passed

More from revfactory/claude-code-harness

All 15 skills in this repo
  • Microservice Patterns

    revfactory/claude-code-harness

    Event-driven microservice architecture patterns guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~502 tokensUpdated 7 mo ago
    Auto-check passed
  • Query Engine Design

    revfactory/claude-code-harness

    SQL query engine design and implementation guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~474 tokensUpdated 7 mo ago
    Auto-check passed
  • API Documentation

    revfactory/claude-code-harness

    Write accurate and complete library API documentation. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~263 tokensUpdated 7 mo ago
    Auto-check passed
  • Crdt Algorithms

    revfactory/claude-code-harness

    CRDT-based real-time collaborative text editor implementation guide.

    120 GitHub stars~375 tokensUpdated 7 mo ago
    Auto-check passed
  • Express API Design

    revfactory/claude-code-harness

    Express.js REST API design and implementation guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~276 tokensUpdated 7 mo ago
    Auto-check passed
  • Interpreter Design

    revfactory/claude-code-harness

    Programming language interpreter design and implementation guide.

    120 GitHub stars~387 tokensUpdated 7 mo ago
    Auto-check passed

Categories

Questions about Refactoring Patterns

What does Refactoring Patterns do?

Systematic code refactoring guide with design patterns. An agent skill from revfactory/claude-code-harness. Refactoring Patterns is an agent skill from revfactory/claude-code-harness. Systematic code refactoring guide with design patterns.

When should I use Refactoring Patterns?

Refactoring Patterns fits situations like: refactoring spaghetti code; applying Strategy pattern to conditional branches; extracting functions by SRP; replacing magic numbers with named constants.

How do I install Refactoring Patterns in Claude Code?

Run `npx skills add revfactory/claude-code-harness --skill refactoring-patterns -a claude-code`. Or copy the skill folder (experiments/results/case-003/harness/.claude/skills/refactoring-patterns in revfactory/claude-code-harness) into .claude/skills/refactoring-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Refactoring Patterns in Codex?

Run `npx skills add revfactory/claude-code-harness --skill refactoring-patterns -a codex`. Or copy the skill folder (experiments/results/case-003/harness/.claude/skills/refactoring-patterns in revfactory/claude-code-harness) into .agents/skills/refactoring-patterns in your project. Codex loads it when a task matches its description.

Can I use Refactoring Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/claude-code-harness --skill refactoring-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactoring-patterns, .gemini/skills/refactoring-patterns, .github/skills/refactoring-patterns and .opencode/skills/refactoring-patterns in your project.

What does Refactoring Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Refactoring Patterns is instructions for the agent only.

Does Refactoring Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Refactoring Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Refactoring Patterns use?

No licence was found for Refactoring Patterns or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Refactoring Patterns use?

About 244 tokens (SKILL.md is roughly 976 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 540 tokens, read only when the agent opens those files.

What are the alternatives to Refactoring Patterns?

Skills that share tags, products or a category with Refactoring Patterns: Swiftui View Refactor (Dimillian/Skills, 4k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars), Architecture Patterns (KartikLabhshetwar/better-shot, 2.4k stars) and AST Visitor Pattern for Unions (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactoring Patterns?

revfactory (a GitHub user) maintains it in revfactory/claude-code-harness, which has 120 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on March 6, 2026.

Source: revfactory/claude-code-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.