agentleFS
spsk-devspsk-dev/tasteful-design/CLAUDE.md

tasteful-design

CLAUDE.md0 starsChanged 8 months agoMITView on GitHub

AI-powered design review using 7 independent specialist agents. Each specialist evaluates one domain (typography, color, layout, icons, motion, intent/originality/UX/copy, code/accessibility) against curated reference knowledge. A boss synthesizer merges findings with cross-specialist confidence scoring and delivers a weighted SHIP/BLOCK verdict. Routes to the right sub-command based on arguments. All flags pass through to sub-commands: --ref, --figma, --direction, --palette, --fonts, --quick, --max N, --validate, --style, --interact. Full 7-specialist review with weighted scoring and SHIP/CONDITIONAL/BLOCK verdict. Supports --interact for hover/focus/scroll state capture. Output:…

  • In this repositoryOne other file it gives its agents.

The file

We split this CLAUDE.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    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. Very specific:

    All flags pass through to sub-commands: --ref, --figma, --direction, --palette, --fonts, --quick, --max N, --validate, --style, --interact.

    line 21
  2. Distinctive:

    If BLOCK: apply top 3 fixes from the fix list

    line 77
  3. Distinctive:

    Use full mode for final reviews before shipping.

    line 159
  4. Distinctive:

    Quality bar: Must show what DIDN'T work in CHANGELOG (v1 single-agent scored 40%) — transparency builds credibility <!-- GSD:project-end -->

    line 175
  5. Distinctive:

    Before using Edit, Write, or other file-changing tools, start work through a GSD command so planning artifacts and execution context stay …

    line 307
  6. Distinctive:

    Use these entry points:

    line 309
  7. Distinctive:

    Do not make direct repo edits outside a GSD workflow unless the user explicitly asks to bypass it.

    line 314

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md 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
CLAUDE.md

SpSk -- Design Review Plugin

AI-powered design review using 7 independent specialist agents. Each specialist evaluates one domain (typography, color, layout, icons, motion, intent/originality/UX/copy, code/accessibility) against curated reference knowledge. A boss synthesizer merges findings with cross-specialist confidence scoring and delivers a weighted SHIP/BLOCK verdict.

Available Commands

/design -- Orchestrator

Routes to the right sub-command based on arguments.

/design                    # Show available commands
/design review             # Full visual review
/design review --quick     # Quick review (4 specialists)
/design validate           # Functional validation
/design improve "prompt"   # Build and iterate until SHIP
/design check              # Review + validate (pre-merge)
/design ship "prompt"      # Full pipeline: improve -> review -> validate

All flags pass through to sub-commands: --ref, --figma, --direction, --palette, --fonts, --quick, --max N, --validate, --style, --interact.

/design-review -- Visual Design Review

Full 7-specialist review with weighted scoring and SHIP/CONDITIONAL/BLOCK verdict. Supports --interact for hover/focus/scroll state capture.

/design-review                              # Review current page (auto-detects dev server)
/design-review http://localhost:3000/page   # Review specific URL
/design-review --quick                      # 4 specialists instead of 8 (~40% fewer tokens)
/design-review --ref https://stripe.com     # Compare against a reference site
/design-review --ref ./design-spec.md       # Compare against a design spec file
/design-review --figma https://figma.com/design/abc/...          # Review a Figma design
/design-review --figma https://figma.com/design/abc/... --compare # Check implementation vs Figma
/design-review --direction "warm, playful"  # Evaluate against a creative brief
/design-review --palette "#1a1a2e,#f5f0eb"  # Enforce specific color palette
/design-review --fonts "DM Sans,Instrument Serif"  # Enforce specific fonts
/design-review --style serious-dashboard    # Apply a style preset
/design-review --interact                  # Capture hover/focus/scroll states before review
/design-review --interact --quick           # Quick review with interaction capture

Flags:

FlagEffect
--quickRun 4 core specialists instead of 7. Uses /13 weights instead of /16. Saves ~40% tokens.
--ref <url|file|figma>Compare against a reference instead of generic gold standards
--figma <url>Review a Figma design before building. Add --compare to check implementation fidelity
--direction "<text>"Evaluate against a text creative brief
--palette "<colors>"Override color evaluation with specific palette
--fonts "<fonts>"Override font evaluation with specific fonts
--style <preset>Apply a style preset (see Configuration)
--interactCapture hover/focus/scroll states via Playwright MCP before specialist review. Opt-in.

Output: Scores per specialist, cross-specialist consensus findings, weighted verdict, prioritized fix list with file:line references.

Duration: ~8-10 min full, ~5 min quick.

/design-improve -- Iterative Build and Fix Loop

Builds or takes a page, reviews it, applies fixes, re-reviews until SHIP or max iterations.

/design-improve "Build a landing page"                  # Build from scratch and iterate
/design-improve --ref https://splice.com "music page"   # Build to match a reference
/design-improve --max 5 "admin panel"                   # Up to 5 iterations (default 3)
/design-improve --quick "dashboard"                     # Quick mode for intermediate reviews
/design-improve --validate "billing page"               # Run functional validation each iteration
/design-improve --style animation-heavy "landing page"  # Apply style preset to build + review
/design-improve --palette "#faf5f0,#8b6f47" --fonts "Newsreader,Figtree" "mothers day page"

How it works:

  1. Build the page (or receive existing page)
  2. Run /design-review
  3. If BLOCK: apply top 3 fixes from the fix list
  4. Re-review (only re-runs failing specialists)
  5. Repeat until SHIP or max iterations

Re-reviews only re-run specialists that scored <=2. Passing specialists keep their scores. Each iteration targets different issues.

/design-validate -- Functional Validation

Clicks every button, fills every form, navigates every link, checks console for JS errors. Reports broken, unreachable, or incomplete functionality.

/design-validate                              # Validate current page
/design-validate http://localhost:3000/page   # Validate specific URL

What it checks:

  • Links: dead links, placeholder hrefs, broken navigation
  • Buttons: click handlers, visible state changes
  • Forms: fillable inputs, submit behavior
  • Interactive elements: tabs, toggles, modals, dropdowns
  • Console errors and network failures
  • Mobile touch targets (44px minimum)
  • Loading, empty, error, and success states

Requires: Playwright (npx playwright install chromium)

Configuration

config/scoring.json

Controls specialist weights and page-type thresholds.

  • weights: how much each specialist affects the final score (Intent: 3x, Typography: 2x, Icons: 1x, etc.)
  • thresholds: minimum score to SHIP by page type (admin: 2.5, landing: 3.0, portfolio: 3.5)
  • verdict_rules: SHIP/CONDITIONAL/BLOCK logic
  • scale: scoring range (1.0 to 4.0)

config/anti-slop.json

Banned fonts, palettes, and AI patterns. The /design-improve command reads this during build phase to avoid common AI output patterns.

  • banned_fonts: fonts flagged on sight (Dancing Script, Playfair Display, Poppins, etc.)
  • recommended_fonts: good alternatives by category (sans, serif, mono, display)
  • banned_palettes: cliche color combinations (synthwave, dark+gold, gray-everything)
  • banned_patterns: layout anti-patterns (emoji-as-icons, three-column-icon-grid)
  • required_accessibility: a11y requirements checked in every review

Edit this file to add project-specific rules.

config/style-presets.json

5 built-in style presets that set the design direction for all reviews and builds:

PresetVibeReferences
serious-dashboardData-dense, functionalLinear, Grafana, Vercel
fun-lightheartedPlayful, warm, personalityNotion, Figma, Slack
animation-heavyCinematic, immersiveApple, Stripe, Vercel
minimal-editorialTypography-driven, quietMedium, iA Writer
startup-landingBold, conversion-focusedVercel, Linear, Raycast

Set "active_preset": "serious-dashboard" to apply globally, or use --style <name> per command. Add custom presets by editing the JSON.

Degradation Behavior

The plugin adapts to available tools:

  • Tier 1 (Gemini + Playwright): Best quality. Color and Layout use Gemini for cross-model diversity.
  • Tier 2 (Playwright only): Claude handles all specialists. Works well but has correlated blind spots.
  • Tier 3 (No Playwright): Code-only analysis. Warns user that visual review is impossible. Recommends npx playwright install chromium.

Gemini rate limits are handled with retry + fallback. The tier is always reported in review output.

Quick Mode

--quick runs 4 core specialists instead of 7:

  • Font, Color, Layout, Intent/Originality/UX
  • Skips: Icon, Motion, Code/A11y
  • Uses /13 weight divisor instead of /16
  • Saves ~40-50% tokens
  • Best for: iterative fix cycles where you want fast feedback

Use full mode for final reviews before shipping.

<!-- GSD:project-start source:PROJECT.md -->

Project

SpSk (Simple Skill)

A GitHub portfolio project that publishes Felipe Machado's most polished AI agent skills as open-source Claude Code plugins. Design-review is the flagship skill (7 specialist agents, 9 scored dimensions, design contract autodetect, HTML reports). The repo serves as a professional showcase demonstrating deep understanding of AI agent architectures, harnesses, and their practical value for developers.

Core Value: The published skills must be immediately useful to other developers AND demonstrate architectural sophistication — the tool is the proof, the architecture is the CV.

Constraints

  • Distribution: Claude Code plugin registry as primary (claude /install-plugin tasteful-design@spsk-dev/tasteful-design) + install.sh for manual
  • Branding: Clean and compact, NOT big ASCII art. Signature line format: SpSk design-review v1.2.0 --- 7 specialists · tier 1
  • Init wizard: Exactly 5 questions with opinionated defaults (page type, vibe preset, light/dark, brand colors, font preference)
  • Quality bar: Must show what DIDN'T work in CHANGELOG (v1 single-agent scored 40%) — transparency builds credibility
<!-- GSD:project-end --><!-- GSD:stack-start source:research/STACK.md -->

Technology Stack

Context

Recommended Stack Additions

Core: Playwright MCP Server (SPA Flow Navigation)

TechnologyVersionPurposeWhy Recommended
@playwright/mcplatestSPA flow navigation via MCP toolsOfficial Microsoft MCP server. Gives Claude persistent browser state, click/navigate/snapshot tools without writing throwaway scripts. Already used conceptually in /design-validate.
MCP ToolUse in Flow Audit
-----------------------------
browser_navigateInitial page load
browser_snapshotAccessibility tree for element discovery (find buttons, links, nav items)
browser_clickNavigate SPA by clicking route triggers
browser_wait_forWait for route transitions to complete
browser_take_screenshotCapture each screen state as PNG
browser_evaluateRun JS for animation detection, CSS analysis
browser_console_messagesCatch JS errors during navigation
browser_tabsManage browser session
browser_closeCleanup
  • Network mocking tools (browser_route, browser_unroute) -- not auditing network behavior
  • Storage tools (cookies, localStorage) -- not testing auth flows in v1.1
  • DevTools tracing/video -- not recording traces
  • Coordinate-based mouse tools -- use accessibility-based clicks instead
  • Testing/assertion tools -- we do our own scoring

Screenshot Strategy: Base64 Inline in HTML Report

ApproachDecisionWhy
Base64 data URIsYES -- use thisSingle self-contained HTML file. No external dependencies, no broken image links, works when opened from any location. Users can email, upload, or archive the report as one file.
File path referencesNOBreaks when moved, requires serving from correct directory, unusable as email attachment
Hosted imagesNORequires upload service, adds network dependency, privacy concerns for unreleased designs

In a shell script, encoding is trivial:

HTML Report: Template String in Shell Script

ApproachDecisionWhy
Bash heredoc templateYES -- use thisZero dependencies. A generate-report.sh script that takes a JSON manifest and screenshots directory, outputs a self-contained .html file. Matches the plugin's "no runtime" philosophy.
Node.js template engine (Handlebars, EJS)NOAdds node_modules, requires npm install. Violates the plugin's zero-dependency principle.
Python Jinja2NOSame dependency problem. Python may not be available everywhere.
Markdown-to-HTMLNOMarkdown cannot express the visual richness needed (score bars, screenshot grids, expandable sections).
  • CSS Grid for screenshot comparison layouts
  • <details> elements for expandable specialist findings
  • Inline SVG for score visualizations (progress bars)
  • @media print styles for PDF export via browser print
  • Dark/light mode via prefers-color-scheme

Animation/Transition Detection: page.evaluate with Web Animations API

TechnologyPurposeWhy
Element.getAnimations()Detect active CSS animations and transitions on any elementWeb standard (Web Animations API). Works in all Chromium browsers. Returns animation objects with timing, duration, playState.
getComputedStyle()Read CSS transition/animation properties from stylesheetsStandard DOM API. Detects declared (not necessarily running) animation properties.
CSS transition / animation property parsingCatalog what elements HAVE animation declarationsStatic analysis of computed styles reveals design intent even when animations are not currently playing.
  • Shared transitions (page-level route animations)
  • Screen-specific animations (loading spinners, entrance effects)
  • Missing animations (screens that feel "dead" compared to others)

Supporting Scripts

New Files for v1.1.0

FileTypePurpose
commands/design-audit.mdCommand/design-audit slash command -- flow navigation orchestrator
scripts/generate-report.shBashHTML report generator (template + base64 embedding)
skills/design-review/references/flow.mdReferenceFlow navigation domain knowledge for specialists

Existing Files Modified

FileChange
commands/design.mdAdd /design audit route
config/scoring.jsonAdd flow-level scoring (cross-screen consistency weight)

What NOT to Add

AvoidWhyWhat to Do Instead
PuppeteerPlaywright is already the standard here and in the plugin. Adding a second browser automation tool is confusion, not value.Playwright MCP
CypressE2E testing framework, not a browser automation tool for agent use. No MCP integration.Playwright MCP
playwright-report (built-in HTML reporter)Designed for test results, not design audits. Wrong data model (pass/fail assertions vs. specialist scores).Custom generate-report.sh
React/Vue for the reportThe report is a static artifact, not an app. Adding a JS framework to render a report is absurd over-engineering.Plain HTML + inline CSS
juice or CSS inliner librariesOnly needed for email HTML. Browser-opened HTML files read <style> tags fine.Inline <style> block in the template
sharp or image processingScreenshots are already PNGs from Playwright. No resizing/cropping needed. Base64 encoding is built into base64 CLI.base64 command
npm dependencies of any kindThe plugin has zero npm dependencies today. Adding any for report generation breaks the "no runtime" principle that makes it installable by file copy.Shell scripts + built-in browser APIs
chart.js or charting librariesScore visualizations are simple progress bars. CSS can do this. Adding a JS charting library to a static report is overkill.CSS width percentage bars or inline SVG <rect>
Playwright test runner (@playwright/test)We are not running tests. We are using Playwright as a browser automation layer. The test runner adds assertions, fixtures, and reporting we do not need.@playwright/mcp for MCP tools, npx playwright screenshot for CLI fallback

Alternatives Considered

CategoryRecommendedAlternativeWhen to Use Alternative
Browser automationPlaywright MCPTemp .mjs scripts via BashIf MCP server is unavailable (user has not run claude mcp add). The command should detect MCP availability and fall back to script generation.
Screenshot formatPNG (Playwright default)JPEGIf report size becomes a problem. JPEG is ~60% smaller but lossy. Add --jpeg flag if needed later.
Report formatSelf-contained HTMLMarkdownIf user prefers text-only output. Add --markdown flag that outputs to terminal like existing /design-review. HTML is the default because screenshots cannot be shown in markdown terminal output.
Animation detectionWeb Animations API via evaluateSource code static analysisAlways do both. Static analysis catches CSS declarations in source files. Runtime detection catches dynamically applied animations. The command should run browser_evaluate AND read source files.

Version Compatibility

ComponentRequiresNotes
@playwright/mcpNode.js 18+Uses npx, no global install needed
Playwright browsersChromium (auto-installed by MCP)npx playwright install chromium as fallback
Element.getAnimations()Chromium 84+Standard API, no polyfill needed
document.getAnimations()Chromium 84+Returns all page animations
Base64 CLImacOS base64 or Linux base64Different flags: macOS has no -w, Linux needs -w 0
HTML <details> elementAll modern browsersUsed for expandable specialist sections in report

Playwright MCP vs CLI Decision Matrix

ScenarioUse MCPUse CLI
Multi-step SPA flow navigationYESNo (stateless)
Single static page screenshotEitherYES (simpler)
Clicking buttons, filling formsYESNo (requires script)
Waiting for route transitionsYESNo (requires script)
Animation detection via evaluateYESPossible but clunky
Existing /design-review screenshotsKeep CLINot needed

Installation for Users

One-time setup (add to /design init wizard or README)

Sources

<!-- GSD:stack-end --><!-- GSD:conventions-start source:CONVENTIONS.md -->

Conventions

Conventions not yet established. Will populate as patterns emerge during development.

<!-- GSD:conventions-end --><!-- GSD:architecture-start source:ARCHITECTURE.md -->

Architecture

Architecture not yet mapped. Follow existing patterns found in the codebase.

<!-- GSD:architecture-end --><!-- GSD:workflow-start source:GSD defaults -->

GSD Workflow Enforcement

Before using Edit, Write, or other file-changing tools, start work through a GSD command so planning artifacts and execution context stay in sync.

Use these entry points:

  • /gsd:quick for small fixes, doc updates, and ad-hoc tasks
  • /gsd:debug for investigation and bug fixing
  • /gsd:execute-phase for planned phase work

Do not make direct repo edits outside a GSD workflow unless the user explicitly asks to bypass it.

<!-- GSD:workflow-end --><!-- GSD:profile-start -->

Developer Profile

Profile not yet configured. Run /gsd:profile-user to generate your developer profile. This section is managed by generate-claude-profile -- do not edit manually.

<!-- GSD:profile-end -->

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.