원클릭으로
create-graphql-type
From a raw JSON payload, generate TypeScript `type` declarations (no interfaces) matching the project conventions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
From a raw JSON payload, generate TypeScript `type` declarations (no interfaces) matching the project conventions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Scan all GraphQL type files under libs/shared/src/graphQL/types/ to find duplicate or structurally equivalent sub-types across files, then consolidate them into shared declarations and replace local copies with imports.
Scaffold a new Filter or Processing node in the playlist-maker custom app. Use when the user asks to add, create, or scaffold a playlist-maker node, or wants to extend the set of nodes available in the playlist-maker editor. Handles the full wiring (type union, processor, React component, three mapping files, sidebar entry, test file). Filter and Processing categories only — Source and Result are out of scope.
SOC 직업 분류 기준
| name | create-graphql-type |
| description | From a raw JSON payload, generate TypeScript `type` declarations (no interfaces) matching the project conventions. |
Turn a raw JSON object into typed TypeScript type declarations for libs/shared/src/graphQL/.
The user either:
/create-graphql-type message, orAlways ask (separate question, do not batch): "What should the top-level exported type be named? (PascalCase, e.g. QueryNpvArtistData)"
Apply these rules recursively to every node in the JSON tree.
type per distinct object shapeFor every object value, create a named type. Do not inline object shapes beyond one level of nesting. Name sub-types by concatenating the parent name + the key in PascalCase (e.g. Artist → ArtistProfile for the profile key).
type, never interfaceEmit type Foo = { … }. Never interface.
type Foo = … without export).Use TypeName[] (never Array<TypeName>).
| JSON value | TypeScript |
|---|---|
"some string" | string |
42 / 3.14 | number |
true / false | boolean |
null | null (add | null to the field) |
"spotify:track:…" / "spotify:artist:…" etc. | `spotify:track:${string}` (template literal) |
__typename discriminantsIf a field is named __typename and its value is a non-empty string, type it as the string literal: __typename: 'Artist', not __typename: string.
If an array in the JSON is empty ([]), type its element as unknown.
If an object value is {}, type it as unknown.
Emit a single fenced TypeScript block with the complete file content.
Input JSON:
{
"queryNpvArtist": {
"artist": {
"__typename": "Artist",
"uri": "spotify:artist:abc",
"profile": { "name": "Daft Punk" },
"visuals": {
"avatarImage": {
"sources": [
{ "url": "https://…", "width": 640, "height": 640 }
]
}
}
}
}
}
Top-level name: QueryNpvArtistData
Expected output:
export type QueryNpvArtistData = {
queryNpvArtist: QueryNpvArtist;
};
type QueryNpvArtist = {
artist: Artist;
};
type Artist = {
__typename: 'Artist';
uri: `spotify:artist:${string}`;
profile: ArtistProfile;
visuals: ArtistVisuals;
};
type ArtistProfile = {
name: string;
};
type ArtistVisuals = {
avatarImage: ArtistVisualsAvatarImage | null;
};
type ArtistVisualsAvatarImage = {
sources: ArtistVisualsAvatarImageSource[];
};
type ArtistVisualsAvatarImageSource = {
url: string;
width: number;
height: number;
};
.prettierrc).consistent-type-imports: use import type { … } for type-only imports.interface.