agentleFS
ai-enhanced-engineerai-enhanced-engineer/aiee-skills/skills/frontend-design-systems/SKILL.md

frontend-design-systems

Skill4 starsChanged 5 months agoMITView on GitHub

Integrating design systems (Material Design, Carbon, etc.) into existing sites while preserving brand identity and design tokens. Use for design system adoption, brand preservation, visual consistency improvements, and subtle UX enhancements. Call for any work involving design tokens, CSS token bridges, or component-level design system integration.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Audit first: - Document what would change

    line 22
  2. Very specific:

    When adopting a template that uses its own CSS custom property names, a token bridge alias section avoids the need to find-and-replace …

    line 30
  3. Distinctive:

    When a 2-column grid has an odd number of items, the last item sits alone on the left.

    line 57
  4. Distinctive:

    When new rules live in a stylesheet shared across pages that reuse base selectors, scope them so they cannot leak:

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend Design Systems Integration

Best practices for integrating design systems without destroying existing brand identity.

Core Principle

Brand preservation > Design system purity

Design systems provide valuable patterns, but blindly applying them can harm established brands.

Safe Integration Pattern

  1. Audit first - Document what would change
  2. Impact assessment - Present changes to stakeholders
  3. Get approval - Explicit sign-off on brand changes
  4. Start subtle - Interaction patterns before visual overhaul
  5. Keep escape hatch - Separate commits for easy reversion

CSS Token Bridge for Template Adoption

When adopting a template that uses its own CSS custom property names, a token bridge alias section avoids the need to find-and-replace template variable names across all CSS files. Append an alias block to the project's existing design-tokens.css:

/* Token bridge: template aliases → project tokens */
--color-bg: var(--bg-primary);
--color-text: var(--text-primary);
--color-accent: var(--accent-primary);
--font-heading: var(--font-brand);

Template CSS works without modification, project tokens remain the single source of truth, and both naming schemes are documented for future developers. This approach also makes template updates easier since template CSS files are never modified.

Find-and-replacing across all template CSS files is error-prone, makes template updates difficult, and can miss references in media queries or pseudo-elements.

Hero Section Best Practices

  • Subtext length: 80-120 characters max, 1-2 sentences. Leading with outcome rather than mechanism communicates value faster.
  • Trust signals (privacy, security, AI): standalone badge elements near CTA tend to perform better than embedding multiple ideas in subtext.
  • H1 font weight: 600-700 for marketing heroes; weight 300-400 reads as body text at display sizes.
  • 5-second rule: the value proposition should be clear without scrolling. Line count per viewport is a useful verification metric.

Image Integration: Grid Flow over Absolute Positioning

When adding lifestyle or editorial photos to hero sections, the existing grid system (e.g., hero-grid with 1fr 1fr) creates intentional-looking layouts with zero new CSS. Absolute positioning (position: absolute; bottom: 0; right: 5%) on centered-text layouts reads as an afterthought and often requires opacity tricks or gradient masks to look acceptable. Grid flow handles responsive collapse naturally.

Grid Orphan Centering (2-Column Layouts)

When a 2-column grid has an odd number of items, the last item sits alone on the left. Center it with:

@media (min-width: 969px) {
  .grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: calc(50% - var(--space-xl) / 2);
  }
}

On mobile single-column layouts, the max-width constraint makes the card too narrow — scope to desktop breakpoints only.

max-width + text-align: center Interaction

Anti-PatternPattern
Global p { max-width: 60ch } inside text-align: center containers — paragraph is narrower than container and sits left-alignedAdd margin-left: auto; margin-right: auto to centered paragraphs, or scope max-width more narrowly

Shared-Stylesheet Scoping (Single-File Design Systems)

When new rules live in a stylesheet shared across pages that reuse base selectors, scope them so they cannot leak:

/* Prefix the component root, then descend with explicit child combinators */
.blog-article > .container > p { margin-block: var(--space-md); }

A unique prefix class plus > .container > child combinators confines the rule to one component subtree — a bare p { … } or .container p { … } will reach every page sharing the base markup.

Reset-based base-p rhythm gotcha: in reset-based systems the base p has margin: 0, and each context re-adds its own spacing. A new prose context inherits nothing and collapses into a wall of text until you give it scoped vertical rhythm. Don't assume default paragraph spacing exists — set it explicitly on the new context. Screenshot-verify at real widths: markup and JSON-LD validation pass while a collapsed-spacing or CSS-leak bug only shows in the browser.

Post-Build UI Audit Cycle

Ship to branch → launch audit agent in background (aiee-frontend-engineer or frontend-accessibility) → group findings by severity (Critical → High → Medium → Low) → batch-fix per tier → visual verify with Playwright before merge.

In practice this catches 20+ issues per page: broken aria-labelledby, wrong semantic elements, cursor affordances on non-interactive elements. See reference.md § Post-Build UI Audit Cycle for the full step-by-step procedure.

Headless Playwright + IntersectionObserver fade-ins

Sites that use IntersectionObserver to fade cards in from opacity: 0 (common pattern: main.js toggles .is-visible class on scroll-into-view) render as empty white space in headless Playwright screenshots — no scroll event fires, so the observer never triggers.

Fix before screenshotting:

await page.evaluate(() => {
    document.querySelectorAll('.card, [data-animate]').forEach(el => {
        el.style.opacity = '1';
        el.classList.add('is-visible');
    });
});
await page.screenshot({ path: 'out.png', fullPage: true });

Localhost gotcha: WebFetch auto-upgrades http:// to https:// and fails on local dev servers. Use Playwright MCP tools (browser_navigate + browser_snapshot) to inspect localhost — the accessibility snapshot is structured text that's easier to analyze than a screenshot.

See reference.md for detailed patterns and case studies.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.