agents/skills/coobeyon-refactor/SKILL.md
Refactor codebases by collapsing orchestration, tightening typed boundaries, deleting broad context leakage, and adding ratchet tests
npx skillsauth add carterdea/dots coobeyon-refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user wants to clean up a codebase, simplify architecture, migrate a boundary, remove stale layers, or make agent/application code easier to reason about. The goal is not cosmetic refactoring. The goal is to make ownership, trust, data flow, and test surfaces explicit.
Do not mention this skill name, its origin, or any person in code comments, commit messages, PR descriptions, docs, or user-facing project text. Treat the skill name as an invocation label only.
rg to inventory those concepts across production code and tests.Look for chains where each layer mostly delegates to the next layer. Prefer one narrow runtime loop or coordinator that calls owned capability modules.
Signals:
Move toward:
Find objects that carry too many unrelated facts through too many layers. These usually hide ownership, make callers accidentally powerful, and blur the difference between request data and trusted facts.
Common smells:
Move toward:
Do not leave policy decisions, shared domain rules, or response shaping in orchestration code.
Examples of ownership:
When two surfaces share behavior, extract the domain rule into a neutral module instead of letting one surface import from the other. Keep the primitive free of route, component, framework, and product-flow assumptions unless those assumptions are the domain.
After introducing the new boundary, remove or quarantine old fallback paths. Make lifecycle behavior explicit instead of leaving permanent compatibility paths or timers.
Look for:
Move toward:
Every cleanup should make regression difficult.
Useful ratchets:
When an inventory allowlist exists, shrink it as migration work completes.
When a fix depends on a non-obvious invariant, write a short note in the repo's existing documentation system.
Use this shape:
The note should make the next maintainer find the rule before they rediscover the bug.
rg.When reporting back, include:
Do not describe the work as copying a person. Describe the architectural principle and the local codebase effect.
development
Add net-new product, workflow, platform, or developer-experience features as small vertical slices. Use this skill whenever the user asks to build a new feature, add a new page/route/API/workflow/job/eval/operator path, enrich an existing feature with a new user-visible capability, or plan feature architecture before coding. This skill maps the files to change or create, defines the authoritative contract, specifies tests, and gives a QA plan before treating the feature as done.
development
Verify a developer's finished Trello ticket on a non-Shopify web app and render a verdict. Dogfood the posted preview (desktop + mobile) against the card's acceptance criteria, then PASS it (approve the PR, move to Ready for Release) or FAIL it (request changes, attach repro, reassign the dev, move to Development). Read-only: never implements, commits, or opens a PR. Use when asked to 'QA this card', 'test before release', or 'sign off on this ticket'. Shopify themes use shopify-trello-qa; building a ticket uses trello-delivery.
development
Verify a developer's finished Shopify theme ticket and render a verdict. Dogfood the posted preview theme and Customizer (desktop + mobile) against the card's acceptance criteria and Figma, then PASS it (approve the PR, move to Ready for Release) or FAIL it (request changes, attach repro, reassign the dev, move to Development). Read-only: never implements, commits, deploys, or opens a PR. Use when asked to 'QA this Shopify card', 'verify the Ready for Testing card', or 'sign off on this theme ticket'. Non-Shopify apps use trello-qa; building a ticket uses shopify-trello-delivery.
development
Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.