superpowers
claudecodexCore skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
15 skills · hooks
141 SKILL.md skills — 1 audit orchestrator + 66 refactorings + 24 smells + 50 patterns (27 Kerievsky + 23 GoF). Apply Fowler refactorings when their preconditions appear; refuse known code smells; apply Kerievsky composite refactorings whose destination is a pattern; recognize GoF design patterns as destination shapes. Sources: https://refactoring.com/catalog/, Refactoring to Patterns (Kerievsky 2004), and Design Patterns (Gamma/Helm/Johnson/Vlissides 1994).
Plugin refactor from marketplace ritl in wallacedrew/ritl. Commands read from the repo's manifest — 1 month ago.
abstract-factoryApply Abstract Factory when you see Shotgun Surgery, Repeated Switches, Replace Constructor with Factory Function. The agent reads one factory interface to know what products exist; concrete factories are short and exhaustive; client code is one factory pointer away from the right family.
adapterApply Adapter when you see Alternative Classes with Different Interfaces, Change Function Declaration, Replace Subclass with Delegate. The canonical interface is the agent's single anchor for reasoning about how the system uses payments; the adapter is a thin file the agent reads once to understand
alternative-classes-with-different-interfacesRefuse Alternative Classes with Different Interfaces when two classes the agent recognizes as doing similar things but with mismatched method names and signatures; the agent must learn both vocabularies and translate between them. Apply Change Function Declaration, Move Function.
auditAudit a target for refactoring smells — primary purpose is shared understanding of what's present, for both agent and human reader; refactoring is the action arm, taken only on accepted rows. Sense the smells, build a decision table, lay down safety-net tests for accepted rows, then apply the matchi
bridgeApply Bridge when you see Shotgun Surgery, Replace Subclass with Delegate, Extract Class. Two independent surfaces the agent reads separately.
builderApply Builder when you see Long Parameter List, Primitive Obsession, Introduce Parameter Object. Self-describing construction the agent reads top-to-bottom without cross-file lookup.
chain-constructorsApply Chain Constructors when you see Duplicated Code, Extract Function, Combine Functions into Class. One construction path the agent reads to know what a fully-initialized object looks like; all other paths are one-line delegations the agent skips past during reasoning.
chain-of-responsibilityApply Chain of Responsibility when you see Long Function, Divergent Change, Replace Conditional with Polymorphism. N small handler classes the agent reads one at a time.
change-function-declarationApply Change Function Declaration when you see Mysterious Name, Long Parameter List, Alternative Classes with Different Interfaces. Names and signatures express what the function does; the agent reasons about call sites from the signature alone.
change-reference-to-valueApply Change Reference to Value when you see Mutable Data. The object is immutable + equal-by-content; the agent reasons about value semantics without modeling write timing.
change-value-to-referenceApply Change Value to Reference when you see Duplicated Code. The entity exists once; the agent reasons about one canonical object referenced everywhere.
collapse-hierarchyApply Collapse Hierarchy when you see Lazy Element, Speculative Generality. The subclass folds into the parent; the agent reads one class instead of a degenerate two-class hierarchy.
combine-functions-into-classApply Combine Functions into Class when you see Data Clumps, Primitive Obsession. Operations live with the data they act on; the agent loads one class to reason about both shape and behavior.
combine-functions-into-transformApply Combine Functions into Transform when you see Data Clumps, Mutable Data. One transform produces the enriched record from the input; the agent reads one input-to-shape contract and consumers read named output fields without simulating the derivation.
commandApply Command when you see Repeated Switches, Primitive Obsession, Replace Function with Command. One Command interface (execute + undo) the agent reads as the structural commitment.
commentsRefuse Comments when comments explaining what the next block does or what a function returns; the agent loading the comment plus the code carries two sources of truth that may have drifted apart. Apply Extract Function, Change Function Declaration.
compose-methodApply Compose Method when you see Long Function, Extract Function, Replace Temp with Query. The method reads as a sequence of named operations the agent verifies against without re-deriving the algorithm.
compositeApply Composite when you see Repeated Switches, Replace Conditional with Polymorphism, Replace Type Code with Subclasses. A typed interface where adding a new node kind forces the type system to demand an implementation of every operation.
consolidate-conditional-expressionApply Consolidate Conditional Expression when you see Duplicated Code. The predicate lives at one named function the agent reads once; edits to the rule land at the function definition and propagate to every caller through reference.
data-classRefuse Data Class when a class whose surface is only getters and setters; all real behavior lives in consumers, scattered across files the agent must locate to reason about anything domain-meaningful. Apply Encapsulate Record, Remove Setting Method.
data-clumpsRefuse Data Clumps when the agent sees the same field group appearing across multiple signatures (parameters, class fields, interface properties, args) — every site re-parses the same shape and verifies the same ordering. Apply Extract Class, Introduce Parameter Object.
decompose-conditionalApply Decompose Conditional when you see Long Function, Comments. Conditions read as named domain decisions; the agent reasons about isSummer(date) instead of re-deriving the month range.
decoratorApply Decorator when you see Large Class, Divergent Change, Replace Subclass with Delegate. N small wrapper classes the agent reads one at a time.
divergent-changeRefuse Divergent Change when reading the module, the agent constantly switches between conceptually unrelated regions (tax logic, UI logic, API logic); every cross-axis edit pays context-window load for all of them. Apply Split Phase, Move Function.
duplicated-codeRefuse Duplicated Code when near-identical code in multiple files; each copy the agent reads adds tokens to the context window without adding new information, and copies the agent doesn't read stay unverified. Apply Extract Function, Slide Statements.
encapsulate-classes-with-factoryApply Encapsulate Classes With Factory when you see Shotgun Surgery, Replace Constructor with Factory Function, Hide Delegate. One factory module the agent verifies once; all construction sites read as named factory calls the agent treats opaquely.
encapsulate-collectionApply Encapsulate Collection when you see Mutable Data, Insider Trading. The owner exposes mutation methods (add, remove, replace); reads return snapshots or iterators; the agent reasons about collection invariants on the owner alone.
encapsulate-composite-with-builderApply Encapsulate Composite With Builder when you see Long Function, Hide Delegate, Extract Class. A construction site that reads as a tree literal the agent parses structurally in one pass.
encapsulate-recordApply Encapsulate Record when you see Data Class, Primitive Obsession. The record is a class with accessors; the agent reasons about its shape, invariants, and behavior in one definition.
encapsulate-variableApply Encapsulate Variable when you see Global Data, Mutable Data. All access goes through a small named function the agent can grep for, audit, and instrument as a single closed surface.
extract-adapterApply Extract Adapter when you see Divergent Change, Extract Class, Replace Conditional with Polymorphism. One adapter file per variant; the agent verifies each adapter independently against the external API.
extract-classApply Extract Class when you see Data Clumps, Temporary Field, Large Class, Primitive Obsession. Each type has one purpose; the agent loads a small focused file to reason about any single concept.
extract-compositeApply Extract Composite when you see Duplicated Code, Extract Superclass, Pull Up Method. One Composite superclass the agent reads once and trusts thereafter.
extract-functionApply Extract Function when you see Long Function, Duplicated Code, Comments. Each function is a verifiable unit small enough that the agent reasons about its full behavior in a single reasoning step.
extract-parameterApply Extract Parameter when you see Duplicated Code, Parameterize Function, Extract Function. One method the agent reads once; callers supply the varying value at the call site.
extract-superclassApply Extract Superclass when you see Duplicated Code, Alternative Classes with Different Interfaces. Shared structure lives on the parent with one declaration; queries about either subclass load the parent's contract once instead of paying the cost of loading N near-identical subclass declarations.
extract-variableApply Extract Variable when you see Mysterious Name, Comments. Intermediate values carry domain names; subsequent reads resolve to one token of name instead of re-evaluating the expression at every use.
facadeApply Facade when you see Message Chains, Insider Trading, Hide Delegate. One Facade method the agent reads end-to-end to understand the full choreography.
factory-methodApply Factory Method when you see Repeated Switches, Replace Conditional with Polymorphism, Replace Type Code with Subclasses. Structural completeness via the type system; every subclass of the creator implements the factory method, so missing-variant bugs surface as construction-time errors the age
feature-envyRefuse Feature Envy when a method's body references foreign-class data more than its own; the agent loading this method also loads the foreign class to verify any change. Apply Move Function, Extract Function.
flyweightApply Flyweight when you see Duplicated Code, Large Class, Extract Class. A structural separation between kind-shared data (TreeType) and per-instance data (Tree).
form-template-methodApply Form Template Method when you see Duplicated Code, Pull Up Method, Extract Function. One template body the agent reads to know the algorithm; primitives are short, locally readable, individually verifiable.
global-dataRefuse Global Data when a module-level variable mutated from anywhere — the agent reading any single call site cannot bound its impact without paying completeness-check cost across every consumer. Apply Encapsulate Variable.
hide-delegateApply Hide Delegate when you see Message Chains. Callers reach for the wrapper's methods directly; the agent reads one type signature instead of walking the delegate chain to predict what the call returns.
inline-classApply Inline Class when you see Lazy Element, Speculative Generality. The class folds into its primary collaborator; the agent loads one file for what was two.
inline-functionApply Inline Function when you see Lazy Element, Speculative Generality. Trivial wrappers disappear from the agent's working context; call sites read as exactly what's happening.
inline-singletonApply Inline Singleton when you see Global Data, Inline Function, Remove Dead Code. Constructor signatures carry every dependency the class uses; the agent reads one signature to enumerate what the class touches instead of grepping for static accessor calls across the codebase.
inline-variableApply Inline Variable when you see Lazy Element. Expressions sit at their use sites without an intervening binding; the agent reads the expression once instead of reading the variable name plus the binding's definition.
insider-tradingRefuse Insider Trading when module A reaches into module B's private fields or undocumented behavior; the agent reasoning about A must also load B's internals to make any change. Apply Move Function, Move Field.
interpreterApply Interpreter when you see Primitive Obsession, Repeated Switches, Replace Conditional with Polymorphism. One class per grammar rule, each with interpret(env).
introduce-assertionApply Introduce Assertion when you see Comments, Mutable Data. Invariants live in code as runtime checks; the agent reads the assertion as a typed constraint that downstream code can take as a precondition without re-deriving it from caller context.
introduce-null-objectApply Introduce Null Object when you see Repeated Switches, Introduce Special Case, Replace Conditional with Polymorphism. One Null Object class the agent verifies once; all call sites unconditionally invoke the collaborator interface.
introduce-parameter-objectApply Introduce Parameter Object when you see Long Parameter List, Data Clumps. The clump becomes a named value object the agent passes through as a single token; structure validation happens once at construction.
introduce-polymorphic-creation-with-factory-methodApply Introduce Polymorphic Creation With Factory Method when you see Repeated Switches, Replace Conditional with Polymorphism, Replace Constructor with Factory Function. Each subclass's Factory Method is locally verifiable; the base algorithm has no construction-conditional for the agent to load.
introduce-special-caseApply Introduce Special Case when you see Repeated Switches, Comments. The special case responds to the same interface as the real case; the agent reasons without branching at every call site.
iteratorApply Iterator when you see Insider Trading, Message Chains, Encapsulate Collection. One iterator protocol the agent reads to understand traversal semantics.
large-classRefuse Large Class when a type definition — class or interface — with so many fields and methods that the agent cannot load it as a coherent unit; multiple unrelated responsibilities sit under one name. Apply Extract Class, Extract Superclass.
lazy-elementRefuse Lazy Element when a class, function, or namespace whose body the agent traces through only to find no decisions or transformations — every hop is pure overhead in reasoning context. Apply Inline Function, Inline Class.
limit-instantiation-with-singletonApply Limit Instantiation With Singleton when you see Mutable Data, Encapsulate Variable, Replace Constructor with Factory Function. One static accessor the agent verifies once; all references resolve to the same identity.
long-functionRefuse Long Function when the function's body has more tokens than the agent can hold in one reasoning step; verifying behavior preservation means re-reading the entire body on every edit. Apply Extract Function, Replace Temp with Query.
long-parameter-listRefuse Long Parameter List when a signature with so many positional parameters that the agent has to read the function definition into the context window before generating each invocation. Apply Replace Parameter with Query, Preserve Whole Object.
loopsRefuse Loops when imperative for/while loops where filter, map, and reduce concerns are mixed by hand; the agent cannot tell what the loop is producing without mentally executing it. Apply Replace Loop with Pipeline.
mediatorApply Mediator when you see Insider Trading, Shotgun Surgery, Move Function. One Mediator the agent reads to understand all relationships.
mementoApply Memento when you see Insider Trading, Mutable Data, Extract Class. One save / restore pair the agent reads inside the editor class.
message-chainsRefuse Message Chains when long dotted access paths the agent must trace through several object hops to understand any single read; renaming any intermediate field breaks every caller silently. Apply Hide Delegate, Extract Function.
middle-manRefuse Middle Man when a class whose methods all delegate straight through to another object — the agent traces every call to the real implementation, paying a hop for no decision. Apply Remove Middle Man, Inline Function.
move-accumulation-to-collecting-parameterApply Move Accumulation To Collecting Parameter when you see Duplicated Code, Parameterize Function, Substitute Algorithm. One collecting parameter the agent reads as a single mutable accumulator; recursion bodies become small and locally verifiable.
move-accumulation-to-visitorApply Move Accumulation To Visitor when you see Divergent Change, Extract Class, Move Function. One file per operation; the agent verifies a Visitor against its declared interface in isolation.
move-creation-knowledge-to-factoryApply Move Creation Knowledge To Factory when you see Long Function, Extract Class, Move Function. One factory file the agent reads as the construction contract; callers are short delegations the agent treats opaquely.
move-embellishment-to-decoratorApply Move Embellishment To Decorator when you see Long Parameter List, Extract Class, Replace Subclass with Delegate. One file per behaviour the agent reads in isolation; the core class is short and verifiable on its own.
move-fieldApply Move Field when you see Shotgun Surgery, Insider Trading. Each field lives in the class that determines its value; reading the field and reading the data that determines it happen in the same class file.
move-functionApply Move Function when you see Feature Envy, Shotgun Surgery, Insider Trading, Divergent Change. Each function lives where its data lives; the agent loads one class to reason about one behavior.
move-statements-into-functionApply Move Statements into Function when you see Duplicated Code. The function owns its setup and follow-up; the agent verifies behavior at the function definition instead of auditing every call site.
move-statements-to-callersApply Move Statements to Callers when you see Divergent Change. The function's body addresses one responsibility; callers express their differences at the call site.
mutable-dataRefuse Mutable Data when fields the agent finds reassigned across multiple files with no obvious owner; reasoning about state at any moment requires completeness-check cost across every writer. Apply Encapsulate Variable, Split Variable.
mysterious-nameRefuse Mysterious Name when names that don't disambiguate scope or domain force the agent to read more code into the context window just to know what a variable holds before each reasoning step. Apply Change Function Declaration, Rename Variable.
observerApply Observer when you see Shotgun Surgery, Divergent Change, Hide Delegate. One subscribe/notify protocol the agent reads once per subject.
parameterize-functionApply Parameterize Function when you see Duplicated Code. One canonical function with a parameter; the agent reasons about one body and verifies parameter values at call sites.
preserve-whole-objectApply Preserve Whole Object when you see Long Parameter List, Data Clumps. The function takes the object; the agent updates one place when the function needs new fields.
primitive-obsessionRefuse Primitive Obsession when function signatures use raw strings and numbers where domain concepts hide; the agent cannot tell from the type whether an argument is the right kind of thing. Apply Replace Primitive with Object, Replace Type Code with Subclasses.
prototypeproxypull-up-constructor-bodypull-up-fieldpull-up-methodpush-down-fieldpush-down-methodrefused-bequestremove-dead-coderemove-flag-argumentremove-middle-manremove-setting-methodremove-subclassrename-fieldrename-variablerepeated-switchesreplace-command-with-functionreplace-conditional-dispatcher-with-commandreplace-conditional-logic-with-strategyreplace-conditional-with-polymorphismreplace-constructor-with-factory-functionreplace-constructors-with-creation-methodsreplace-control-flag-with-breakreplace-derived-variable-with-queryreplace-error-code-with-exceptionreplace-exception-with-precheckreplace-function-with-commandreplace-hard-coded-notifications-with-observerreplace-implicit-language-with-interpreterreplace-implicit-tree-with-compositereplace-inline-code-with-function-callreplace-loop-with-pipelinereplace-magic-literalreplace-nested-conditional-with-guard-clausesreplace-onemany-distinctions-with-compositereplace-parameter-with-queryreplace-primitive-with-objectreplace-query-with-parameterreplace-state-altering-conditionals-with-statereplace-subclass-with-delegatereplace-superclass-with-delegatereplace-temp-with-queryreplace-type-code-with-classreplace-type-code-with-subclassesreturn-modified-valueseparate-query-from-modifiershotgun-surgerysingletonslide-statementsspeculative-generalitysplit-loopsplit-phasesplit-variablestatestrategysubstitute-algorithmtemplate-methodtemporary-fieldunify-interfaces-with-adapterunify-interfacesvisitorCore skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
15 skills · hooks
Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your coding agent's context.
1 MCP server
Build powerful, stateful CLI interfaces for any GUI application using the cli-anything harness methodology.
5 commands
Automates browser interactions for web testing, form filling, screenshots, and data extraction
12 skills
Use Alibaba Open Code Review from local Codex.
2 skills
Claude Code skill for creating and presenting Slidev slidedecks
1 skill
This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.