| name | insane-design |
| description | Extract a deterministic design system from any URL by fetching real CSS, parsing custom properties, and writing a 19-section design.md plus an interactive report.ko.html. Also exports design.md frontmatter to W3C DTCG tokens.json. Use when the user wants real CSS tokens, a reusable design reference, design tokens, or a design pack that feeds apply/build flows. Korean triggers โ "๋์์ธ ๋ถ์ํด์ค", "์ด ์ฌ์ดํธ ๋์์ธ ์์คํ
๋ฝ์์ค", "CSS ๋ฏ์ด๋ด", "design.md ๋ง๋ค์ด์ค", "๋ ํผ๋ฐ์ค ๋ฆฌํฌํธ ๋ง๋ค์ด์ค", "์ฌ์ดํธ ๋ถ์", "๋์์ธ ํ ํฐ ์ถ์ถ", "tokens.json ๋ด๋ณด๋ด์ค". English triggers โ "analyze design", "extract design tokens", "rip the design system", "what CSS does this site use", "export DTCG tokens". |
Insane Design for Codex (analysis + export)
URL ํ๋ โ ์ค์ CSS ๊ธฐ๋ฐ design.md + ์ธํฐ๋ํฐ๋ธ report.ko.html.
design.md frontmatter โ W3C DTCG tokens.json export๋ ์ด ์คํฌ์ด ๋ด๋นํ๋ค.
์ด ๋ฌธ์๋ ์ฐธ๊ณ ๋ฌธ์๊ฐ ์๋๋ผ ์คํ ์ง์์๋ค. URL์ด ์ ๊ณต๋๋ฉด ์ฆ์ Step 1๋ถํฐ ์คํํ๋ค.
Persona
You are an expert designer. The user is acting as your manager โ they bring
constraints, brand context, and veto power, but you drive aesthetic commit.
Never hedge; pick one BOLD direction and defend it.
์ ์ฒด ๊ณ์ฝ: $PLUGIN_ROOT/skills/insane-design/shared/README.md ยง1 Identity.
Modes (์ด ์คํฌ ๋ด๋ถ ๋ถ๊ธฐ)
- analysis (๊ธฐ๋ณธ): URL โ design.md + report.ko.html (์๋ 7-Step)
- export: ์ด๋ฏธ ๋ง๋ design.md โ tokens.json (DTCG). ์๋ "Export ๋ชจ๋" ์ฐธ์กฐ.
apply์ build๋ ๋ณ๋ ์คํฌ(insane-apply, insane-build)์ด๋ค.
Codex ์ํธ์์ฉ ๊ท์น (ยงA)
Codex CLI์๋ AskUserQuestion ์นด๋ UI๊ฐ ์๋ค. ์ง๋ฌธ์ด ํ์ํ๋ฉด
shared/questioning-policy.md ยงA์ ์ฑํ
๋ฒํธ ๋ธ๋ก์ผ๋ก ๋์ฒดํ๋ค.
- analysis๋ ์ธํฐ๋ทฐํ์ด ์๋๋ผ ์ถ์ถํ์ด๋ค. URL๊ณผ ์ถ๋ ฅ ๋ฃจํธ๊ฐ ๋ช
ํํ๋ฉด ์ง๋ฌธ ์์ด ์งํํ๊ณ ,
์ถ๋ก ๊ฐ๋ฅํ ๊ฑด ๋ฌป์ง ์๋๋ค(ยง1 "์ถ๋ก ๊ฐ๋ฅํ ๊ฑด ์ ๋ฌป๊ธฐ").
- URL/์ถ๋ ฅ ๋ฃจํธ๊ฐ ๋ชจํธํ ๋๋ง ยงA ๋ฒํธ ๋ธ๋ก์ผ๋ก 1ํ ํ์ธํ๋ค(์ถ์ฒ์์ 1๋ฒ์).
- ํ ํฐ/์/ํฐํธ๋ ์ถ์ถํ๋ค โ ํ๊ฐ์ผ๋ก ๋ง๋ค์ง ์๋๋ค.
์ฌ์ ์ค๋น (ํ์ Step์์ Read)
$PLUGIN_ROOT/skills/insane-design/references/schema.v3.2.md โ frontmatter+์น์
๋จ์ผ ์ง์ค ์์ฒ (Step 0, ๊ฐ์ฅ ๋จผ์ Read ํ์)
$PLUGIN_ROOT/skills/insane-design/references/template.md โ design.md 19์น์
v3.2 ํ
ํ๋ฆฟ (Step 5)
$PLUGIN_ROOT/skills/insane-design/references/narrative-vocabulary.md โ ยง00 archetype metaphor ์นดํ๋ก๊ทธ (Step 4 ยง00 ์์ฑ)
$PLUGIN_ROOT/skills/insane-design/references/report-prompt.md โ HTML ๋ฆฌํฌํธ ์์ฑ ๊ท์น (Step 6)
$PLUGIN_ROOT/skills/insane-design/references/report.css โ canonical CSS (Step 6)
$PLUGIN_ROOT/skills/insane-design/references/pitfalls.md โ 14๊ฐ์ง ํจ์ (Step 4)
$PLUGIN_ROOT/skills/insane-design/references/data-collection.md โ fetch ์์ค์ปฌ๋ ์ด์
์์ธ (Step 2)
$PLUGIN_ROOT/skills/insane-design/examples/stripe/design.md โ ๊ณจ๋ ์คํ ๋ค๋ (Step 5 ์ฐธ์กฐ, ์์ผ๋ฉด)
์ํฌํ๋ก์ฐ โ 7 Steps
๊ฒฝ๋ก ๊ท์น: ๋ชจ๋ ์ฐ์ถ๋ฌผ์ ํ๋ก์ ํธ ๋ฃจํธ ๊ธฐ์ค insane-design/{slug}/ ํ์์ ์ ์ฅ.
Step ์คํ ์ WORK_DIR์ ํ์ ํ๋ค. ํ๋ฌ๊ทธ์ธ ์์ฐ์ $PLUGIN_ROOT/...(์ฝ๊ธฐ ์ ์ฉ).
WORK_DIR="$(pwd)"
Step 1: INIT โ script
-
URL์์ slug ์ถ์ถ (๋๋ฉ์ธ โ kebab-case: stripe.com โ stripe).
-
URL ๊ฒ์ฆ (๋ณด์ ํ์):
http:// / https:// ํ๋กํ ์ฝ ํ์ธ
localhost, 127.0.0.1, file:// ์ฐจ๋จ
- ์
ธ ๋ฉํ๋ฌธ์(
` $ ( ) ; | & > <) ํฌํจ ์ ๊ฑฐ๋ถ
- ์ดํ ๋ชจ๋ ๋ช
๋ น์์ URL์ ํฐ๋ฐ์ดํ๋ก:
"$URL"
-
๋งค์ฒด(medium) ๊ฐ์ง (frontmatter์ฉ):
| ์
๋ ฅ ํจํด | medium | confidence |
|---|
.pptx/.ppt๋ก ๋๋จ | slide | high |
docs.google.com/presentation/* | slide | high |
*.pdf๋ก ๋๋จ | print | high (์คํ
) |
*.figma.com/file/* (DS ํ์ง ์) | design-system | medium |
| ์ด๋ฏธ์ง ์
๋ก๋ + ์ ์ฌ๊ฐ | card-news | medium |
| ๊ทธ ์ธ ์ผ๋ฐ URL | web | high (๊ธฐ๋ณธ) |
-
Archetype ๊ฐ์ง (ํ์ #21 โ 11 enum + freeform): ๋๋ฉ์ธ ๋ / meta tag(og:type) /
hero ์ฒซ์ธ์์ผ๋ก ๋ถ๋ฅ. enum: commerce-marketplace / editorial-product / editorial-magazine /
app-dashboard / saas-marketing / landing-utility / documentation-site / portfolio-personal /
automotive / luxury-brand / other. archetype_confidence: high/medium/low.
-
์ถ๋ ฅ ๋๋ ํ ๋ฆฌ ์์ฑ (์ ๋ ๊ฒฝ๋ก):
mkdir -p "$WORK_DIR/insane-design/{slug}/"{screenshots,css,phase1}
-
์์ ์๋ฆผ: ๐จ {slug} ๋์์ธ ๋ถ์์ ์์ํฉ๋๋ค. URL: {url} ยท ์์ 3-5๋ถ.
Step 2: FETCH โ script
HTML/CSS์ ์คํฌ๋ฆฐ์ท์ ์์งํ๋ค. ์์ธ ์์ค์ปฌ๋ ์ด์
: references/data-collection.md.
์ฑ๊ณต ํ์ ํจ์ (๋ชจ๋ tier ์ ์ฉ):
html_ok() {
local f="$1"
[ -s "$f" ] || return 1
[ "$(wc -c < "$f")" -ge 5000 ] || return 1
grep -q "<html" "$f" || return 1
grep -qiE "challenge-error-text|cf_chl_opt|__cf_chl_jschl|verify you are human|checking your browser" "$f" && return 1
return 0
}
css_ok() {
local f="$1"
[ -s "$f" ] || return 1
[ "$(wc -c < "$f")" -ge 200 ] || return 1
grep -qiE "DOCTYPE HTML|403 ERROR|Access Denied|Request could not be satisfied|challenge-error-text" "$f" && return 1
return 0
}
HTML 6-tier ์์ค์ปฌ๋ ์ด์
:
URL="{url}"; OUT="$WORK_DIR/insane-design/{slug}/index.html"
curl -sL -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" \
-H "Accept-Language: en-US,en;q=0.9" --compressed --max-time 30 -o "$OUT" "$URL"
if ! html_ok "$OUT"; then
curl -sL -A "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1" \
--compressed --max-time 30 -o "$OUT" "$URL"; fi
if ! html_ok "$OUT"; then
curl -sL --max-time 45 -H "X-Return-Format: html" "https://r.jina.ai/$URL" -o "$OUT"; fi
CSS ์์ง: HTML์์ href="*.css" ์ถ์ถ โ ๋ค์ด๋ก๋ โ css_ok ์คํจ ์ curl_cffi โ
Wayback fallback. CSS 0๊ฐ๋ฉด ์ธ๋ผ์ธ <style> ์ถ์ถํ์ฌ css/_inline.css๋ก ์ ์ฅ.
์คํฌ๋ฆฐ์ท: 1์ฐจ Jina(X-Respond-With: screenshot + X-Wait-For: 5000) โ PIL crop
(screenshots/hero-cropped.png). 2์ฐจ playwright fallback(์ค์น ์, < 50KB์ผ ๋).
์์ง ์คํจ ์ฒ๋ฆฌ: HTML ์ tier ์คํจ โ "์ ๊ทผ ๋ถ๊ฐ" + ์ค๋จ. CSS 0๊ฐ โ ๊ฒฝ๊ณ ํ hex frequency๋ก ์งํ.
์คํฌ๋ฆฐ์ท ์คํจ โ ๊ฒฝ๊ณ ํ ๊ณ์.
Step 3: EXTRACT โ script
CSS์์ ํ ํฐ ์ถ์ถ. $WORK_DIR์์ ๋ฐ๋์ ์ด ์์๋ก:
cd "$WORK_DIR"
python3 "$PLUGIN_ROOT/skills/insane-design/scripts/var_resolver.py" {slug}
python3 "$PLUGIN_ROOT/skills/insane-design/scripts/brand_candidates.py" {slug}
python3 "$PLUGIN_ROOT/skills/insane-design/scripts/typo_extractor.py" {slug}
python3 "$PLUGIN_ROOT/skills/insane-design/scripts/alias_layer.py" {slug}
๊ฒฐ๊ณผ: insane-design/{slug}/phase1/์ 4๊ฐ JSON (brand_candidates / resolved_tokens / typography / alias_layer).
ยง11 Layout / ยง12 Responsive / ยง13 Components๋ ์คํฌ๋ฆฝํธ๋ก ์ถ์ถํ์ง ์๋๋ค. Step 4์์
Claude/Codex๊ฐ CSS๋ฅผ ์ง์ ์ฝ๊ณ ํ๋จํ๋ค.
CSS custom properties 0๊ฐ๋ฉด: "CSS ํ ํฐ ๋ถ์กฑ" ๊ฒฝ๊ณ ํ hex frequency ๊ธฐ๋ฐ์ผ๋ก ์ ํ.
Step 4: INTERPRET โ prompt (๋ฉํฐ๋ชจ๋ฌ)
์คํฌ๋ฆฐ์ท + ์ถ์ถ ๊ฒฐ๊ณผ + CSS ์๋ณธ์ ์ง์ ์ฝ๊ณ ํ์ ํ๋ค.
- Read
insane-design/{slug}/screenshots/hero-cropped.png
- Read
phase1/brand_candidates.json, phase1/typography.json, phase1/alias_layer.json
- Read
$PLUGIN_ROOT/skills/insane-design/references/pitfalls.md
- Read
insane-design/{slug}/index.html + ์ฃผ์ CSS (ยง11/ยง13์ฉ; >500KB๋ฉด ์์ 2-3๊ฐ๋ง)
ํ์ 22๊ฐ์ง (์์ง): brand color ํ์ (hex) / lightยทdarkยทmixed / custom font / framework /
hero anatomy / ์ ๋ ๊ธ์ง ํ ๊ฐ์ง / DOยทDON'T(์์ DON'T๋ hex ๊ฐ์ ) / ยง00 Direction & Metaphor /
ยง11 Layout / ยง12 Responsive / ยง13 Components(6 ์นดํ
๊ณ ๋ฆฌ+์ํ 6์ข
+Named Variants+Signature Micro-Specs) /
ยง17 Agent Prompt / BOLD ๋ฐฉํฅ์ฑ / Aesthetic Category(12+other) / Signature Element /
Code Complexity / Negative-Space Identity / Typography Principles / Known Gaps /
Archetype / design_system_level.
ยง00 Narrative: references/narrative-vocabulary.md์ archetype top metaphor์์ 1๊ฐ + ๋ณดํธ
์ดํ 2๊ฐ = ์ด 3+ metaphor floor. "์ ์ ๋/๋ชจ๋ํ/๋ฏธ๋๋ฉํ/premium/clean" ํ์ฉ์ฌ๋ก๋ง ๋๋๋ ๋ฌธ์ฅ ๊ธ์ง.
ยง00 Direction Summary 4-line block (apply ์ ๊ท์์ด ๋งค์นญ โ ํ์ ๊ณ ์ ):
> **BOLD Direction**: {1-2 ๋จ์ด}
> **Aesthetic Category**: {12 enum + "other"}
> **Signature Element**: ์ด ์ฌ์ดํธ๋ **{๋ฉํํฌ}**์ผ๋ก ๊ธฐ์ต๋๋ค.
> **Code Complexity**: {low/medium/high/very_high} โ {๊ทผ๊ฑฐ ํ์ค}
ยง18 DON'T ์์ ํญ๋ชฉ: ๋ฐ๋์ ๊ตฌ์ฒด hex ํฌํจ (apply/build grep ๊ณ์ฝ โ shared/README ยง2.2).
ํจํด: "X๋ฅผ [๊ธ์ง hex]์ผ๋ก ๋์ง ๋ง ๊ฒ โ ๋์ [์ฌ๋ฐ๋ฅธ hex] ์ฌ์ฉ".
ํ๊ฐ ๊ธ์ง 3์์น: hex ๋ง๋ค์ง ์๊ธฐ / ํ ํฐ๋ช
๋ง๋ค์ง ์๊ธฐ / ํฉํธ ์์ ํด์๋ง.
Step 5: WRITE-MD โ generate
- Read
references/schema.v3.2.md (frontmatter+์น์
๋จ์ผ ์ง์ค ์์ฒ โ ํ์)
- Read
references/template.md (19์น์
v3.2)
- Read
examples/stripe/design.md (์์ผ๋ฉด โ ๊ตฌ์กฐ ์ฐธ์กฐ)
- Step 3 ํฉํธ + Step 4 ํด์ ์กฐํฉํ์ฌ 19์น์
์ฑ์
- Write
insane-design/{slug}/design.md
ํ์: YAML frontmatter ๋งจ ์ ยท schema_version: 3.2 ยท medium/medium_confidence ยท
archetype/archetype_confidence ยท design_system_level/evidence ยท ํ์ ์น์
15๊ฐ
(00,01,02,03,04,05,06,07,08,11,13,15,17,18,19) ยท ๋ชจ๋ hex๊ฐ ์ค์ CSS์ ์กด์ฌ ยท ํ์ผ โฅ 12KB.
ํ ํฐ ์ฐธ์กฐ ์ผ๊ด์ฑ: ยง13 + ยง15 ํฉ์ณ {colors.x} ์ฐธ์กฐ ๋น์จ โฅ 70%. raw hex๋ frontmatter
colors:์ named token์ผ๋ก ๋ฑ๋ก ํ ๋ณธ๋ฌธ์์ ์ฐธ์กฐ๋ก ๊ต์ฒด. ์์ธ: schema.v3.2.md ยง3.
Step 6: RENDER-HTML โ generate
- Read
references/report-prompt.md (์์ฑ ๊ท์น)
- Read
references/report.css (canonical CSS โ ์์ผ๋ฉด)
- Read
examples/stripe/report.ko.html (์์ผ๋ฉด โ CSS/JS/๊ตฌ์กฐ ์ฐธ์กฐ)
- Read
insane-design/{slug}/design.md
- Write
insane-design/{slug}/report.ko.html
ํ์: ํ๊ตญ์ด ยท shadcn zinc ํ
๋ง(Pretendard Variable + Inter + JetBrains Mono) ยท
--brand-color๋ง ์๋น์ค๋ณ ๊ต์ฒด ยท ์ธํฐ๋ํฐ๋ธ(์ค์์น hover, ํ์ดํฌ live preview, Copy ๋ฒํผ) ยท
hero์ screenshots/hero-cropped.png ์ฝ์
ยท ํ์ผ โฅ 20KB.
Step 7: VALIDATE โ script + review
python3 "$PLUGIN_ROOT/skills/insane-design/scripts/validate.py" insane-design/{slug}/design.md
head -1 insane-design/{slug}/design.md | grep -q '^---$'
for n in 00 01 02 03 04 05 06 07 08 11 13 15 17 18 19; do
grep -q "^## $n\." insane-design/{slug}/design.md || echo "Missing ยง$n"; done
[ "$(wc -c < insane-design/{slug}/design.md)" -ge 12000 ]
[ "$(wc -c < insane-design/{slug}/report.ko.html)" -ge 20000 ]
for hex in $(grep -oE '#[0-9A-Fa-f]{6}' insane-design/{slug}/design.md | sort -u | head -3); do
grep -qi "$hex" insane-design/{slug}/css/*.css || echo "Missing: $hex"; done
์คํจ ์: ์ต๋ 2ํ ์ฌ์์ฑ(์คํจ ํญ๋ชฉ๋ง). 2ํ ํ์๋ ์คํจ๋ฉด ๊ฒฝ๊ณ ํฌํจ ์ถ๋ ฅ.
์ฑ๊ณต ๋ณด๊ณ :
โ
{slug} ๋ถ์ ์๋ฃ!
๐ design.md: insane-design/{slug}/design.md ({size}KB)
๐ report.ko.html: insane-design/{slug}/report.ko.html ({size}KB)
๐ธ screenshot: insane-design/{slug}/screenshots/hero-cropped.png
design.md๋ฅผ ์ฒจ๋ถํ๋ฉด ์ด ์ฌ์ดํธ ์คํ์ผ๋ก UI๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.
report.ko.html์ ๋ธ๋ผ์ฐ์ ์์ ์ด๋ฉด ์ธํฐ๋ํฐ๋ธ ๋ฆฌํฌํธ๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
DTCG tokens.json์ด ํ์ํ๋ฉด "tokens.json ๋ด๋ณด๋ด์ค"๋ผ๊ณ ์์ฒญํ์ธ์.
Export ๋ชจ๋ โ design.md โ DTCG tokens.json
์ฌ์ฉ์๊ฐ "tokens.json ๋ด๋ณด๋ด์ค", "DTCG export", "export tokens" ๋ฑ์ ์์ฒญํ๋ฉด ์คํํ๋ค.
design.md frontmatter์ ํ ํฐ ๊ทธ๋ํ๋ฅผ W3C DTCG (Design Tokens Format Module) JSON์ผ๋ก
๋ณํํ๋ค. ๊ฒฐ๊ณผ๋ Figma Tokens Studio / Style Dictionary / Specify / Cobalt UI ๋ฑ์์ import ๊ฐ๋ฅ.
Step E1: ์
๋ ฅ ๊ฒ์ฆ
WORK_DIR="$(pwd)"
INPUT="$WORK_DIR/insane-design/{slug}/design.md"
[ -f "$INPUT" ] || { echo "โ ํ์ผ ์์: $INPUT"; exit 1; }
slug์ ์
ธ ๋ฉํ๋ฌธ์(` $ ( ) ; | &)๊ฐ ํฌํจ๋๋ฉด ๊ฑฐ๋ถ.
Step E2: DTCG ๋ณํ
OUTPUT="$WORK_DIR/insane-design/{slug}/tokens.json"
python3 "$PLUGIN_ROOT/skills/insane-design/scripts/export_dtcg.py" "$INPUT" -o "$OUTPUT"
์คํฌ๋ฆฝํธ๋ frontmatter์ colors:/typography:/spacing:/rounded:๋ฅผ ์ฝ์ด:
colors: โ DTCG color ๊ทธ๋ฃน ($type: color)
typography.ladder: โ DTCG typography composite ($type: typography)
spacing: โ DTCG spacing ($type: dimension)
rounded: โ DTCG radius ($type: dimension)
- ๋ฉํ(slug/archetype/design_system_level ๋ฑ) โ
$extensions["com.insane-design"]
--compact(minified) ์ต์
์ง์.
Step E3: ๊ฒฐ๊ณผ ๋ณด๊ณ
โ
DTCG export ์๋ฃ
๐ฆ ์ถ๋ ฅ: insane-design/{slug}/tokens.json (N KB)
ํ ํฐ ํต๊ณ: color M / typography K / spacing L / radius P
โ Figma Tokens Studio ยท Style Dictionary ยท Cobalt UI์์ import ๊ฐ๋ฅ
ํด๋ฐฑ: frontmatter ํ ํฐ ๊ทธ๋ํ ๊ฐ์ฒด๊ฐ ๋น์ด ์์ผ๋ฉด ๋ฉํ wrapper๋ง ์ถ๋ ฅ + ๊ฒฝ๊ณ
("schema_version 3.2๋ก ์ฌ๋ถ์ ๊ถ์ฅ"). ์์กด์ฑ: Python 3.8+ (PyYAML ๊ถ์ฅ, ์์ผ๋ฉด ๋ด์ฅ minimal parser).
References (์์ง)
| ํ์ผ | ์ฉ๋ | Step |
|---|
references/schema.v3.2.md | frontmatter+์น์
๋จ์ผ ์ง์ค ์์ฒ | 0, 5, 7 |
references/template.md | design.md 19์น์
v3.2 | 5 |
references/narrative-vocabulary.md | ยง00 archetype metaphor | 4 |
references/data-collection.md | fetch ์์ค์ปฌ๋ ์ด์
์์ธ | 2 |
references/report-prompt.md + report.css | HTML ๋ฆฌํฌํธ | 6 |
references/pitfalls.md | 14 ํจ์ | 4 |
references/methodology.md | ๋ถ์ ํ๋ก์ธ์ค + ์ฒดํฌ๋ฆฌ์คํธ | ์ ์ฒด |
shared/README.md | ๊ณตํต ๊ณ์ฝ (IdentityยทContractยทVerifierยทAI Slop) | ์ ์ฒด |
Scripts
scripts/var_resolver.py โ CSS var() ์ฒด์ธ ์ฌ๊ท ํด๊ฒฐ
scripts/brand_candidates.py โ ๋ธ๋๋ ์์ ํ๋ณด (semantic + selector-role + frequency)
scripts/typo_extractor.py โ ํ์ดํฌ ์ค์ผ์ผ
scripts/alias_layer.py โ alias tier (util/action/component/core)
scripts/capture_jina_screenshots.py โ Jina ์คํฌ๋ฆฐ์ท + PIL crop
scripts/validate.py โ v3.2 design.md 8-check validator
scripts/export_dtcg.py โ design.md โ DTCG tokens.json