소스 정보
- 저장소
- ubaniak/scoreboard
- 최근 소스 활동
- 2026년 4월 25일 12:58
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ubaniak/scoreboard --skill frontend-style명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | frontend-style |
| description | when developing a front-end feature follow this style guide |
You are helping the user add or modify React/TypeScript frontend code in the scoreboard project. Apply the patterns below exactly. Read existing files before writing anything new.
src/
api/ ← one file per domain, all React Query hooks + type exports
entities/ ← shared TypeScript types (mirrors backend response shapes)
pages/ ← one file per route, data-fetching only (no markup)
components/ ← UI, grouped by domain folder
layouts/ ← page shell components (PageLayout, AppLayout, etc.)
providers/ ← React context (login, timer)
hooks/ ← shared custom hooks
Small and single-use. Each component file does one thing. If a component is getting large, split it: extract a named sub-component into its own file in the same folder. Do not define multiple exported components in one file. Do not build generic/reusable abstractions unless the same markup is genuinely needed in 3+ places.
No data fetching inside components. All useQuery / useMutation calls live in the page or in a component that is explicitly a "container" (rare). Regular UI components receive data and callbacks as props only.
Props type at the top of the file, unexported:
type FooProps = {
name: string;
onSubmit: (value: string) => void;
};
export const Foo = ({ name, onSubmit }: FooProps) => { … };
Scoreboard / public display components (under components/current/) use inline style objects — no Ant Design. Admin UI components use Ant Design.
src/api/<domain>.ts)One file per backend domain. Structure:
// 1. query key factory (keeps invalidation consistent)
const keys = {
all: (token: string) => ["domain", token] as const,
list: (token: string) => [...keys.all(token), "list"] as const,
get: (token: string, id: string) =>
[...keys.all(token), `get-${id}`] as const,
};
// 2. query hooks — useGet*, useList*
export const useListFoos = (props: TokenBase) =>
useQuery({
queryKey: keys.list(props.token),
enabled: !!props.token,
queryFn: () =>
fetchClient<Foo[]>(`${baseUrl}/api/foos`, {
headers: { Authorization: `Bearer ${props.token}` },
}),
});
// 3. mutation hooks — useMutate*
= () => {
queryClient = ();
({
:
(, {
: ,
: {
: ,
: ,
},
: .(body),
}),
:
queryClient.({ : keys.(props.) }),
});
};
Authorization: Bearer ${token} in headers.Content-Type: application/json only for JSON bodies — omit it for FormData.onSuccess invalidates the narrowest relevant key (prefer keys.list over keys.all).export type CreateFooProps = { … }.src/api/entities.ts:
TokenBase, CardRequestType, BoutRequestType, RoundRequestType.src/entities/<domain>.ts)Plain TypeScript types mirroring backend JSON response shapes. No classes, no methods. Optional fields use ?, never | undefined explicitly.
export type Foo = {
id: string;
name: string;
status: FooStatus;
imageUrl?: string;
};
export type FooStatus = "active" | "completed";
src/pages/<name>.tsx)Pages are the only place that call hooks from src/api/. They assemble data and pass it down as props. Keep pages thin — no significant markup, no business logic beyond wiring callbacks.
export const FooPage = () => {
const { token } = useProfile();
const foos = useListFoos({ token });
const createFoo = useMutateCreateFoo({ token });
return (
<PageLayout
title="Foos"
breadCrumbs={[{ title: <a href="/">home</a> }, { title: "foos" }]}
>
<FooList
foos={foos.data ?? []}
loading={foos.isLoading}
onCreate={(v) => createFoo.mutate(v)}
/>
</PageLayout>
);
};
const { cardId } = useParams({ strict: false }).const { token } = useProfile().src/App.tsx as createRoute(…) entries.Use PageLayout for standard admin pages:
<PageLayout
title="Page Title"
subTitle={<SomeSummaryComponent />}
action={<SomeActionButtons />}
breadCrumbs={[{ title: <a href="/">home</a> }, { title: "current" }]}
>
{/* page body */}
</PageLayout>
Scoreboard / public display routes get a full-screen fixed-inset div with background: "#0b0f1a" — no PageLayout.
| Thing | Convention |
|---|---|
| Query hook | useGet<Entity>, useList<Entities> |
| Mutation hook | useMutate<Verb><Entity> |
| Component | PascalCase matching the filename |
| Props type | <ComponentName>Props, unexported |
| Page component | <Name>Page |
| Entity type file | lowercase singular: bout.ts, card.ts |
| API file | lowercase plural: bouts.ts, cards.ts |
useQuery or useMutation inside a UI component — only in pages.components/current/).Content-Type: application/json when the body is FormData.src/entities/.useState for data that comes from the server — that's what React Query is for.