ワンクリックで
refactor
// Structural refactoring pass on changed code. Use after implementing a feature to improve code structure, reduce duplication, and clean up APIs without changing behavior.
// Structural refactoring pass on changed code. Use after implementing a feature to improve code structure, reduce duplication, and clean up APIs without changing behavior.
Write or review UX microcopy for dashboard interfaces. Use when reviewing button labels, errors, empty states, dialogs, helper text, tooltips, toasts, onboarding, or any user-facing product copy.
Self-review your own work before committing. Fight entropy, ensure quality, leave the codebase better than you found it.
Generate or update CLI commands in cmd/api/ from the OpenAPI spec and Go SDK. Use when the API spec changes or new endpoints are added.
Use this skill when writing, editing, reviewing, or improving documentation in this repository. Activates for tasks involving content in `docs/product/` or `docs/engineering/`, MDX/Markdown files, or any documentation-related request.
Reviews restate handler code in svc/ctrl/worker to find restate client calls (service calls, state access, sleep, etc.) incorrectly placed inside restate.Run, restate.RunVoid, or restate.RunAsync closures. Use when reviewing restate handlers, checking restate.Run usage, or auditing worker service code.
| name | refactor |
| description | Structural refactoring pass on changed code. Use after implementing a feature to improve code structure, reduce duplication, and clean up APIs without changing behavior. |
Review the diff against main and perform a structural refactoring pass on all changed code in this branch.
Focus on:
Extract and consolidate: Pull repeated logic into shared functions. Merge near-duplicate code paths. Collapse unnecessary wrapper layers.
Improve structure: Flatten deep nesting. Break oversized functions into focused units. Move code closer to where it's used. Colocate related logic.
Clean up APIs and interfaces: Remove unused parameters, exports, and return values. Simplify function signatures. Make types tighter and more precise.
Reduce indirection: Inline trivial helpers that obscure intent. Remove pass-through functions that add no value. Shorten unnecessary call chains.
Fix naming: Rename variables, functions, and types so they say what they mean. Align naming with surrounding code conventions.
Rules:
Process:
git diff main...HEAD)