Agent skill

Refactoring Catalog

by revfactory in revfactory/harness-100

Code refactoring catalog. An agent skill from revfactory/harness-100.

Apache-2.0Auto-check passedDevelopment

Install Refactoring Catalog

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

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

GitHub CLI
$ gh skill install revfactory/harness-100 refactoring-catalog --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/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/en/21-code-reviewer/.claude/skills/refactoring-catalog .claude/skills/refactoring-catalog && 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-catalog
GitHub stars
1.3k
Token cost
~1.8k tokens
SKILL.md length
621 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

Code refactoring catalog. An agent skill from revfactory/harness-100.

  • Reviewing code structure improvement involving refactoring
  • SKILL.md covers Target Agents, Code Smell to Refactoring…, SOLID Principle Violation… and Complexity Measurement Criteria, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • SOLID violations

What it does

Refactoring Catalog is an agent skill from revfactory/harness-100. Code refactoring catalog. An extension skill for architecture-reviewer/performance-analyst that provides Martin Fowler-based refactoring patterns, code smell detection-to-refactoring mapping, SOLID principle violation identification, and complexity measurement criteria. Use when reviewing code structure improvement involving 'refactoring', 'code smells', 'SOLID violations', 'complexity', 'design patterns', 'code quality', etc. Note: direct code modification and security analysis are outside the scope of this skill.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring and Design patterns. The licence is Apache-2.0.

When your agent uses it

  • Reviewing code structure improvement involving refactoring
  • SOLID violations
  • Design patterns

Example prompts

  • “refactoring”
  • “code smells”
  • “SOLID violations”
  • “/refactoring-catalog”

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. 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 Catalog loads about 1.8k tokens when it runs. Until then it costs about 135 tokens; SKILL.md has 621 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 621 words, ~1,786 tokens.

Download SKILL.mdSave it as .claude/skills/refactoring-catalog/SKILL.md (or your agent's skills folder).
name
refactoring-catalog
description
Code refactoring catalog. An extension skill for architecture-reviewer/performance-analyst that provides Martin Fowler-based refactoring patterns, code smell detection-to-refactoring mapping, SOLID principle violation identification, and complexity measurement criteria. Use when reviewing code structure improvement involving 'refactoring', 'code smells', 'SOLID violations', 'complexity', 'design patterns', 'code quality', etc. Note: direct code modification and security analysis are outside the scope of this skill.

Refactoring Catalog — Code Refactoring Catalog

A reference of code smell-to-refactoring mappings, SOLID violation identification, and complexity metrics used by the architecture-reviewer and performance-analyst agents during code structure analysis.

Target Agents

  • architecture-reviewer — Applied when suggesting refactoring based on design patterns and SOLID principles
  • performance-analyst — Applied when suggesting refactoring related to complexity analysis and performance

Code Smell to Refactoring Mapping

Code SmellSymptomsRefactoring Technique
Long Method20+ linesExtract Method, Replace Temp with Query
Large Class300+ lines or 10+ fieldsExtract Class, Extract Subclass
Long Parameter List4+ parametersIntroduce Parameter Object, Builder Pattern
Data ClumpsSame field groups repeatedExtract Class
Primitive ObsessionDomain concepts as primitivesValue Object, Enum
Code SmellSymptomsRefactoring Technique
Feature EnvyExcessive use of another class's dataMove Method
Data ClassClass with only getters/settersMove behavior into class
Shotgun SurgeryOne change affects multiple classesMove Method/Field, Inline Class
Divergent ChangeOne class changes for multiple reasonsExtract Class (SRP)
Duplicated CodeIdentical/similar code repeatedExtract Method, Template Method
Middle ManClass that only delegatesRemove Middle Man, Inline Class
Inappropriate IntimacyExcessive coupling between classesMove Method/Field, Extract Class
Switch/If ChainLong conditional branchingReplace Conditional with Polymorphism, Strategy
Refused BequestInherited but unused methodsReplace Inheritance with Delegation
CommentsComplex logic explained by commentsExtract Method (self-documenting code)

SOLID Principle Violation Identification

S — Single Responsibility Principle
Violation SignalIdentification CriteriaRefactoring
Class name contains "And", "Manager"Implies multiple responsibilitiesExtract Class
2+ reasons to change"If X changes this class changes, and if Y changes this class also changes"Separate classes by responsibility
Highly diverse importsImports DB, HTTP, UI, logging all togetherLayer separation
O — Open/Closed Principle
Violation SignalIdentification CriteriaRefactoring
Switch/if modified when adding new typesExisting code modification requiredStrategy Pattern, Polymorphism
Hardcoded branchingCode added for each new conditionPlugin/Registry pattern
L — Liskov Substitution Principle
Violation SignalIdentification CriteriaRefactoring
Override throws exception in child classNotImplementedError, UnsupportedOperationExceptionInterface segregation, Inheritance to Composition
Type checking then castinginstanceof / typeof branchingRedesign with polymorphism
I — Interface Segregation Principle
Violation SignalIdentification CriteriaRefactoring
Empty interface implementationspass, {}, noopInterface segregation
"Fat" interface10+ methodsSplit into Role Interfaces
Show full SKILL.md (255 more words)Show less
D — Dependency Inversion Principle
Violation SignalIdentification CriteriaRefactoring
Direct concrete class instantiationHardcoded new ConcreteService()Dependency Injection
Upper module imports lower moduleBusiness logic directly uses DB libraryInterface/Port abstraction

Complexity Measurement Criteria

Cyclomatic Complexity

Branch points (if/else/switch/for/while/catch) + 1

ScoreComplexityAction
1-5LowAppropriate
6-10MediumReview with care
11-20HighRefactoring recommended
21+Very highRefactoring required
Cognitive Complexity

Difficulty of human code comprehension. Weight increases with deeper nesting.

ElementBase IncrementNesting Bonus
if/else/switch+1+nesting level
for/while/do+1+nesting level
catch+1+nesting level
break/continue to label+1-
Logical operator chain (&&,)
Recursive call+1-
MetricMethod/FunctionClass/File
Lines of codeUnder 20Under 300
Cyclomatic complexity10 or less-
Cognitive complexity15 or less-
Parameter count4 or less-
Nesting depth3 levels or less-
Dependency count-10 or less

Design Pattern Application Guide

Smell to Pattern Mapping
Problem SituationApplicable PatternEffect
Behavioral branching via conditionalsStrategyOCP compliance, easy to add new behaviors
Complex object creation logicFactory Method/BuilderEncapsulate creation logic
Same algorithm skeleton, different detailsTemplate MethodRemove duplication, isolate change points
Behavior changes based on stateStateRemove conditionals, clarify state transitions
Event propagation to multiple objectsObserverLoose coupling
Integrating incompatible interfacesAdapterIntegration without modifying existing code
Simplifying complex subsystemsFacadeInterface simplification
Dynamically adding features to objectsDecoratorFeature extension without inheritance

Refactoring Priority Decision

Impact-Difficulty Matrix
Low DifficultyHigh Difficulty
High ImpactDo immediatelyPlan then execute
Low ImpactWhen time allowsDefer (low cost-benefit)
Refactoring Suggestion Format
[Severity] Code Smell: [Smell Name]
Location: [File:Line]
Current State: [Problem description]
Refactoring: [Technique name]
Expected Effect: [How it improves]
Estimated Difficulty: [Low/Medium/High]

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in en/21-code-reviewer/.claude/skills/refactoring-catalog of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Refactoring Catalog 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 Catalog compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactoring Catalog this skillrevfactory/harness-1001.3k—~1.8kAutomated safety check: PassApache-2.0
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 yesterday
    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 yesterday
    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/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Refactoring Catalog

What does Refactoring Catalog do?

Code refactoring catalog. An agent skill from revfactory/harness-100. Refactoring Catalog is an agent skill from revfactory/harness-100. Code refactoring catalog.

When should I use Refactoring Catalog?

Refactoring Catalog fits situations like: reviewing code structure improvement involving refactoring; SOLID violations; design patterns.

How do I install Refactoring Catalog in Claude Code?

Run `npx skills add revfactory/harness-100 --skill refactoring-catalog -a claude-code`. Or copy the skill folder (en/21-code-reviewer/.claude/skills/refactoring-catalog in revfactory/harness-100) into .claude/skills/refactoring-catalog in your project. Claude Code loads it when a task matches its description.

How do I install Refactoring Catalog in Codex?

Run `npx skills add revfactory/harness-100 --skill refactoring-catalog -a codex`. Or copy the skill folder (en/21-code-reviewer/.claude/skills/refactoring-catalog in revfactory/harness-100) into .agents/skills/refactoring-catalog in your project. Codex loads it when a task matches its description.

Can I use Refactoring Catalog 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/harness-100 --skill refactoring-catalog -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-catalog, .gemini/skills/refactoring-catalog, .github/skills/refactoring-catalog and .opencode/skills/refactoring-catalog in your project.

What does Refactoring Catalog need to run?

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

Does Refactoring Catalog 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 Catalog 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 Catalog use?

Refactoring Catalog is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Refactoring Catalog use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Refactoring Catalog?

Skills that share tags, products or a category with Refactoring Catalog: 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 Catalog?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

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