원클릭으로
react-component
Use when creating or modifying React components (.tsx files). Enforces component structure, import order, and hooks patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when creating or modifying React components (.tsx files). Enforces component structure, import order, and hooks patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | react-component |
| description | Use when creating or modifying React components (.tsx files). Enforces component structure, import order, and hooks patterns. |
Follow this order in every component file:
// 1. External imports
import { useState } from 'react';
import { useQuery } from '@tanstack/react-query';
// 2. Internal shared imports
import { Button } from '@/shared/ui/button';
import { useAuth } from '@/shared/hooks/useAuth';
// 3. Feature-specific imports
import { usePostEditor } from '../hooks/usePostEditor';
// 4. Types
interface PostEditorProps {
boardId: string;
initialContent?: string;
}
// 5. Component
export function PostEditor({ boardId, initialContent }: PostEditorProps) {
// hooks first
// derived state
// handlers
// render
}
Place business logic in [feature]/hooks/:
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { createPost } from '../api/post';
export function usePostEditor(boardId: string) {
const queryClient = useQueryClient();
const createMutation = useMutation({
mutationFn: (data: CreatePostData) => createPost(boardId, data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['posts', boardId] });
},
});
return { createMutation };
}
import { Component } from '@/shared/components/Component';
import { useHook } from '@board/hooks/useHook';
import { Post } from '@post/model/Post';
// Available: @/, @board/, @post/, @comment/, @draft/,
// @notification/, @user/, @shared/, @login/, @stats/
| Location | Purpose |
|---|---|
[feature]/components/ | React components |
[feature]/hooks/ | Custom hooks with business logic |
[feature]/model/ | TypeScript types |
@/shared/ui/ | shadcn/ui components |
@/shared/hooks/ | Shared hooks |
Launch recipe for the daily-writing-friends web app (apps/web — Vite + React + React Router, dev server on http://localhost:5173). Use to build and run the app locally so /run and /verify can drive the real UI. Captures the mandatory nvm node-22 PATH prefix (the default Homebrew node is broken), the dev-server command and port, backend selection (cloud vs local Supabase), and the static gate commands (type-check, tests).
Use after UI/frontend changes — layout, responsive behavior, navigation/routing, or any user-facing flow — to prove it actually works by driving a real headless browser (Playwright) against the running dev server. Asserts behavior (clicks, URL changes, visible text), measures layout (alignment via bounding boxes, overflow via scrollWidth minus clientWidth), captures console/page errors, and saves screenshots. Reach for this whenever "it type-checks and the unit tests pass" does not prove the feature renders and behaves correctly in a browser. Complements verify-runtime (which checks data-flow via dev logs).
Use when writing or modifying page-level layout markup in apps/web — max-width containers, flex rows, vertical spacing — or composing multiple sections on a page. Enforces shared/ui layout primitives (ReadingColumn, Stack, Row) and compound-component slots over scattered Tailwind classes.
Use when the user wants to improve daily-writing-friends production Web Vital scores (LCP/FCP/CLS) by running additional iterations of the local perf harness to drive the overall F2 score higher. Triggers - "web vital 개선", "LCP 줄여", "F2 점수 올려", "harness 한 번 더 돌려", "perf 개선 작업", "perf iteration", "drive score up".
Fetch and compare per-route p75 Web Vitals (LCP/FCP/CLS) from Sentry Discover for the daily-writing-friends production project, with an F2-weighted score and pre/post-deploy diff. Use when the user wants to verify whether performance improved or regressed after a deploy, compare pre/post-merge windows for a PR, identify the worst-performing routes for the next perf push, or sanity-check a Web Vitals claim. Triggers - "web vital 확인해줘", "p75 비교", "회귀 있나", "perf 점수", "이 PR 머지 후 LCP 어떻게 됐어", "sentry에서 가져와".
Use when writing tests for React components or custom hooks that touch the React Query cache, MSW-mocked Supabase, or React Router data-router loaders. Triggers - writing component tests, writing hook tests that need a provider tree, creating MSW handlers, render() + screen assertions, data-fetching component tests, form integration tests, loader/errorElement tests, optimistic-mutation tests. Does NOT cover pure-function unit tests (use the testing skill) or cross-page journeys (use Playwright E2E).