agentleFS
MaGe1993MaGe1993/Claude-Code-Base-Harness/.claude/skills/frontend/SKILL.md

frontend

Skill1 starsChanged 6 months agoMITView on GitHub

Generate standalone HTML using any stored UI system; falls back to base-ui (glassmorphism, no deps) when none is registered. Component API, alert patterns, document shell, accessibility.

37 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use backend, programming and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xiaobei930Skill

    backend

    Backend development patterns for services, error handling, logging, caching. Use when building backend services, APIs, or microservices.

    Also in 10 projects that use this

  • Xia-AtaraxiaSkill

    programming

    Guides correctness-first, type-strict Python and TypeScript implementation. Use when asked to write a `.py` or `.ts` file, scaffold a Python/TypeScript project, add strict types, assess an implementation diff for correctness or type holes, or fix a reproducible defect. Not for smell-only assessment or behavior-preserving restructuring — use refactor; not for suite-level test architecture — use testing.

    Also in 3 projects that use this

  • iankikuSkill

    data

    (forwward) Designs analytics systems, writes SQL queries, plans event tracking, and builds dashboards for product and user metrics. Triggers on SQL, analytics, dashboards, tracking, data pipelines, or user behavior analysis.

    Also in 3 projects that use this

  • GoogleSkill

    quality

    Evaluates whether a GitHub issue is spam, empty, needs more information, or is OK to proceed.

    Also in 3 projects that use this

  • 0xSeroSkill

    security

    Also in 7 projects that use this

  • AnthropicSkill

    architecture

    Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the output requires interactive charts, pair it with a dedicated charting library (e.g.

    line 15
  2. Very specific:

    Read the project's .claude/skills/frontend/assets/ directory.

    line 21
  3. Distinctive:

    If exactly one non-base-ui system exists: use it.

    line 23
  4. Distinctive:

    If multiple non-base-ui systems exist: ask the user which one to apply before proceeding.

    line 24
  5. Very specific:

    If no non-base-ui system exists: use base-ui/ (see §5 for its component API).

    line 26
  6. Distinctive:

    If the user's request names a specific system (e.g.

    line 27
  7. Distinctive:

    No design system is specified: fall back to base-ui.

    line 47
  8. Very specific:

    If the project supplies its own CSS outside the assets/ registry: reference that file directly and skip this skill.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “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

1§ Purpose

Produce correct, visually consistent standalone HTML by selecting the right UI system for the current project. A project can register any number of UI systems under .claude/skills/frontend/assets/. The skill detects which system is available and applies it. When no project-specific system is registered, base-ui is the fallback.

When the output requires interactive charts, pair it with a dedicated charting library (e.g. ECharts).

2§ UI system selection

On every invocation, run this selection in order:

  1. Read the project's .claude/skills/frontend/assets/ directory. Look for subdirectories other than base-ui/ — each subdirectory is a registered UI system.
  2. If exactly one non-base-ui system exists: use it.
  3. If multiple non-base-ui systems exist: ask the user which one to apply before proceeding.
  4. If no non-base-ui system exists: use base-ui/ (see §5 for its component API).
  5. If the user's request names a specific system (e.g. "use Tailwind variant"): that overrides detection.

3§ Registering a UI system

A UI system is a subdirectory under assets/ with at least:

assets/<system-name>/
  tokens.css       — CSS custom properties (or equivalent design tokens)
  components.css   — component styles consuming the tokens
  README.md        — component API, markup patterns, document shell

Claude reads README.md before producing any HTML for that system. All component usage, markup conventions, and shell structure come from that file.

4§ Use when

  • Generating any standalone HTML file: reports, dashboards, result pages, demos, data summaries.
  • The user requests a specific UI system from the registered list.
  • No design system is specified: fall back to base-ui.
  • If the project supplies its own CSS outside the assets/ registry: reference that file directly and skip this skill.

5§ base-ui reference

Asset files:

assets/base-ui/
  tokens.css      — CSS custom properties: brand, semantics, glass, bevel/concave,
                    typography, spacing, motion. Includes Google Fonts @import for
                    Roboto and Roboto Mono.
  components.css  — components consuming the tokens
  demo.html       — usage showcase; open in a browser to verify the design

5.1§ Linking

<link rel="stylesheet" href="base-ui/tokens.css">
<link rel="stylesheet" href="base-ui/components.css">

For single-file HTML output: paste the full content of tokens.css then components.css inside one <style> block.

5.2§ Component reference

ClassElementNotes
.cardAny containerGlass surface
.card-raisedAny containerDeeper shadow (--shadow-lg)
.card-concaveAny containerRecessed/inset surface
.alert<div>Glass callout; NO colored border or bar
.alert-info / .alert-success / .alert-warning / .alert-errorAdded to .alertColors icon and title text only
.alert-icon<span> inside .alertUnicode icon; colored by modifier
.alert-body<div> inside .alertFlex column
.alert-title<span> inside .alert-bodyBold label; colored by modifier
.alert-text<span> inside .alert-bodyMuted body text; never colored
.badge<span>Glass pill
.badge-accent / .badge-info / .badge-success / .badge-warning / .badge-errorAdded to .badgeText color only
.btn<button>, <a>Glass button with bevel
.btn-primaryAdded to .btnBrand gradient fill; one per section
.btn-ghostAdded to .btnTransparent; gains glass on hover
.band<div>Brand gradient accent band
.stat<div>KPI container
.stat-value / .stat-label / .stat-deltaChildren of .stat—
.stat-delta-up / .stat-delta-down / .stat-delta-flatAdded to .stat-deltaColored pill
.progress<div>Track
.progress-bar<div>Brand gradient; override with -success, -warning, -error
.container<div>Max-width 72 rem, centered
.grid-2 / .grid-3 / .grid-4<div>Responsive CSS grid
.flex-c<div>Flex row, vertically centered
.flex-w<div>Adds flex-wrap: wrap
.gap-2 / .gap-4 / .gap-6<div>Gap utilities
.divider<div>Labelled horizontal rule

5.3§ Alert markup pattern

<div class="alert alert-warning">
  <span class="alert-icon">&#x26A0;</span>
  <div class="alert-body">
    <span class="alert-title">Deprecation</span>
    <span class="alert-text">Body text here — never colored.</span>
  </div>
</div>

Icons by state: info &#x2139;, success &#x2713;, warning &#x26A0;, error &#x2715;.

5.4§ Document shell

<!doctype html>
<html lang="en" data-theme="dark">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page Title</title>
  <link rel="stylesheet" href="base-ui/tokens.css">
  <link rel="stylesheet" href="base-ui/components.css">
</head>
<body>
<div class="container">
  <!-- content -->
</div>
</body>
</html>

5.5§ Preferred patterns

  • Everything glass — .card everywhere; never mix flat and glass surfaces.
  • Semantic state via icon + title color only — never a colored surface, border, or bar.
  • Accent headings: style="color: var(--accent)" on h2 / h3.
  • Tables inside .card for containment and padding.
  • Stat values in semantic colors: style="color: var(--success)" on .stat-value.
  • Inline style for one-off overrides; never hardcode hex — use var(--token).

5.6§ Avoid

  • Hardcoded color hex values.
  • Any colored border, bar, or strip on alerts or cards.
  • Mixing flat and glass surfaces.
  • More than one .band per page.
  • Nesting .card inside another .card.
  • Tables without a .card wrapper.

6§ Accessibility baseline

Apply to every generated HTML file regardless of UI system:

  • Structure: semantic elements — <main>, <header>, <nav>, <article>, <section>.
  • Images: every <img> needs alt. Decorative images get alt="".
  • Icon-only controls: aria-label="Descriptive action" on any button or link with only an icon.
  • Minimum contrast: never use the faintest foreground token for body copy.

7§ Associated documents

  • [assets/base-ui/tokens.css] — CSS custom properties
  • [assets/base-ui/components.css] — component styles
  • [assets/base-ui/demo.html] — usage showcase

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.