Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS
The render tier reads OKLCH again, and custom runs start from nothing
Yousseff6f754d89c5b
diff --git a/skills/hallmark/references/components/n2-floating-chip.md b/skills/hallmark/references/components/n2-floating-chip.mdindex 53068b5..85215c1 100644--- a/skills/hallmark/references/components/n2-floating-chip.md+++ b/skills/hallmark/references/components/n2-floating-chip.md@@ -4,10 +4,10 @@ A small fixed chip in a corner: wordmark and one verb ("Try it"). Out of documen*Not:* C4 (full width, at the bottom); N5 (a whole nav in a pill).```html-<aside class="nav-chip" aria-label="Site">+<nav class="nav-chip" aria-label="Site"><a class="wordmark" href="/" aria-label="Studio, home">Studio</a><a class="cta-outline" href="/try">Try it</a>-</aside>+</nav>``````css.nav-chip { position: fixed; top: var(--space-md); right: max(var(--space-md), calc(50% - var(--container) / 2 + var(--gutter))); z-index: var(--z-sticky-nav); display: inline-flex; align-items: center; gap: var(--space-md); padding: var(--space-xs) var(--space-sm); background: var(--color-paper); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); }diff --git a/skills/hallmark/references/craft.md b/skills/hallmark/references/craft.mdindex 52e51e2..526d08c 100644--- a/skills/hallmark/references/craft.md+++ b/skills/hallmark/references/craft.md@@ -143,7 +143,7 @@ Four recipes, one per material family:**Text slots.** A missing fact (a venue, a date, an act, a price) is a text slot, never an invented value: `<span class="fill" data-fill="venue">Venue to be announced</span>`, set in the body face in `--color-muted` on a faint tint of it (`background: color-mix(in oklch, var(--color-muted) 14%, transparent)`, 2px radius, no underline) so it reads as a blank to fill, never as a link, at most three on a page, each listed in the handoff with what belongs there. Text slots do not count toward 68. A section the user named but gave nothing for is its heading, one line on what will go there and one text slot, or it merges into a neighbour; never a block of pending rows.-Where slots go: the hero visual on any product page, beside the text; a demo strip of two or three slots with one label of three words or fewer each, never three equal columns: one leads at about twice the width (this replaces the three-card feature grid); photo slots on business pages. Two to four slots carry a product page; more only when the user has handed over the images. A set of things the page does not have pictures of (a team, a range, a list of venues) is set in type, names and facts in a list or a table, with one slot at most: four empty frames in a row is a wireframe, not a page (68). Inside a slot, sketch the product's own structure from what the brief says it does (rows for a ledger, a waveform for audio, a list for an inbox) in three to five shapes, so the placeholder reads as this product waiting for its screenshot, never as a grey box. Ask for the material once at Step 1; given images go straight in and are named in the Picks block; "leave slots" builds the placeholders and the handoff lists every slot, its size and what belongs there; silence builds from what is real (SKILL.md Step 2), with a slot only where a picture is the point.+Where slots go: the hero visual on any product page, beside the text; a demo strip of two or three slots with one label of three words or fewer each, never three equal columns: one leads at about twice the width (this replaces the three-card feature grid); photo slots on business pages. Two to four slots carry a product page; more only when the user has handed over the images. A set of things the page does not have pictures of (a team, a range, a list of venues) is set in type, names and facts in a list or a table, with one slot at most: four empty frames in a row is a wireframe, not a page (68). The signature never lives inside a slot, since the user's image replaces everything in it. Inside a slot, sketch the product's own structure from what the brief says it does (rows for a ledger, a waveform for audio, a list for an inbox) in three to five shapes, so the placeholder reads as this product waiting for its screenshot, never as a grey box. Ask for the material once at Step 1; given images go straight in and are named in the Picks block; "leave slots" builds the placeholders and the handoff lists every slot, its size and what belongs there; silence builds from what is real (SKILL.md Step 2), with a slot only where a picture is the point.## 9. Finishdiff --git a/skills/hallmark/scripts/sloplint-render.mjs b/skills/hallmark/scripts/sloplint-render.mjsindex a3fb6a6..3a6495d 100644--- a/skills/hallmark/scripts/sloplint-render.mjs+++ b/skills/hallmark/scripts/sloplint-render.mjs@@ -183,10 +183,17 @@ function observe(checkFold, meta) {if (checkFold) {const lin = (c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);+ const cvs = document.createElement('canvas'); cvs.width = cvs.height = 1;+ const ctx2 = cvs.getContext('2d', { willReadFrequently: true });+ const toRgb = (str) => { ctx2.clearRect(0, 0, 1, 1); ctx2.fillStyle = 'rgba(0, 0, 0, 0)'; ctx2.fillStyle = str; ctx2.fillRect(0, 0, 1, 1); const d = ctx2.getImageData(0, 0, 1, 1).data; return { r: d[0] / 255, g: d[1] / 255, b: d[2] / 255, a: d[3] / 255 }; };const parse = (s) => {- const m = /rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)/.exec(s);- if (!m) return null;- return { r: +m[1] / 255, g: +m[2] / 255, b: +m[3] / 255, a: m[4] == null ? 1 : +m[4] };+ if (!s || s === 'transparent') return null;+ const m = /^rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)$/.exec(s.trim());+ if (m) return { r: +m[1] / 255, g: +m[2] / 255, b: +m[3] / 255, a: m[4] == null ? 1 : +m[4] };+ const alpha = /\/\s*([\d.]+%?)\s*\)$/.exec(s);+ const c = toRgb(s);+ if (alpha) c.a = alpha[1].endsWith('%') ? parseFloat(alpha[1]) / 100 : parseFloat(alpha[1]);+ return c;};const lum = (c) => 0.2126 * lin(c.r) + 0.7152 * lin(c.g) + 0.0722 * lin(c.b);const ratio = (a, b) => {@@ -203,6 +210,17 @@ function observe(checkFold, meta) {const root = parse(getComputedStyle(document.body).backgroundColor);return root && root.a > 0 ? root : { r: 1, g: 1, b: 1, a: 1 };};+ const over = (top, base) => ({ r: top.r * top.a + base.r * (1 - top.a), g: top.g * top.a + base.g * (1 - top.a), b: top.b * top.a + base.b * (1 - top.a), a: 1 });+ const gradStops = (el, base) => {+ const out = [];+ for (let node = el; node && node !== document.documentElement; node = node.parentElement) {+ const cs2 = getComputedStyle(node);+ if (/gradient/.test(cs2.backgroundImage)) for (const m of cs2.backgroundImage.matchAll(/(?:oklch|oklab|lab|lch|rgba?|hsla?|color)\([^()]*\)|#[0-9a-fA-F]{3,8}\b/g)) out.push(over(toRgb(m[0]), base));+ const c = parse(cs2.backgroundColor);+ if (c && c.a >= 0.9) break;+ }+ return out;+ };let reported = 0;const seenSel = new Set();for (const el of document.querySelectorAll('body *')) {@@ -230,6 +248,13 @@ function observe(checkFold, meta) {push(41, 'FAIL', `button text ~ button fill on ${key} (${r.toFixed(2)}:1)`,'Use accent-ink or paper for the label');}+ } else if (!seenSel.has(key)) {+ const worst = gradStops(el, bg).reduce((m, c) => Math.min(m, ratio(fg, c)), Infinity);+ if (worst < threshold - 0.05) {+ seenSel.add(key);+ reported++;+ push(40, 'WARN', `contrast drops to ${worst.toFixed(2)}:1 over the gradient behind ${key}`, 'Check the text where the gradient is darkest or lightest; give the label its own ground');+ }}}}diff --git a/skills/hallmark/scripts/sloplint.mjs b/skills/hallmark/scripts/sloplint.mjsindex a667133..20fd182 100644--- a/skills/hallmark/scripts/sloplint.mjs+++ b/skills/hallmark/scripts/sloplint.mjs@@ -1965,9 +1965,9 @@ function check48(ctx) {if (n <= 6) report(48, 'WARN', file, line, evidence, 'Lift the value into the token block');};for (const [prop, val] of Object.entries(ctx.tokens)) {- if (/^--font-/.test(prop) && /FILL ME/i.test(val)) {+ if (/^--(font|color)-/.test(prop) && /FILL ME/i.test(val)) {const tr = ctx.rules.find((r) => isTokenRule(r) && r.decls.some((d) => d.prop === prop));- report(48, 'FAIL', tr ? tr.file : ctx.cssFiles[0]?.file || ctx.docs[0]?.file, tr ? tr.decls.find((d) => d.prop === prop)?.line : 1, `${prop} is still the scaffold placeholder "FILL ME"`, 'Fill the face from direction.md § C before building');+ report(48, 'FAIL', tr ? tr.file : ctx.cssFiles[0]?.file || ctx.docs[0]?.file, tr ? tr.decls.find((d) => d.prop === prop)?.line : 1, `${prop} is still the scaffold placeholder "FILL ME"`, /^--font-/.test(prop) ? 'Fill the face from direction.md § C before building' : 'Fill the colour from direction.md § B before building');}}for (const r of ctx.rules) {diff --git a/skills/hallmark/scripts/theme.mjs b/skills/hallmark/scripts/theme.mjsindex a12bb64..a22471a 100644--- a/skills/hallmark/scripts/theme.mjs+++ b/skills/hallmark/scripts/theme.mjs@@ -212,10 +212,10 @@ const SCALE = ` --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm--container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap: 144px;--z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;`;-const CUSTOM_TOKENS = ` --color-paper: oklch(96% 0.010 80); --color-paper-2: oklch(93% 0.012 80); --color-paper-3: oklch(89% 0.014 80);- --color-ink: oklch(20% 0.012 80); --color-ink-2: oklch(28% 0.012 80); --color-muted: oklch(46% 0.012 80);- --color-rule: oklch(84% 0.010 80);- --color-accent: oklch(58% 0.16 250); --color-accent-ink: oklch(98% 0.005 250); --color-focus: oklch(58% 0.20 250);+const CUSTOM_TOKENS = ` --color-paper: FILL ME; --color-paper-2: FILL ME; --color-paper-3: FILL ME;+ --color-ink: FILL ME; --color-ink-2: FILL ME; --color-muted: FILL ME;+ --color-rule: FILL ME;+ --color-accent: FILL ME; --color-accent-ink: FILL ME; --color-focus: FILL ME;--font-display: "FILL ME", ui-serif, serif; --font-body: "FILL ME", ui-sans-serif, system-ui, sans-serif; --font-outlier: var(--font-body);--radius-card: 4px; --radius-pill: 999px; --rule-hair: 1px; --shadow-card: none;--tracking-display: -0.02em;`;@@ -265,7 +265,7 @@ function scaffold() {const css = `:root {\n${scale}\n${tokens}\n}\n`;writeFileSync(out, css);const stamp = custom- ? `/* Hallmark · shape: <shape> · genre: <genre> · custom: draw n/7 (seed <slug>·<date>·r0)\n * hero: <posture> · nav: <shape> · footer: <shape> · enrichment: <none or the file> · signature: <the one move>\n * axes: <paper>/<display>/<accent> · posture: <posture> · contrast: pass · fold: pass · v${VERSION} */`+ ? `/* Hallmark · shape: <shape> · genre: <genre> · theme: custom · direction: "<drawn, n/7>" · vibe: "<4 to 8 words>"\n * paper: oklch(<>) · accent: oklch(<>) · display: <face> · body: <face> · hero: <posture> · nav: <shape> · footer: <shape> · enrichment: <none or the file> · signature: <the one move>\n * axes: <paper>/<display>/<accent> · posture: <posture> · seed: <key> · challenger: <name> (<verdict or raise>) · contract: <after the finish review> · contrast: pass · fold: pass · v${VERSION} */`: `/* Hallmark · shape: <shape> · genre: ${header.genre} · theme: ${name} (${flag('dealt', '') ? `deal ${flag('dealt', '')}` : 'by request'})\n * hero: <posture> · nav: <shape> · footer: <shape> · enrichment: <none or the file> · signature: <the one move>\n * axes: ${triple(header)} · posture: ${header.posture} · contrast: pass · fold: pass · v${VERSION} */`;console.log(`wrote ${out} (${custom ? 'the shared scale; fill every --color-* and --font-* from direction.md § B and § C before building' : `${name} tokens plus the shared scale`})`);if (!custom) {