en un clic
style-set-review
Style-Set 코드를 v2.0.0+ 컨벤션에 맞게 리뷰하고 개선 제안
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Style-Set 코드를 v2.0.0+ 컨벤션에 맞게 리뷰하고 개선 제안
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
새 컴포넌트의 StyleSet을 v2.0.0+ 컨벤션에 맞게 생성
Invoked manually via /write-readme. Generates README.md (English) and README.ko.md (Korean) from Vlossom source code. Supports all document types: components (vs-*), plugins, directives, composables (use*), and utility functions. Do NOT trigger automatically — only run when explicitly called with /write-readme <target>.
Use when vlossom feature/fix/removal work is done and commits are ready, to identify missing documentation files (tests, README, stories, markdown) and amend them back into the appropriate commits via interactive rebase with per-commit user confirmation.
Basé sur la classification professionnelle SOC
| name | style-set-review |
| description | Style-Set 코드를 v2.0.0+ 컨벤션에 맞게 리뷰하고 개선 제안 |
기존 컴포넌트의 StyleSet 구현이 v2.0.0+ 컨벤션 ( extends CSSProperties + $ prefix) 을 따르는지 검증하고 개선 방안을 제시합니다.
VsXxxStyleSet은 CSSProperties를 상속하며 키는 $ prefix 유무로 구분됩니다.
| 키 형태 | 처리 |
|---|---|
width, padding, ... (non-$) | 루트에 inline style → componentInlineStyle |
$X (string/number) | CSS 변수 --vs-{kebab-component}-X → styleSetVariables |
$X (object) | 슬롯/요소 또는 하위 StyleSet → componentStyleSet.$X |
export interface VsButtonStyleSet extends CSSProperties {
$padding?: string;
$content?: CSSProperties;
$loading?: VsLoadingStyleSet;
}
자세한 규칙: STYLE_SET_GUIDELINES.md
types.ts — StyleSet 인터페이스[Component].vue — useStyleSet 사용, template 바인딩[Component].css — CSS 변수 및 fallbackREADME.md / README.ko.md — Types 섹션이 최신 인터페이스를 반영하는지types.ts)기본 구조
Vs[ComponentName]StyleSet인가?extends CSSProperties로 선언되어 있는가?component?: CSSProperties 같은 래퍼 키가 없는가? (root는 extends로 이미 노출됨)variables?: { ... } 구조가 남아있지 않은가?$ prefix를 갖는가?$X 노출 기준 (4가지 모두 충족해야 함)
.css에서 실제로 사용되는가? (calc, 의사 요소, 상태 셀렉터)위 조건을 만족 못 하는 속성은
$X로 노출하지 말 것. 사용자는 root CSSProperties로 임의 스타일을 자유롭게 줄 수 있다.
ColorScheme 충돌
$backgroundColor, $fontColor)을 $X로 노출하지 않았는가? (ColorScheme이 담당)네이밍
$step.$active ✅, $activeStep ❌)$content ✅, $expand ❌)$styles, $config ❌)중첩 깊이
$X (object) → 자식 StyleSet은 허용)하위 컴포넌트
$wrapper?: VsInputWrapperStyleSet가 포함되었는가?타입 안전성
CSSProperties['property'] & {} 패턴인가?.vue)useStyleSet 사용
componentStyleSet, styleSetVariables, componentInlineStylebaseStyleSet이 고정값이면 ref({...})를, 다른 props에 반응해야 하면 computed(() => ({...}))를 사용했는가?additionalStyleSet은 props에서 파생된 동적 값에만 사용했는가? (불필요하게 사용자 styleSet을 덮어쓰지 않는가)Template 바인딩
:style="{ ...styleSetVariables, ...componentInlineStyle }" 패턴인가?componentStyleSet.$X를 :style로 바인딩했는가?componentStyleSet.$X를 :style-set로 전달했는가?computed로 base + 상태 스타일을 머지해 적용하는가?기타
.css)변수 정의
--vs-{component-kebab}-{property} 형식인가?$X primitive에 대응하는 변수가 선언되고 실제로 사용되는가?값 사용
var(--vs-comp-bg) 등)을 우선 사용하는가?README.md의 Types 섹션이 최신 인터페이스를 그대로 반영하는가?$X, root CSSProperties)을 따르는가?❌ 1. 옛 variables?: {} / component?: 구조
// BAD
export interface VsButtonStyleSet {
variables?: { padding?: string };
component?: CSSProperties;
loading?: VsLoadingStyleSet;
}
// GOOD
export interface VsButtonStyleSet extends CSSProperties {
$padding?: string;
$content?: CSSProperties;
$loading?: VsLoadingStyleSet;
}
❌ 2. 래퍼 키 (root CSSProperties 중복 노출)
// BAD — extends CSSProperties와 중복
export interface VsBoxStyleSet extends CSSProperties {
component?: CSSProperties;
}
❌ 3. 과도한 $X 노출
// BAD — .css에서 변수로 쓰이지 않는데 노출
export interface VsButtonStyleSet extends CSSProperties {
$width?: string;
$height?: string;
$margin?: string;
$backgroundColor?: string;
$boxShadow?: string;
}
// GOOD — root CSSProperties로 충분; 진짜 필요한 것만 $X
export interface VsButtonStyleSet extends CSSProperties {
$content?: CSSProperties;
$loading?: VsLoadingStyleSet;
}
❌ 4. ColorScheme 영역 침범
// BAD — 테마 색상은 ColorScheme이 담당
$backgroundColor?: string;
$fontColor?: string;
❌ 5. State 수식어 flatten
// BAD
$step?: CSSProperties;
$activeStep?: CSSProperties;
$stepActive?: CSSProperties;
// GOOD — nested-state
$step?: CSSProperties & {
$active?: CSSProperties;
};
❌ 6. 동작 기반 네이밍
// BAD — 무엇을 '하는지'
$expand?: CSSProperties;
// GOOD — 무엇'인지'
$content?: CSSProperties;
❌ 7. CSS에서 모든 것을 변수로
/* BAD */
.vs-button {
--vs-button-backgroundColor: initial;
--vs-button-border: initial;
--vs-button-borderRadius: initial;
--vs-button-padding: initial;
background-color: var(--vs-button-backgroundColor, var(--vs-comp-bg));
border: var(--vs-button-border, 1px solid var(--vs-line-color));
}
/* GOOD */
.vs-button {
--vs-button-padding: initial;
background-color: var(--vs-comp-bg);
border: 1px solid var(--vs-line-color);
padding: var(--vs-button-padding, 0.75rem 1.5rem);
}
❌ 8. 인터페이스와 CSS 변수 불일치
$arrowSize 있지만 CSS에 --vs-x-arrowSize가 없거나, 반대로 CSS에는 있지만 인터페이스에 없는 경우.❌ 9. 루트 inline style spread 누락
<!-- BAD — componentInlineStyle 누락 → 사용자가 root CSS를 넣어도 안 먹음 -->
<div :style="styleSetVariables">
<!-- GOOD -->
<div :style="{ ...styleSetVariables, ...componentInlineStyle }">
❌ 10. px 단위 남용
/* BAD */
padding: 12px 16px;
font-size: 14px;
/* GOOD */
padding: 0.75rem 1rem;
font-size: var(--vs-size-font);
각 문제마다:
# Style-Set 리뷰: [ComponentName]
## 📊 요약
- 검증 항목: X개
- ✅ 통과: Y개
- ⚠️ 개선 필요: Z개
## ✅ 잘된 점
- ...
## ⚠️ 개선이 필요한 부분
### 1. [문제 제목]
**파일**: `path/to/file.ts:line`
**문제**: [현재 코드]
**이유**: [어떤 원칙 위반]
**개선안**: [수정된 코드]
**효과**: [이점]
## 📈 개선 후 기대 효과
- API 표면적 X% 감소 등
export interface VsCardStyleSet {
variables?: {
width?: string;
backgroundColor?: string;
padding?: string;
};
component?: CSSProperties;
title?: { backgroundColor?: string; padding?: string };
}
## ⚠️ 개선이 필요한 부분
### 1. 옛 `variables / component` 구조 사용
**파일**: `types.ts:1-9`
**문제**: v2.0.0+ 컨벤션은 `extends CSSProperties` + `$` prefix.
**개선안**:
\`\`\`typescript
export interface VsCardStyleSet extends CSSProperties {
$title?: CSSProperties;
}
\`\`\`
- `width`, `padding` 등은 root CSSProperties로 자동 노출됨.
- `backgroundColor`는 ColorScheme이 담당 (제거).
- `$title.backgroundColor`도 사용자가 직접 줄 수 있으니 `$title: CSSProperties`로 단순화.
**효과**:
- API 표면적 70% 감소
- ColorScheme과 일관성
- 사용자가 root CSS를 자유롭게 전달 가능
/style-set-review VsButton
/style-set-review packages/vlossom/src/components/vs-card