ワンクリックで
component-refactoring
Refactor high-complexity React components. Use when complexity metrics are high or to split monolithic UI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Refactor high-complexity React components. Use when complexity metrics are high or to split monolithic UI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Act as a technical co-founder to turn a product idea into a shippable v1. Use when a user asks to build an app/product, ship an MVP, launch, or wants a technical cofounder style workflow (discovery, scope, plan, staged build, polish, handoff).
Comprehensive backend development skill for building scalable backend systems using Python (FastAPI), Postgres, Redis, and more. Includes API design, database optimization, security implementation, and performance tuning.
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). PROACTIVE ACTIVATION when cacheComponents config is detected.
When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' or 'competitive landing pages.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.
Automates the creation of detailed, well-formatted Pull Requests using the GitHub CLI. Parses conventional commits to generate titles and descriptions.
Expert guidance for designing, implementing, and maintaining cloud infrastructure using Experience in Infrastructure as Code (IaC) principles. Use this skill for architecting cloud solutions, setting up CI/CD pipelines, implementing observability, and following SRE best practices.
| name | component-refactoring |
| description | Refactor high-complexity React components. Use when complexity metrics are high or to split monolithic UI. |
Refactor high-complexity React components with proven patterns and workflows.
Complexity Threshold: Components with cyclomatic complexity > 50 or line count > 300 should be candidates for refactoring.
Use When:
pnpm analyze-component shows high complexity.Goal: Separate UI from State/Logic.
Before:
function UserList() {
const [users, setUsers] = useState([]);
const [loading, setLoading] = useState(false);
useEffect(() => {
setLoading(true);
fetch('/api/users').then(data => {
setUsers(data);
setLoading(false);
});
}, []);
if (loading) return <Spinner />;
return <ul>{users.map(u => <li key={u.id}>{u.name}</li>)}</ul>;
}
After:
// hooks/useUsers.ts
function useUsers() {
return useQuery({ queryKey: ['users'], queryFn: fetchUsers });
}
// UserList.tsx
function UserList() {
const { data: users, isLoading } = useUsers();
if (isLoading) return <Spinner />;
return <UserListView users={users} />;
}
Goal: Break down monolithic JSX.
Before:
function Dashboard() {
return (
<div>
<header>...</header>
<aside>...</aside>
<main>
<section className="stats">...</section>
<section className="feed">...</section>
</main>
</div>
);
}
After:
function Dashboard() {
return (
<Layout>
<DashboardHeader />
<DashboardSidebar />
<DashboardContent>
<StatsWidget />
<ActivityFeed />
</DashboardContent>
</Layout>
);
}
Goal: Reduce nesting and if/else checks implementation details.
Goal: Centralize modal state and logic.
<ModalManager /> or context if reused globally.isOpen state locally if specific to a single component, but extract the Modal content to a separate file.