ワンクリックで
refactor
Code refactor to improve implementation details, only use when explicitly requested by user.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Code refactor to improve implementation details, only use when explicitly requested by user.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
React coding standards for this project. Use when writing or modifying React components, hooks, or route files.
Guides correct usage of the Rostra state management library (createStore, Store, useStore), including store scoping, selectors, optional access, prop-driven initialization, and typing. Use only when the user asks you to work with an existing rostra store or to implement a new one.
Use whenever the scope of your task touches the shopify package or its uses anywhere in the project.
TypeScript coding standards for this project. Use when writing or modifying TypeScript files.
| name | refactor |
| description | Code refactor to improve implementation details, only use when explicitly requested by user. |
This skill turns "it works" code into code that is robust, maintainable, and aligned with the project's standards. Instead of reading every rule yourself and trying to apply them all at once, delegate to subagents, one per skill. Each subagent becomes a deep expert on its skill and evaluates the current changes entirely through that lens.
The user may specify a scope — for example, "refactor the convex package" or "just look at the CMS app changes." When they do, pass that scope to each subagent so it only examines the relevant subset of changes.
If the user does not specify a scope, the default is the entire active change set (all staged and unstaged changes across the repo).
Look at which files were changed and determine which skills are necessary to refactor. Once you've figured that out, spawn one subagent per skill so that that specific subagent focuses solely on that one skill. IMPORTANT: Typically, changes don't require every single skill to be used, so make sure you don't use skills that aren't relevant to the changes made.
For each subagent, provide these instructions:
Role: You are a senior engineer mentoring a junior teammate. You have been given a skill that describes coding standards the team has agreed on. Your job is to deeply internalize every rule in the skill, study the current changes, and produce a thorough assessment of how the code should be overhauled to fully align with these standards.
Read-only constraint: Do NOT edit, create, or delete any files. Your only job is to read code, analyze it, and return findings.
Skill: Read the skill file and all of its reference files carefully and completely before doing anything else.
Getting the changes: Run git diff and git diff --cached to see the current change set. If the user specified a scope (e.g. a specific package or app), filter to only those paths — for example git diff -- packages/convex/ or git diff -- apps/cms/. Also read the full contents of every changed file so you have complete context, not just the diff hunks.
What to return: Report every single finding — no filtering, no prioritizing, no "I'll skip the small stuff." Every violation of the skill standards, from major architectural missteps down to the smallest style nit, must be included. Do not summarize or group findings to save space. Do not omit issues you consider minor. The main agent needs the complete, unabridged list to present to the user. Look for places where the implementation approach itself is wrong and needs to be overhauled — but also catch every small issue along the way. If the code uses the wrong patterns, the wrong architecture, the wrong abstractions - recommend ripping out the current approach and replacing it with one that properly aligns with the standards. Partial adjustments are not enough when the foundation is wrong. For each finding, include:
If no issues are found: Explicitly state that the current changes already satisfy the standards and no changes are needed.
Once all subagents have returned their findings, consolidate everything they reported. Identify overlaps, dependencies, and conflicts between findings from different skills. Do not leave out any details provided by subagents.
Present the combined findings to the user as a proposed plan. Ask the user questions about how they want to proceed — which findings to act on, which to skip, and any tradeoffs between competing concerns.
Different skills will sometimes recommend incompatible approaches for the same code. When this happens, do not resolve the conflict yourself. Present the conflict to the user, explain what each skill is asking for and why they are at odds, and let the user decide. Every conflict is its own question. Do not bundle multiple conflicts into a single question and do not silently pick a side.