Skip to content

Add string-brand agent skill documenting colors, fonts, and logo usage - #1

Draft
ghostleek wants to merge 3 commits into
mainfrom
claude/design-docs-reusable-skill-8zl68e
Draft

Add string-brand agent skill documenting colors, fonts, and logo usage#1
ghostleek wants to merge 3 commits into
mainfrom
claude/design-docs-reusable-skill-8zl68e

Conversation

@ghostleek

@ghostleek ghostleek commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Packages this repo's brand guide as a Claude Code skill at .claude/skills/string-brand/, so coding agents building anything with String's identity use the real values instead of eyedropping a PNG or guessing.

Why

Today the brand lives in JPEG boards, vector files, and a README that lists two font names. An agent asked to "build a landing page for String" has no way to get the palette right. This turns the guide into something machine-readable.

What was extracted vs. added

Read directly from the assets — palette, logo pairings, and fonts:

  • Four core colors from the fill values in 1. Vector Masters/Svg.svg and 4. Svg Separate Files/*.svg: #75F8CC green, #33373B dark, #C0F4FB sky, #FFFFFF. #C0F4FB appeared only in the master SVG and as the background of boards 9–10, so it wasn't documented in text anywhere before this.
  • The six approved logo-on-background pairings, recovered from the twelve JPEG boards (odd = mark, even = logotype).
  • The exact font files present: Montserrat in 9 weights with italics, Space Grotesk in 5 weights with no italics.

Added as convention, and labeled as such — tint/shade ramps, the type scale, semantic light/dark recipes, chart palettes, and the Space Grotesk-display / Montserrat-body split. The source guide names both typefaces without assigning roles, so the skill states its reasoning and notes that a project already committed to the opposite split should stay consistent with itself.

The accessibility finding

Three of the four core colors are light, so #75F8CC and #C0F4FB are fill colors rather than text colors — 1.31:1 and 1.19:1 against white. The ramps supply AA-passing alternatives in the same hue family so "make the links green" doesn't produce something unreadable.

Green-on-white for the logo is on boards 1–2, so the skill documents it as approved while flagging that at 1.31:1 it should be large and decorative only, with *_dark for favicons, headers, and print.

Contents

SKILL.md                    palette, type, logo pairings — the everyday reference
references/colors.md        ramps, contrast matrix, themes, chart palettes
references/logo.md          file inventory, sizing, favicons, misuse
references/typography.md    type scale, weights, @font-face, loading
assets/tokens.css           CSS custom properties, light + dark themes
assets/tokens.json          same values as data, for Tailwind/token pipelines
scripts/contrast.py         WCAG checker, on-brand substitutes, and --audit

Review fixes (commit 2)

Copilot found four issues, all legitimate. The serious one: the frontmatter description was an unquoted YAML scalar containing hex codes, and a bare # starts a comment — so the description truncated at 67 of 914 characters, discarding the entire "when to use this" half that drives triggering. Now a folded block scalar; confirmed intact in the live skills listing. Also split tokens.css heading line-heights to match the published per-level scale, separated Vector Masters/Svg.svg (a 1280×1024 guide board, not a logo asset) from the logo masters, and added the missing button role to tokens.json.

Output evals found a defect in this skill (commit 3)

Six subagent runs — landing page, dashboard theme, logo placement, each built with the skill and again with repo access but .claude/ off-limits — then every rendered text node measured for computed contrast in a real browser.

The dashboard built with the skill had more contrast failures than the one without, because it faithfully used the status colors this skill prescribed. All four were too light for their paired tint backgrounds:

As published On its tint
error #D64545 on #FDECEC 3.83:1
warning #C77A16 on #FDF3E3 3.07:1
success #2E9E6B on #E8F6EF 3.03:1
info #3A7CA5 on #E9F2F8 4.02:1

Three also failed on plain white. An earlier version of this description claimed those values were contrast-checked; they were not. Replaced with darkened values clearing 4.5:1 against their tint, #FFFFFF, and ink-50, plus dark-theme variants that were missing entirely — which is why the dashboard agent invented its own.

Also documented that the ramps' "On white" column means #FFFFFF exactly: green-800 measures 4.76 on white but 4.44 on ink-50 and 3.99 on ink-100, so green link text on a card quietly drops below AA.

The durable fix is contrast.py --audit, which re-derives every pairing the skill documents — semantic themes, status colors, and the stated logo ratios — and exits non-zero on drift:

$ python3 .claude/skills/string-brand/scripts/contrast.py --audit
    PASS  light: accent text on page          4.76:1  (needs 4.5)
    PASS  status success on tint              4.56:1  (needs 4.5)
    PASS  logo green on #33373B   stated  9.17  actual  9.17
  All documented pairings verified.

Verified it fails correctly by re-injecting the original #2E9E6B, a green-on-white accent, and a falsified logo ratio — all three caught, exit 1. These ratios are hand-written prose; without a check they will drift again.

What the evals did and didn't show

On the scripted checks the margin was narrow — 17/18 with the skill vs 16/18 baseline. That's honest: an agent with repo access reads the SVGs and finds the core colors on its own. The skill's measurable edge was in the derived values, where the baseline invented its own neutrals and a nine-step green ramp (#0BDA95, #25F4AE, #47F6BB, …) instead of using the documented one.

A separate attempt at trigger-word optimization was abandoned: its detector scores a query as "not triggered" unless the skill is the literal first tool call, so realistic agentic prompts ("set up app/page.tsx") register as misses regardless of description quality. Not run rather than run and misreported.

Packages the brand guide as a Claude Code skill so agents building anything
with String's identity get the real values instead of guessing.

The palette, logo pairings, and font list are read straight from the source
assets: the four core colors come from the fill values in the vector masters
and separate SVGs, and the six approved logo-on-background pairings come from
the twelve JPEG boards. #C0F4FB was only present in the master SVG and the
board backgrounds, so it was previously undocumented anywhere in text.

Beyond the raw values, the skill covers the thing most likely to go wrong
here: three of the four core colors are light, so #75F8CC and #C0F4FB are
fills rather than text colors (1.31:1 and 1.19:1 against white). Ramps
supply AA-passing alternatives for cases like green link text.

Contents:
- SKILL.md — palette, type, logo pairings
- references/ — color ramps and contrast matrix, logo files and sizing,
  type scale and font loading
- assets/tokens.{css,json} — drop-in tokens with light/dark themes
- scripts/contrast.py — WCAG checker that suggests on-brand substitutes

Derived material (ramps, type scale, the Space Grotesk display / Montserrat
body split) is marked as convention rather than presented as guide content,
since the source guide names the two typefaces without assigning roles.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BGLW9iKmNJHtDiHBBLRGbq

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Packages the existing String brand guide into a Claude Code skill under .claude/skills/string-brand/, adding machine-readable references (docs + tokens) and a small WCAG contrast utility so coding agents can apply the exact palette, typography, and logo-usage rules without guessing.

Changes:

  • Adds a string-brand skill with a short quick reference (SKILL.md) plus deeper references for colors, typography, and logo usage.
  • Introduces exportable design tokens (assets/tokens.css / assets/tokens.json) and a standard-library-only contrast checker (scripts/contrast.py).
  • Updates the repo README.md with quick reference and instructions for using/copying the skill.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Documents the new agent skill and provides a quick-reference summary + usage instructions.
.claude/skills/string-brand/SKILL.md Skill entrypoint and quick-reference guidance for palette/type/logo pairing rules.
.claude/skills/string-brand/references/colors.md Detailed color ramps, contrast matrix, semantic recipes, and derivation notes.
.claude/skills/string-brand/references/logo.md Logo asset inventory, pairing guidance, sizing, embedding, and misuse guidance.
.claude/skills/string-brand/references/typography.md Typeface inventory, roles, type scale, and loading guidance.
.claude/skills/string-brand/assets/tokens.css CSS custom properties for palette/typography + light/dark semantic theme tokens.
.claude/skills/string-brand/assets/tokens.json JSON representation of the tokens for tooling/pipelines.
.claude/skills/string-brand/scripts/contrast.py CLI utility to compute WCAG contrast ratios and suggest on-brand substitutes.
Suppressed comments (1)

.claude/skills/string-brand/assets/tokens.css:138

  • The optional base styles apply the same heading line-height to h1–h4 (--string-leading-heading), which doesn’t match the per-level values in the type scale. If you keep these base styles, consider wiring h1–h4 to per-level leading variables so copying tokens.css yields the documented scale.
h1, h2, h3, h4 {
  font-family: var(--string-font-display);
  line-height: var(--string-leading-heading);
  letter-spacing: var(--string-tracking-display);
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/skills/string-brand/SKILL.md Outdated
Comment thread .claude/skills/string-brand/assets/tokens.css
Comment thread .claude/skills/string-brand/SKILL.md Outdated
Comment thread .claude/skills/string-brand/assets/tokens.json
ghostleek pushed a commit that referenced this pull request Aug 6, 2026
Addresses Copilot's review on #1. The frontmatter issue was real and severe:
in a YAML plain scalar a " #" begins a comment, so the unquoted description
truncated at the first hex value. A parser returned 67 of 914 characters —
everything after "the official color palette (#75F8CC mint," was discarded,
including the entire "when to use this" half that drives triggering.

The in-flight description eval measured the damage before the fix: recall 6%
on train and 0% on held-out test at 100% precision, which is the signature of
a skill that almost never fires. Switching to a folded block scalar (>-) keeps
all 914 characters; the harness's own eval runner uses a block scalar for the
same reason.

Also from the review:

- tokens.css collapsed h1-h4 to one line-height and one tracking value, which
  contradicted the per-level scale in typography.md and tokens.json. Split
  into per-level custom properties and wired the base styles to them, so
  copying tokens.css now reproduces the documented scale.
- SKILL.md listed Vector Masters/Svg.svg alongside the logo masters. It's the
  1280x1024 guide board, not a logo asset — an agent picking it for a print
  handoff would get a page layout. Broken out with a note; logo.md already
  described it correctly, so the two files now agree.
- tokens.json was missing the button role present in typography.md's scale.

Added a cross-file consistency check to the verification pass: the scale in
tokens.css, tokens.json, and typography.md is now confirmed to agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BGLW9iKmNJHtDiHBBLRGbq
Addresses Copilot's review on #1. The frontmatter issue was real and severe:
in a YAML plain scalar a " #" begins a comment, so the unquoted description
truncated at the first hex value. yaml.safe_load returned 67 of 914 characters
— everything after "the official color palette (#75F8CC mint," was discarded,
including the entire "when to use this" half that drives triggering. The
truncation was also directly visible in this session's loaded-skills listing.

Switching to a folded block scalar (>-) keeps all 914 characters; the eval
harness's own runner uses a block scalar for the same reason.

Also from the review:

- tokens.css collapsed h1-h4 to one line-height and one tracking value, which
  contradicted the per-level scale in typography.md and tokens.json. Split
  into per-level custom properties and wired the base styles to them, so
  copying tokens.css now reproduces the documented scale.
- SKILL.md listed Vector Masters/Svg.svg alongside the logo masters. It's the
  1280x1024 guide board, not a logo asset — an agent picking it for a print
  handoff would get a page layout. Broken out with a note; logo.md already
  described it correctly, so the two files now agree.
- tokens.json was missing the button role present in typography.md's scale.

Verified by parsing the frontmatter, parsing tokens.json, and cross-checking
that the type scale in tokens.css, tokens.json, and typography.md agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BGLW9iKmNJHtDiHBBLRGbq
@ghostleek
ghostleek force-pushed the claude/design-docs-reusable-skill-8zl68e branch from 61be117 to 7770246 Compare August 6, 2026 10:13
… of error

Output evals caught a real defect in this skill. Six subagent runs (landing
page, dashboard theme, logo placement — each with the skill and with repo
access but no skill) were graded, then every rendered text node was measured
for computed contrast in a real browser. The dashboard built *with* the skill
had more contrast failures than the one without, because it faithfully used
the status colors this skill prescribes.

All four were too light for the tint backgrounds they were paired with:

  error   #D64545 on #FDECEC  3.83:1
  warning #C77A16 on #FDF3E3  3.07:1
  success #2E9E6B on #E8F6EF  3.03:1
  info    #3A7CA5 on #E9F2F8  4.02:1

Three of the four also failed on plain white. Replaced with darkened values
that clear 4.5:1 against their own tint, against #FFFFFF, and against
ink-50 #F7F7F7. Added dark-theme variants — previously missing, which is why
the dashboard agent invented its own.

Also documented that the ramps' "On white" column means #FFFFFF exactly: the
margin is thin, and green-800 drops from 4.76 on white to 4.44 on ink-50 and
3.99 on ink-100, so green link text on a card quietly falls below AA. Callers
are pointed at green-900 for non-white light surfaces.

The durable fix is contrast.py --audit, which re-derives every foreground/
background pairing the skill documents — semantic themes, status colors, and
the stated logo pairing ratios — and exits non-zero on drift. Verified it
catches the regression by re-injecting the original #2E9E6B (3.03:1), a
green-on-white accent, and a falsified logo ratio. These ratios are
hand-written prose; without a check they will drift again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BGLW9iKmNJHtDiHBBLRGbq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants