Add string-brand agent skill documenting colors, fonts, and logo usage - #1
Draft
ghostleek wants to merge 3 commits into
Draft
Add string-brand agent skill documenting colors, fonts, and logo usage#1ghostleek wants to merge 3 commits into
ghostleek wants to merge 3 commits into
Conversation
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
There was a problem hiding this comment.
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-brandskill 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.mdwith 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 copyingtokens.cssyields 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.
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
force-pushed
the
claude/design-docs-reusable-skill-8zl68e
branch
from
August 6, 2026 10:13
61be117 to
7770246
Compare
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
fillvalues in1. Vector Masters/Svg.svgand4. Svg Separate Files/*.svg:#75F8CCgreen,#33373Bdark,#C0F4FBsky,#FFFFFF.#C0F4FBappeared only in the master SVG and as the background of boards 9–10, so it wasn't documented in text anywhere before this.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
#75F8CCand#C0F4FBare 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
*_darkfor favicons, headers, and print.Contents
Review fixes (commit 2)
Copilot found four issues, all legitimate. The serious one: the frontmatter
descriptionwas 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 splittokens.cssheading line-heights to match the published per-level scale, separatedVector Masters/Svg.svg(a 1280×1024 guide board, not a logo asset) from the logo masters, and added the missingbuttonrole totokens.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:
#D64545on#FDECEC#C77A16on#FDF3E3#2E9E6Bon#E8F6EF#3A7CA5on#E9F2F8Three 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, andink-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
#FFFFFFexactly:green-800measures 4.76 on white but 4.44 onink-50and 3.99 onink-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: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.