一键导入
gsp-brand-refine
Adjust brand mid-project — use when: tweak the colors, change the font, adjust spacing, the brand feels off, refine the brand
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Adjust brand mid-project — use when: tweak the colors, change the font, adjust spacing, the brand feels off, refine the brand
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Add reference material to a project — use when: add a reference, save inspiration, attach examples, link this site as reference, drop in a moodboard
Craft ASCII art interactively — you direct, the artist creates — use when: make ASCII art, terminal art, decorative banner, splash screen, hero ASCII
Audit an existing brand before evolving it — use when: audit our brand, what do we have, before a rebrand, brand health check, current brand state, brand inventory
Sync brand to match a project's shipped state — tokens, voice, visual patterns, personality — use when: brand drifted from the app, reverse-engineer the brand, the code is ahead of the brand docs, sync brand to shipped, update brand from production
Design color systems — palettes, contrast, semantic mapping, dark mode — use when: pick colors, build a palette, semantic tokens, dark mode pairings, brand color, accent color
Design icon systems — library selection, sizing, containers, custom SVG direction — use when: pick an icon library, icon sizing rules, icon containers, custom SVG direction, swap icons, icon strategy
基于 SOC 职业分类
| name | gsp-brand-refine |
| description | Adjust brand mid-project — use when: tweak the colors, change the font, adjust spacing, the brand feels off, refine the brand |
This skill modifies {brand-name}.yml — the single source of truth for brand tokens, patterns, constraints, effects, and intensity. If the user's feedback is strategic ("make the tone more playful") or narrative ("the brand story feels off"), redirect to /gsp-brand-strategy or /gsp-brand-identity.
Input: Natural language feedback (e.g., "accent is too muted", "make buttons rounder", "more motion")
Output: Updated {brand-name}.yml + regenerated STYLE.md (if exists) + {brand-name}.theme.json (regenerated) + REFINE-LOG.md
Agent: None — inline skill, surgical edits
<execution_context> </execution_context>
- Always use `AskUserQuestion` for user interaction — never prompt via plain text - One decision per question — never batch multiple questions in a single message - Never update artifacts without showing before/after and getting confirmation - Only touch tokens directly affected by the feedback - Preserve existing token structure — edit values in place, don't restructure - When changing a color that cascades into semantic tokens, show the full cascade before applying - When color changes affect text/background pairs, check WCAG AA contrast (4.5:1 normal text, 3:1 large text) and warn if a change would fail ## Step 0: Locate brand and parse feedbackExtract feedback from the user's input (everything after /gsp-brand-refine).
If no feedback provided, use AskUserQuestion: "What would you like to adjust? (e.g., 'accent is too muted', 'heading font feels too heavy', 'spacing too tight')"
Resolve brand from .design/branding/ (one → use it, multiple → ask). Set BRAND_PATH.
Find the brand's .yml file: scan {BRAND_PATH}/patterns/ for a .yml file that is NOT in foundations/ or components/. If not found: "No brand style found. Run /gsp-brand-guidelines first."
Also check if {BRAND_PATH}/patterns/STYLE.md exists (will need regeneration after changes).
Read the brand .yml once. Map feedback to the relevant section:
| Feedback signals | .yml section |
|---|---|
| color, accent, muted, vibrant, contrast, tint, shade, hue | tokens.color + dark_mode.color |
| font, heading, body, weight, size, line-height | tokens.typography |
| spacing, padding, gap, tight, loose, dense | tokens.spacing |
| shadow, elevation, depth, flat | tokens.elevation |
| radius, rounded, sharp, corners | tokens.shape |
| motion, speed, slow, fast, bounce, snap | tokens.motion + intensity.motion |
| creative, playful, restrained, chaos, calm | intensity.variance |
| dense, airy, packed, spacious | intensity.density |
| button, card, input, badge, nav | patterns.{component} |
| never, always, forbidden, required | constraints |
| hover, click, press, animation, effect | effects |
| dark mode, dark background, dark theme, night | dark_mode.color (+ any section above if the feedback applies to dark mode specifically) |
Show a clear before/after for each affected token:
/gsp-brand-refine
═══════════════════════════════════════
Feedback: "the accent is too muted"
─── Proposed Changes ─────────────────
color.accent
before: #B8860B
after: #E8A317
change: increased chroma
Cascade:
color.ring → #E8A317 (shares accent as focus ring)
Contrast: accent on white 3.2:1 → 2.8:1 ⚠️ below AA
accent on dark 8.4:1 → 9.2:1 ✓
─────────────────────────────────────
If the change affects a source color that feeds an 11-stop palette, use AskUserQuestion:
If regenerating, call the tints.dev API:
WebFetch: https://www.tints.dev/api/{colorName}/{hexWithoutHash}
Parse the response for the 11-stop OKLCH scale (50–950) and update identity/palettes.json as a reference artifact, then update the .yml color tokens from the new ramp.
For individual token tweaks (weight, letter-spacing), propose direct value changes. If the user wants a different ratio or base size that would affect the entire scale, recalculate using the existing scale's mathematical relationship.
Use AskUserQuestion:
Apply confirmed changes:
{brand-name}.yml — edit values in place with Edit. Preserve structure.STYLE.md — if it exists, regenerate the affected sections (Patterns tables, Constraints lists, Effects tables, or Intensity dials) to reflect the .yml changes. Read the template from ${CLAUDE_SKILL_DIR}/../../templates/phases/style.md for format reference.After updating {brand-name}.yml and (if applicable) regenerating STYLE.md, regenerate the shadcn registry artifact:
node ${CLAUDE_SKILL_DIR}/../gsp-brand-guidelines/bin/theme-css.js \
{BRAND_PATH}/patterns/{brand-name}.yml \
--registry \
--output {BRAND_PATH}/patterns/{brand-name}.theme.json
Verify the file is valid JSON:
node -e "JSON.parse(require('fs').readFileSync('{BRAND_PATH}/patterns/{brand-name}.theme.json', 'utf8'))" \
&& echo "✓ theme.json refreshed"
If a project config exists (.design/projects/*/config.json with a non-empty app_path) AND {app_path}/components.json exists (a shadcn target), use AskUserQuestion:
{app_path} now?"On A: output Run /gsp-brand-apply {brand-name} as the next user step.
On B: output Refreshed. Apply later with /gsp-brand-apply {brand-name}.
If no shadcn target is detected, skip the prompt and output a passive note: Theme refreshed. No shadcn target detected — apply later with /gsp-brand-apply {brand-name} once a shadcn project is set up.
Append to {BRAND_PATH}/REFINE-LOG.md:
## {DATE} — "{feedback}"
| Token | Before | After |
|-------|--------|-------|
| color.accent | #B8860B | #E8A317 |
| color.ring | #B8860B | #E8A317 |
Display summary:
/gsp-brand-refine — {n} tokens updated
═══════════════════════════════════════
Updated: {list of tokens}
Log: {BRAND_PATH}/REFINE-LOG.md
─────────────────────────────────────
Use AskUserQuestion: