Agent skill

Frontend Mockup Loop

by BlackBeltTechnology in BlackBeltTechnology/pi-agent-dashboard

Plan, build, and iterate UX-friendly frontend mockups via a ground→contract→mockup→test→fix→learn loop, acting as an expert UX designer who grounds every decision in externally documented public…

MITAuto-check passedFrontend & Design

Install Frontend Mockup Loop

skills CLI
$ npx skills add BlackBeltTechnology/pi-agent-dashboard --skill frontend-mockup-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install BlackBeltTechnology/pi-agent-dashboard frontend-mockup-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/mockup-loop/.pi/skills/frontend-mockup-loop .claude/skills/frontend-mockup-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
frontend-mockup-loop
GitHub stars
315
Token cost
~2.9k tokens
SKILL.md length
1,438 words
Files
1
Skills in repo
66
Repo updated
First seen
Licence
MIT

At a glance

Plan, build, and iterate UX-friendly frontend mockups via a ground→contract→mockup→test→fix→learn loop, acting as an expert UX designer who grounds every decision in externally documented public…

  • Works in 7 steps: GROUND — adapt what ships + what's… → CONTRACT — the consistency control plane → MOCKUP — diverge in HTML, serve it live → …
  • Designing new screens
  • SKILL.md covers Select a design system…, Act as an expert UX designer, When to Use and Procedure, plus 3 more sections
  • Calls npx

What it does

Frontend Mockup Loop is an agent skill from BlackBeltTechnology/pi-agent-dashboard. Plan, build, and iterate UX-friendly frontend mockups via a ground→contract→mockup→test→fix→learn loop, acting as an expert UX designer who grounds every decision in externally documented public design rules (Nielsen heuristics, Laws of UX, WCAG, GOV.UK/USWDS/Material). Uses the bundled servemockup, scoremockup, and inituicontract tools plus a ui-contract.md design control plane to keep screens consistent. Works in any React/Tailwind/shadcn (or plain HTML) project. Use when designing new screens, adapting…

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Design systems, Accessibility and CSS and styling. It works with shadcn/ui, Tailwind CSS and React. The repository describes itself as: Real-time web dashboard for pi coding-agent sessions. Multi-session view, live chat mirroring, integrated terminal, diff viewer, pi-flows execution, and mobile-first remote… The licence is MIT.

When your agent uses it

  • Designing new screens
  • Adapting existing UI
  • Enforcing cross-screen consistency
  • Doing a UX review

Example prompts

  • “design a screen”
  • “mockup this UI”
  • “wireframe”
  • “/frontend-mockup-loop”

Requirements

  • Node.js

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. GROUND — adapt what ships + what's documented, don't invent
  2. CONTRACT — the consistency control plane
  3. MOCKUP — diverge in HTML, serve it live
  4. TEST — run the expert-UX evaluation protocol
  5. FIX — one criterion at a time
  6. PROMOTE — close the apply-gap
  7. LEARN — compound across runs

What it can do on your machine

Read from SKILL.md and the folder at commit 86e8e4d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Frontend Mockup Loop loads about 2.9k tokens when it runs. Until then it costs about 194 tokens; SKILL.md has 1,438 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~194
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from BlackBeltTechnology/pi-agent-dashboard at commit 86e8e4d, republished under its MIT licence (© BlackBeltTechnology). 1,438 words, ~2,904 tokens.

Download SKILL.mdSave it as .claude/skills/frontend-mockup-loop/SKILL.md (or your agent's skills folder).
name
frontend-mockup-loop
description
Plan, build, and iterate UX-friendly frontend mockups via a ground→contract→mockup→test→fix→learn loop, acting as an expert UX designer who grounds every decision in externally documented public design rules (Nielsen heuristics, Laws of UX, WCAG, GOV.UK/USWDS/Material). Uses the bundled serve_mockup, score_mockup, and init_ui_contract tools plus a ui-contract.md design control plane to keep screens consistent. Works in any React/Tailwind/shadcn (or plain HTML) project. Use when designing new screens, adapting existing UI, enforcing cross-screen consistency, or doing a UX review. Triggers: "design a screen", "mockup this UI", "wireframe", "make the UI consistent", "adapt the existing design", "improve this layout", "UX review", "is this good UX".
license
MIT
metadata.author
blackbelt-technology
metadata.version
0.2

frontend-mockup-loop

A disciplined loop for designing frontend surfaces. It exists to defeat distributional convergence: an undirected agent regresses to the statistical mean of its training data — generic Inter font, a purple gradient, a centered hero. "Make it look better" just returns the average again.

The fix the whole agentic-design field converged on, and what this loop enforces every time:

  1. deliberate direction from a real reference (GROUND),
  2. a consistent token system (the ui-contract),
  3. a screenshot feedback loop (eyes on output).

This skill is paired with an extension that registers five tools: serve_mockup, score_mockup, init_ui_contract, list_design_systems, validate_mockup.

Select a design system (optional)

The loop runs design-system agnostic by default (generic anti-slop rubric). To target a specific system, pick a preset and pass its id to the tools' system param. v1 presets (list_design_systems enumerates them):

idsystemplatformsubstrate
shadcnshadcn/ui + TailwindwebHTML + Tailwind
muiMaterial UIwebHTML
material-3Material Design 3webHTML
fluent-2Fluent 2webHTML
apple-higApple HIGiOSHTML approximation → SwiftUI on promote

With a system selected: init_ui_contract{system} writes that system's DTCG token contract (from a bundled, offline snapshot; refresh:true re-fetches upstream), score_mockup{system} swaps in the system's boolean rubric, and validate_mockup{system,dir} runs the gated pipeline.

Gate vs advisory

Validation is layered. Gates block pass; advisory layers only score and drive the fix loop (LLM visual scores skew positive — never hard-block):

  • L1 token-lint — static; HARD GATE when a linter applies (off-token color literals fail shadcn/material-3).
  • L2 a11y floor — rendered axe + WCAG contrast; HARD GATE, every system.
  • L3 named-system auditor — hig-doctor / material3-mcp etc., advisory, shelled out only if installed (absent → skipped + noted, never errors).
  • L4 vision rubric — per-preset boolean checks; score = pass/N computed in code, advisory.

validate_mockup returns { gates, advisory, pass }; pass is gate-only.

Apple HIG in a browser-first loop

Apple publishes no token JSON, so apple-hig ships a hand-authored rule pack (presets-data/apple-hig/rules.md). Render an HTML approximation of the iOS screen so serve_mockup can serve it and hig-doctor (if installed) can audit it — no SwiftUI/Xcode required in-loop:

  • SF Pro stack: font-family: -apple-system, "SF Pro Text", system-ui.
  • 44×44pt minimum tap targets; 8pt spacing grid.
  • Safe areas: padding: env(safe-area-inset-top) … env(safe-area-inset-bottom).
  • Bottom tab bar, ≤5 items; iOS semantic colors (label, systemBackground, systemBlue), no hardcoded brand hex on system chrome.

On PROMOTE, optionally emit real SwiftUI — validated on source by hig-doctor / orchard-hig (no live browser preview; real-device fidelity needs macOS/Xcode). SwiftUI is never required for the in-loop preview.

Act as an expert UX designer

Rule: ground every UX decision in an externally documented, public-facing design rule — never invent one. When you make a call, you must be able to name the rule and cite its public source. "I think it looks better" is not a reason; "Hick's Law — reduce the choices here (lawsofux.com/hicks-law)" is.

The full citable rule corpus lives in references/ux-best-practices.md: Nielsen's 10 heuristics, Laws of UX, Gestalt, cognitive load, per-component pattern rules, the 5-step expert evaluation protocol, and a 22-item checkable rubric seed. Read it before designing or reviewing.

Source order (adapt, don't copy): the selected design system's documented guidance first → then the universal sources, in licensing-safe order (USWDS is CC0; GOV.UK is OGL; NN/g + Laws of UX cite-with-attribution; Material/Carbon are Apache-2.0). Adapt the principle to this product; never copy proprietary assets/text (Apple HIG, Refactoring UI, Mobbin).

Anti-slop companion (advisory). For the AI-tell layer — the countable signatures an undirected model defaults to (AI-purple, Inter-everywhere, em-dashes, div-based fake screenshots, eyebrow-per-section, Jane Doe / Acme data) — pull the anti-slop-frontend skill (@blackbelt-technology/anti-slop-frontend). It is advisory only: its tells feed the FIX step's defect list (step 5), but they NEVER override this loop's hard gates. When an anti-slop tell conflicts with a cited public rule or the WCAG-AA / severity-4 floor, the cited rule and the gate win. Apply its Part A (universal) to any surface; skip its Part B (marketing-only) for product UI.

When to Use

Designing or refining any frontend surface — new screens, redesigns, or a consistency pass across existing screens. Skip for trivial one-class tweaks. Not for backend/protocol work.

Procedure

1. GROUND — adapt what ships + what's documented, don't invent

Two grounds, both external:

  • The real UI — open the running app and READ the authoritative component source. Capture the EXACT tokens already in use: class names, CSS custom properties (--background, --primary, --radius), spacing, dark + light.
  • The documented rules — open references/ux-best-practices.md and the selected design system's public guidance. Identify the specific patterns and laws that govern this surface (e.g. a form → NN/g web-form-design + GOV.UK error-summary; a nav → Hick's Law + hamburger-menu guidance).

Designing without either ground produces a parallel style that looks "off" and a UX that violates well-known rules — the opposite of adapting documented design.

2. CONTRACT — the consistency control plane

Read or scaffold ui-contract.md (run init_ui_contract). It is the single source of truth for cross-screen properties: color ramps, spacing scale, type scale, radius, elevation, motion, component invariants. Every value references a design token — never a raw hex or px literal. If a surface needs a token that doesn't exist, add it to the theme layer first, then cite it in the contract. This file is what stops screens from drifting apart.

Show full SKILL.md (598 more words)Show less
3. MOCKUP — diverge in HTML, serve it live

Build standalone HTML/Tailwind mockups grounded in steps 1–2. Serve them with serve_mockup and hand back the clickable local + LAN URL (the LAN URL opens on a phone) — not a screenshot — so the human reacts to a real page. Render dark AND light.

4. TEST — run the expert-UX evaluation protocol

Run score_mockup to capture full-page screenshots at mobile/tablet/desktop widths, then apply the 5-step protocol from references/ux-best-practices.md:

  1. Accessibility floor (hard gate) — contrast 4.5:1, target size, focus visible, color-not-sole-channel, reduced-motion.
  2. Heuristic boolean rubric — the 22-item rubric seed (Nielsen + Laws of UX
    • component rules) scored yes/no; for a user flow, the cognitive-walkthrough 4 questions per step.
  3. PURE friction — rate each task step green/yellow/red; worst step wins.
  4. Severity 0–4 per defect (Nielsen scale).
  5. Prioritized fix list — accessibility-gate first, then severity.

Score = passed / N, derived in code — never a subjective "looks good" and never a free-form float (LLM visual scores skew positive). Each failed check cites the rule it violates.

5. FIX — one criterion at a time

Apply the top failing item, re-serve, re-score. Loop 3–5 until every rubric line passes in both themes at all three breakpoints.

6. PROMOTE — close the apply-gap

Translate the approved HTML direction into real React/shadcn components. Do this in an ISOLATED environment (temp workspace, non-production ports), never against a live server. Map the mockup's tokens 1:1 so shipped code matches the approved mockup with zero drift.

7. LEARN — compound across runs

Record durable taste decisions so the next run starts smarter: stable rules → agent memory; repo design rules → patch ui-contract.md; one-off rationale → the change's notes.

Tools (bundled by the extension)

  • serve_mockup{dir, port?, stop?} — Node static server on 0.0.0.0; returns local + LAN URLs. Zero external deps.
  • score_mockup{url, widths?, outDir?, system?} — Playwright breakpoint screenshots + scoring rubric. Chromium is declared in this package's pi.tools (optional pw-browser probe); absent → install guidance via the registry's Install dropdown or pi-dashboard-ensure (npx playwright@1.62.1 install chromium).
  • init_ui_contract{path?, force?, system?, refresh?} — scaffold the token-referencing contract. With system, write that preset's DTCG contract (offline snapshot; refresh re-fetches upstream first). No system → generic blank template (unchanged).
  • list_design_systems{} — enumerate the preset registry (id, label, platform, substrate, validators).
  • validate_mockup{system, url?, dir?} — run L1+L2 (gates) + L3+L4 (advisory); returns { gates, advisory, pass }. Pass dir so L1/L2 can scan the source.

Pitfalls

  • Do NOT verify against a live/production server — isolate the env so mockup edits actually load.
  • Do NOT put raw hex/px in the contract or mockups; reference tokens, else consistency erodes the moment a theme changes.
  • Do NOT skip GROUND — parallel styling looks "off" next to shipped screens.
  • Do NOT hand back screenshots for HUMAN review when a live URL is possible. Screenshots are for the AGENT's scoring step; live URLs are for the human.
  • Do NOT let "make it nicer" be the instruction to yourself — score against the named rubric.
  • Do NOT invent a UX rule or justify a decision by taste alone — cite an external documented public source (see references/ux-best-practices.md).
  • Do NOT block "pass" on advisory taste while a WCAG-AA or severity-4 defect remains — the accessibility floor is the hard gate.

Verification

  • ui-contract.md exists; every value references a token; the new surface's tokens appear in it.
  • A live mockup URL (local + LAN) was handed back and renders in BOTH themes at mobile/tablet/desktop.
  • A written rubric passes — not a subjective "looks good".
  • Every UX decision traces to a cited external rule (heuristic / law / pattern / WCAG criterion), not taste.
  • The accessibility floor passes (no WCAG-AA or severity-4 defect open).
  • If promoted: components were verified in an isolated env; production was left untouched.
  • Durable learnings were recorded so the loop compounds.

© BlackBeltTechnology, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/mockup-loop/.pi/skills/frontend-mockup-loop of BlackBeltTechnology/pi-agent-dashboard.

Open the folder on GitHubat commit 86e8e4d

Compare with similar skills

Frontend Mockup Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Frontend Mockup Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frontend Mockup Loop this skillBlackBeltTechnology/pi-agent-dashboard315—~2.9kAutomated safety check: PassMIT
Extract DesignManavarya09/design-extract4.2k—~786Automated safety check: NotesMIT
UI Design Systemtry-works/role-model118—~5kAutomated safety check: PassMIT
Audit AI Frontendjxnl/personal-monorepo-template563—~1.3kAutomated safety check: PassNone
Light Frontend DesignLight0305/Light-skills640—~3.1kAutomated safety check: PassMIT
Frontend Designseb1n/awesome-ai-agent-skills206—~2.3kAutomated safety check: PassMIT

Similar skills

  • Extract Design

    Manavarya09/design-extract

    Extract the full design language from any website URL. An agent skill from Manavarya09/design-extract.

    4.2k GitHub stars~786 tokensUpdated today
    Frontend & DesignAuto-check: notes
  • UI Design System

    try-works/role-model

    React UI component systems with TailwindCSS + Radix + shadcn/ui.

    118 GitHub stars~5k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Audit AI Frontend

    jxnl/personal-monorepo-template

    Audit AI-generated, AI-shaped, or AI-looking frontend code, UI screenshots, and design diffs.

    563 GitHub stars~1.3k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Light Frontend Design

    Light0305/Light-skills

    Light 按需工程技能·前端设计:把模糊的「做个好看的界面」落成能跑的 React/Tailwind/shadcn 代码 + 设计决策说明—— 有视觉记忆点(signature element)、风格自洽(design tokens 一致)、适配场景(学术海报/数据大屏/管理后台/移动端/营销 landing 信息密度各不同)、反「一眼 AI」(紫蓝渐变/Inter/16px 圆角/巨型…

    640 GitHub stars~3.1k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Frontend Design

    seb1n/awesome-ai-agent-skills

    Design and build production-ready frontend interfaces with design systems, responsive layouts, accessible components, and dark mode support.

    206 GitHub stars~2.3k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed

More from BlackBeltTechnology/pi-agent-dashboard

All 66 skills in this repo
  • Browser

    BlackBeltTechnology/pi-agent-dashboard

    Browser automation via the agent-browser CLI. An agent skill from BlackBeltTechnology/pi-agent-dashboard.

    315 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • CI Troubleshoot

    BlackBeltTechnology/pi-agent-dashboard

    Diagnose failed GitHub Actions runs for pi-agent-dashboard: the 11-file workflow taxonomy, affected-test selection, the release pipeline, known failure modes, and how to read gh run logs and…

    315 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Debug Dashboard

    BlackBeltTechnology/pi-agent-dashboard

    Diagnose problems in the running pi-agent-dashboard system: server.log, /api/health, bridge WebSocket connectivity, vitest triage, known-issue FAQ entries.

    315 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Implement

    BlackBeltTechnology/pi-agent-dashboard

    Disciplined implementation in pi-agent-dashboard: the rebuild matrix (extension→reload, server→restart, client→build+restart, openspec-apply→full rebuild) plus the project's code discipline rules.

    315 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Pi Dashboard

    BlackBeltTechnology/pi-agent-dashboard

    Monitor and control the pi-dashboard server. An agent skill from BlackBeltTechnology/pi-agent-dashboard.

    315 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Session To Guideline

    BlackBeltTechnology/pi-agent-dashboard

    Turn a pi session into a Markdown "how-we-did-it" collaboration guideline: reads the session's JSONL transcript and synthesizes a reusable playbook of which prompts worked, what had to be steered…

    315 GitHub stars~3.2k tokensUpdated today
    Auto-check passed

Questions about Frontend Mockup Loop

What does Frontend Mockup Loop do?

Plan, build, and iterate UX-friendly frontend mockups via a ground→contract→mockup→test→fix→learn loop, acting as an expert UX designer who grounds every decision in externally documented public…. Frontend Mockup Loop is an agent skill from BlackBeltTechnology/pi-agent-dashboard.UK/USWDS/Material).

When should I use Frontend Mockup Loop?

Frontend Mockup Loop fits situations like: designing new screens; adapting existing UI; enforcing cross-screen consistency; doing a UX review.

How do I install Frontend Mockup Loop in Claude Code?

Run `npx skills add BlackBeltTechnology/pi-agent-dashboard --skill frontend-mockup-loop -a claude-code`. Or copy the skill folder (packages/mockup-loop/.pi/skills/frontend-mockup-loop in BlackBeltTechnology/pi-agent-dashboard) into .claude/skills/frontend-mockup-loop in your project. Claude Code loads it when a task matches its description.

How do I install Frontend Mockup Loop in Codex?

Run `npx skills add BlackBeltTechnology/pi-agent-dashboard --skill frontend-mockup-loop -a codex`. Or copy the skill folder (packages/mockup-loop/.pi/skills/frontend-mockup-loop in BlackBeltTechnology/pi-agent-dashboard) into .agents/skills/frontend-mockup-loop in your project. Codex loads it when a task matches its description.

Can I use Frontend Mockup Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BlackBeltTechnology/pi-agent-dashboard --skill frontend-mockup-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/frontend-mockup-loop, .gemini/skills/frontend-mockup-loop, .github/skills/frontend-mockup-loop and .opencode/skills/frontend-mockup-loop in your project.

What does Frontend Mockup Loop need to run?

Going by SKILL.md and its folder, Frontend Mockup Loop needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Frontend Mockup Loop access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Frontend Mockup Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Frontend Mockup Loop use?

Frontend Mockup Loop is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Frontend Mockup Loop use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Frontend Mockup Loop?

Skills that share tags, products or a category with Frontend Mockup Loop: Extract Design (Manavarya09/design-extract, 4.2k stars), UI Design System (try-works/role-model, 118 stars), Audit AI Frontend (jxnl/personal-monorepo-template, 563 stars) and Light Frontend Design (Light0305/Light-skills, 640 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Frontend Mockup Loop?

BlackBeltTechnology (a GitHub organization) maintains it in BlackBeltTechnology/pi-agent-dashboard, which has 315 GitHub stars. The repository holds 66 skills in this directory. The repository was last updated on October 8, 2026.

Source: BlackBeltTechnology/pi-agent-dashboard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.