bespoke-frontend-master
Skill0 starsChanged 59 days agoMITView on GitHub
MANDATORY - Must execute view_file on this skill before writing any frontend, UI, Next.js, or React code. Project-first design constitution, semantic design tokens, anti-AI-slop hard rules, mechanical baseline UI standards, strict ban on badges/eyebrows, zero technical jargon copy, accessibility contracts, motion performance, and contextual state modeling.
In this repository11 other files it gives its agents.
- antigravity-guideSkill
- autonomous-task-auditorSkill
- create-design-mdSkill
- ecommerce-payments-engineSkill
- fullstack-security-auditorSkill
- image-generation-studioSkill
- master-orchestratorSkill
- modern-data-engineerSkill
- resilient-backend-architectSkill
- seo-growth-architectSkill
- superpowers-execution-harnessSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 11 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before generating any code or UI, the existing repository must be thoroughly inspected.
- Distinctive: line 49
Never permit the repetition of raw, physical design values inside component or page templates.
- Distinctive: line 53
Never produce the following within component or page files:
- Distinctive: line 76
Create token names based on purpose and semantic role, never by visual color:
- Very specific: line 114
Respect mobile safe areas: Use pb-safe or padding-bottom: env(safe-area-inset-bottom) for fixed bottom bars, modals, or sheets to avoid …
- Very specific: line 117
Headings (
h1–h4): Always apply text-balance to headings to prevent awkward single-word orphan wraps. - Very specific: line 119
Numbers, Metrics & Timestamps: Always apply tabular-nums (font-variant-numeric: tabular-nums) to tables, prices, counters, countdowns, …
- Very specific: line 120
Tight Headings: Use tight leading (leading-tight or tracking-tight) on large display headings (text-3xl and above).
- Very specific: line 123
Square Elements: Use size-* (Tailwind v3.4+) or w-* h-* on older releases (e.g., size-4, size-8, size-10).
- Very specific: line 127
No Div-Buttons: Never use <div onClick={...}> or <span onClick={...}> as interactive triggers.
- Distinctive: line 191
Never use the following abstract, alienating corporate terms in customer-facing UI:
- Distinctive: line 210
Rule of Clarity: If an everyday customer or small business owner cannot understand the headline in 2 seconds, it is rejected.
- Distinctive: line 230
Every interactive control must have an accessible name.
- Very specific: line 234
All interactive elements must be reachable via Tab.
- Very specific: line 235
Never remove focus rings without providing an intentional, high-contrast replacement (focus-visible:ring-2 focus-visible:ring-primary).
- Very specific: line 239
Every <input>, <select>, and <textarea> must have an associated <label>.
- Very specific: line 256
Never drive animations by attaching raw listeners to window.addEventListener('scroll') or reading scrollY in loops.
- Very specific: line 257
Use CSS animation-timeline: view() or IntersectionObserver with visibility thresholds.
- Very specific: line 261
Do not use transition-all.
- Distinctive: line 264
Never animate blur continuously or over large layout surfaces.
- Very specific: line 266
Always honor user system preferences via prefers-reduced-motion:
- Distinctive: line 313
Never invent numbers, metrics, or telemetry that simulate operational credibility:
- Distinctive: line 339
Never trigger automatic migrations to newer framework versions.
- Distinctive: line 348
Before declaring any UI task complete, conduct this 12-point audit:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.
Files
0. PROJECT-FIRST DESIGN CONSTITUTION
This skill must never impose its own visual preferences or arbitrary pre-packaged design styles onto any project.
Labels such as "Modern UI", "SaaS UI", "Developer UI", or "Premium UI" can never justify visual decisions on their own.
Before generating any code or UI, the existing repository must be thoroughly inspected.
Order of Precedence:
- Existing product requirements
- Existing design system / design tokens
- Existing brand identity
- Existing component patterns
- User workflow and information hierarchy
- Accessibility (WCAG 2.1 AA compliance)
- Responsive behavior & mobile viewports
- Visual decoration
Decoration must never precede architecture.
Existing System First
Inspect and identify the existing system in the project before generating any new patterns:
- Colors
- Typography
- Spacing
- Border radius
- Shadows & elevation
- Containers & layout grids
- Icons
- Existing components
- Form patterns
- Table patterns
- Navigation patterns
- If the existing system is consistent and functional: Preserve it.
- If the existing system is fragmented or inconsistent: Standardize it first.
- Do not rebrand or restyle the project simply because this skill mentions different values or examples.
1. GLOBAL DESIGN TOKENS — HARD REQUIREMENT
Never permit the repetition of raw, physical design values inside component or page templates.
Hard-coded values in colors are STRICTLY PROHIBITED.
Never produce the following within component or page files:
- Raw hex colors (
#ffffff,#0f1013) rgb(...)rgba(...)hsl(...)- Arbitrary Tailwind color utilities such as
bg-[#...],text-[#...],border-[#...] - Random framework palette utilities (e.g.,
bg-purple-600,text-slate-400scattered across components) - One-off shadow color definitions
Actual physical color values must exist solely within the global theme / token configuration layer.
Components must consume semantic tokens exclusively.
❌ WRONG (Physical & Arbitrary Values):
<div className="bg-[#0f1013] text-slate-400 border border-[#1e2025]">✅ CORRECT (Semantic Tokens):
<div className="bg-surface text-muted border border-border">Create token names based on purpose and semantic role, never by visual color:
backgroundforegroundsurfacesurface-subtlesurface-elevatedborderborder-subtletext-primarytext-secondarytext-mutedprimaryprimary-hoverprimary-foregroundsuccesswarningdanger(ordestructive)info
Domain-specific semantic tokens may be defined when required (e.g., for a developer tool):
terminal-backgroundterminal-foregroundterminal-promptcode-backgroundhttp-gethttp-posthttp-delete
Components must not be aware of physical light/dark color mappings. Light and dark theme resolutions must occur entirely at the global theme layer.
2. MECHANICAL CODE STANDARDS (BASELINE UI RULES)
To eliminate sloppy AI output and substandard CSS execution, every component must strictly conform to these mechanical rules:
A. Viewports & Safe Areas
- Use
h-dvhinstead ofh-screenor100vh: Standard100vhbreaks on mobile Safari/Chrome due to dynamic address bars. Always use dynamic viewport height (h-dvh,min-h-dvh). - Respect mobile safe areas: Use
pb-safeorpadding-bottom: env(safe-area-inset-bottom)for fixed bottom bars, modals, or sheets to avoid overlapping the iOS home indicator.
B. Typography Mechanics
- Headings (
h1–h4): Always applytext-balanceto headings to prevent awkward single-word orphan wraps. - Body & Paragraphs: Apply
text-prettyto multiline paragraphs for clean typographic rags. - Numbers, Metrics & Timestamps: Always apply
tabular-nums(font-variant-numeric: tabular-nums) to tables, prices, counters, countdowns, timers, and KPI figures so digits don't jump horizontally on update. - Tight Headings: Use tight leading (
leading-tightortracking-tight) on large display headings (text-3xland above). Never leave default loose leading on giant text.
C. Sizing & Spacing Mechanics
- Square Elements: Use
size-*(Tailwind v3.4+) orw-* h-*on older releases (e.g.,size-4,size-8,size-10). - Standard Scale: Stick to the standardized spacing scale (
4,8,12,16,24,32px). Never use arbitrary pixel classes likep-[13px]orgap-[7px].
D. Component Primitives First
- No Div-Buttons: Never use
<div onClick={...}>or<span onClick={...}>as interactive triggers. Use native<button>or accessible unstyled primitives (Base UI,Radix UI,React Aria). - Accessible Primitives: For dropdowns, dialogs, popovers, tabs, and tooltips, use established unstyled primitives that manage focus traps, keyboard navigation, and ARIA roles automatically.
3. ANTI-AI-SLOP — HARD RULES
The following patterns are STRICTLY PROHIBITED as default solutions:
- Purple / blue / cyan neon gradients
- Purely decorative gradients
- Gratuitous glassmorphism
- Decorative backdrop blur
- Glowing background blobs
- Glow effects on standard buttons or cards
- Wrapping every individual section inside a bordered card
- Nested cards inside cards
- Forcing 16–24px radius uniformly everywhere
- Drop shadows applied to every surface
- Colored rounded icon containers everywhere
- Forcing an icon onto every single button
- Emoji-based UI styling
- Center-aligning everything by default
- Excessive, vacuous whitespace
- Fake social proof (e.g., generic avatar clusters
[M][S][K][B] ★★★★★ 4.9/5) - Benefit pill clusters under CTAs (
[⚡ 3 mins] [🛡️ Free]) - KPI metric cards by default
- Defaulting any dashboard to: KPI cards + Line Chart + Recent Activity list
- Bento grids by default
- Fake metrics, fake latency, fake uptime, fake revenue charts
Any of these patterns may only be used if there is an explicit product or brand requirement.
"Looking modern" is never a valid architectural justification.
4. HARD BAN: ZERO EYEBROWS & ZERO DECORATIVE BADGES
The predictable AI template of sticking an "eyebrow" label or a colorful badge above every title is STRICTLY FORBIDDEN.
A. Eyebrow Ban (Strict Prohibition)
- Never produce eyebrow text above headings.
- Strictly prohibited:
- Small uppercase kicker labels (e.g.,
PLATFORM,FEATURES,WHY CHOOSE US,INNOVATION,OVERVIEW,ABOUT US,TESTIMONIALS). - Small pill tags placed above a hero title (e.g.,
🚀 v2.0 is live →,NEW FEATURE).
- Small uppercase kicker labels (e.g.,
- Rule: Headings must be self-explanatory, powerful, and direct. If a heading requires an eyebrow label to explain what the section is about, rewrite the heading.
B. Decorative Badge & Pill Tag Ban (Strict Prohibition)
- Do not slap decorative badges, tags, or pills onto marketing and interface pages.
- Strictly prohibited:
- Floating badges highlighting generic features (
⚡ Ultra Fast,🔒 Bank Grade,✨ AI Powered). - Pill tags clustered under primary CTA buttons (
[No credit card required],[Cancel anytime]). - Decorative tag pills stamped onto cards or section corners.
- Floating badges highlighting generic features (
- The Only Permitted Exception (Operational State Only):
- Badges are strictly banned for decoration or marketing.
- A subtle status indicator is permitted ONLY for genuine real-time transactional states in operational systems (e.g., an order table showing
Paid/Pending, a server health dashboard showingOnline/Degraded). - Even in operational systems, prefer minimal text with a clean status dot over rounded bubbly pills.
5. HARD BAN: ZERO TECHNICAL JARGON & ALIENATING BUZZWORDS
Marketing and product copy must be written for real human customers, not developers or corporate pitch decks. Using pretentious technical jargon that confuses customers is STRICTLY FORBIDDEN.
A. Prohibited Buzzwords & Jargon (Blacklist)
Never use the following abstract, alienating corporate terms in customer-facing UI:
Next-gen/Next-generationCutting-edgeState-of-the-artRobust/RobustnessHyper-scalable/Scalable ecosystemTurnkey solutionEnd-to-end orchestrationSynergy/SynergisticParadigm shiftHolistic approachSeamless integration/SeamlesslyEnterprise-grade(unless selling an actual SOC2/SAML plan)Disruptive/FrictionlessLeverage/Leveraging capabilitiesCloud-native architecture(in customer-facing copy)AI-driven/AI-powered(as a lazy placeholder without explaining concrete benefit)
B. The Plain Human Language Mandate
- Rule of Clarity: If an everyday customer or small business owner cannot understand the headline in 2 seconds, it is rejected.
- Explain What It Does in Plain Words:
- ❌ Wrong: "Leverage our cutting-edge end-to-end orchestration to maximize operational synergies."
- ✅ Correct: "Take orders, track kitchen tickets, and see your daily sales in one simple screen."
- ❌ Wrong: "Next-gen AI-driven customer intelligence architecture."
- ✅ Correct: "See what your customers order most often so you know what to restock."
- Focus on Tangible Customer Outcomes:
- Save time (hours per week).
- Prevent errors (never miss an order).
- Make more profit (clear cash flow).
- Zero technical posturing. Speak like a helpful, grounded human expert.
6. ACCESSIBILITY CONTRACTS (WCAG 2.1 AA)
Accessibility is non-negotiable and must be built directly into the DOM structure:
Priority Rules:
- Accessible Names:
- Every interactive control must have an accessible name.
- Icon-only buttons must have
aria-labeloraria-labelledby. - Decorative SVGs and icons must have
aria-hidden="true".
- Keyboard Navigation:
- All interactive elements must be reachable via
Tab. - Never remove focus rings without providing an intentional, high-contrast replacement (
focus-visible:ring-2 focus-visible:ring-primary). Escapemust dismiss modals, dropdowns, and overlays.- Dialogs/modals must trap focus while open and restore focus to the triggering element upon closure.
- All interactive elements must be reachable via
- Forms & Validation:
- Every
<input>,<select>, and<textarea>must have an associated<label>. - Input errors must be explicitly linked using
aria-describedby="field-error-id". - Invalid fields must programmatically set
aria-invalid="true".
- Every
- Color Contrast:
- Maintain minimum 4.5:1 contrast for regular text and 3:1 for large text / graphical UI components.
7. MOTION PERFORMANCE HARD RULES (ANTI-JANK)
Stuttering or sluggish animations degrade perceived product quality:
Priority Rules:
- Compositor Properties Only:
- Animate exclusively via
transformandopacity. - Never animate layout properties (
width,height,top,left,margin,padding) continuously on large surfaces.
- Animate exclusively via
- Scroll-Driven Motion:
- Never drive animations by attaching raw listeners to
window.addEventListener('scroll')or readingscrollYin loops. - Use CSS
animation-timeline: view()orIntersectionObserverwith visibility thresholds. - Pause or stop animations when elements are scrolled out of viewport.
- Never drive animations by attaching raw listeners to
- Micro-Interaction Budget:
- Standard UI state transitions (hover, active, expand) must not exceed 200ms.
- Do not use
transition-all. Specify exact changing properties:transition-colors,transition-opacity,transition-transform.
- Blur Restrictions:
- Blur animations must be <= 8px.
- Never animate blur continuously or over large layout surfaces.
- Reduced Motion:
- Always honor user system preferences via
prefers-reduced-motion:
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } } - Always honor user system preferences via
8. LAYOUT ARCHITECTURE & DENSITY
No Default Bento
Select layouts based on content relationships and user workflows:
- Comparable structured data: Table
- Browsable records: List or grid, depending on scanning density requirements
- System configuration: Grouped settings with clear hierarchy
- Sequential workflows: Stepped wizard or structured form
- Operational monitoring: Dense operational layout
- Independent showcase items: Cards or grid, when contextually appropriate
Card Rule
A card is an organizational boundary, not a decorative stamp.
For section grouping, evaluate lighter separators first:
- Whitespace
- Typographic hierarchy
- Subtle horizontal dividers
- Clean 1px borders
- Subtle surface contrast
Radius Baselines
- Small (indicators, subtle controls): 4px
- Controls (inputs, buttons): 6–8px
- Surfaces (cards, panels): 8–12px
- Major Overlays (modals, dialogs): 12–16px
- Full: Reserved strictly for true round buttons and avatar circles
0px sharp corners are completely valid for dense developer/terminal tools.
Shadows
Shadows must be reserved for real physical layering (modals, popovers, tooltips, dropdown menus). Never apply default heavy drop shadows to standard flat cards.
9. REAL DATA ONLY
Never invent numbers, metrics, or telemetry that simulate operational credibility:
- Latency (e.g., "12ms")
- Uptime (e.g., "99.99%")
- SLA guarantees
- Revenue figures
- Conversion percentages
- Active user counts
- FPS benchmarks
Fake telemetry is classified as AI-slop. If test fixtures are required, structure them explicitly as mock test data (fixtures/mockData.ts).
10. CONTEXTUAL STATE MODELING
Implement only semantically applicable states for each specific component:
- Default
- Loading / Pending (Only use skeletons if they prevent layout shift and wait time warrants it)
- Empty (Single-line clean text preferred; avoid huge icon + CTA banners for simple lists)
- Error (Descriptive, actionable error messages with retry triggers)
- Optimistic (Only when mutation outcome is highly predictable with tested rollback)
11. FRAMEWORK VERSION SAFETY
Never trigger automatic migrations to newer framework versions.
- Inspect
package.jsonand lockfiles first. - Match existing repository APIs (React 18 vs 19, Next.js Pages vs App Router).
- Upgrades must only occur upon explicit user request.
12. THE BESPOKE AUDIT GATE
Before declaring any UI task complete, conduct this 12-point audit:
- Are there ZERO eyebrow labels above any headings? (Strictly no kicker tags)
- Are there ZERO decorative badges or pill tags cluttering the interface?
- Is the copy 100% free of technical jargon, corporate buzzwords, and developer posturing?
- Can a non-technical customer understand the headlines and value propositions in 2 seconds?
- Are headings using
text-balanceand multiline copy usingtext-pretty? - Are all numbers, metrics, and tabular data using
tabular-nums? - Is viewport height handled via
h-dvhwith mobile safe-area protection (pb-safe)? - Are interactive elements native buttons or accessible primitives (zero unaccessible divs)?
- Do icon-only buttons have
aria-label, and decorative iconsaria-hidden="true"? - Are animations compositor-only (
transform/opacity) with <= 200ms duration? - Are all colors, borders, and surfaces resolving to global semantic tokens (zero raw hex)?
- Is the UI free of fake metrics, fake reviews, avatar clusters, and neon gradients?
If any check fails, resolve it before presenting the deliverable to the user.
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
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.

