frontend-ui-engineering
Skill33 starsChanged 4 months agoApache-2.0View on GitHub
Builds production-quality UIs. Use when building or modifying user-facing interfaces. Use when creating components, implementing layouts, managing state, or when the output needs to look and feel production-quality rather than AI-generated.
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 57 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 67
Every interactive element must be keyboard-accessible and screen-reader-friendly.
- Distinctive: line 97
Never remove focus outlines — style them instead
- Distinctive: line 113
Never duplicate server state in local state — React Query is the cache
- Distinctive: line 114
Never put derived values in state — compute them during render
- Distinctive: line 173
Every async operation needs all three states:
- Distinctive: line 185
Never show a blank screen.
- Distinctive: line 207
After any UI change:
“Common” is measured: kept by at least 6 in 10 of the 57 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.
Files
Frontend UI Engineering
Overview
Production-quality UI engineering: component architecture, accessible markup, responsive design, and state management. The bar is not "does it render?" — the bar is "would a user notice a difference from a product they paid for?"
When to Use
- Building or modifying any user-facing component
- Implementing layouts, navigation, or data displays
- Adding or changing state management
- Any change that affects what a user sees or can interact with
Component Architecture
Hierarchy of Concerns
Page (route-level)
└── Layout (grid/columns)
├── Feature Component (data + logic)
│ └── UI Component (pure display, no data fetching)
└── Shared Component (reusable, generic)- Page components handle routing. No business logic.
- Feature components fetch data and own state. Not reusable.
- UI components receive props, render output. Fully reusable, no side effects.
- Shared components are the design system: Button, Input, Modal, etc.
Component Rules
// GOOD: UI component — pure, testable, reusable
interface SkillCardProps {
name: string;
description: string;
onExport: () => void;
}
export function SkillCard({ name, description, onExport }: SkillCardProps) {
return (
<article className="skill-card">
<h3>{name}</h3>
<p>{description}</p>
<button onClick={onExport} aria-label={`Export ${name} skill`}>
Export
</button>
</article>
);
}
// BAD: UI component that fetches its own data — not reusable, hard to test
export function SkillCard({ skillId }: { skillId: string }) {
const { data } = useQuery(['skill', skillId], fetchSkill);
// ...
}Accessibility (Non-Negotiable)
Every interactive element must be keyboard-accessible and screen-reader-friendly.
Minimum Requirements (WCAG 2.1 AA)
// Interactive elements use semantic HTML
<button onClick={handleExport}>Export Skill</button> // ✓
<div onClick={handleExport}>Export Skill</div> // ✗
// Images have alt text
<img src={logo} alt="GitScape logo" />
<img src={decoration} alt="" /> // decorative: explicit empty string
// Forms have associated labels
<label htmlFor="repo-url">Repository URL</label>
<input id="repo-url" type="url" required />
// Icon-only buttons have aria-label
<button aria-label="Close dialog">✕</button>
// Loading states are announced
<div aria-busy={isLoading} aria-label="Loading skills">
{isLoading ? <Spinner /> : <SkillList />}
</div>Focus Management
- Tab order should follow visual order
- Modals trap focus while open; return focus on close
- Never remove focus outlines — style them instead
State Management
Where State Lives
| State Type | Where It Lives | Example |
| Server data | React Query / SWR | Fetched skill list |
| URL state | URL params | Active tab, filters |
| UI state (local) | useState in component | Modal open/closed |
| UI state (shared) | Lifted to nearest common ancestor | Selected file set |
| Global app state | Context or Zustand | Auth user, theme |
Rules
- Never duplicate server state in local state — React Query is the cache
- Never put derived values in state — compute them during render
- Lift state only as high as necessary (not straight to global)
// BAD: Derived value stored in state
const [filteredSkills, setFilteredSkills] = useState(skills);
useEffect(() => setFilteredSkills(skills.filter(...)), [skills, filter]);
// GOOD: Derived during render
const filteredSkills = skills.filter(...);Performance in Components
Avoid Common Re-render Traps
// BAD: Creates new object on every render, causing children to re-render
function SkillList() {
return <SkillFilters options={{ sortBy: 'name', order: 'asc' }} />;
}
// GOOD: Stable reference
const DEFAULT_OPTIONS = { sortBy: 'name', order: 'asc' } as const;
function SkillList() {
return <SkillFilters options={DEFAULT_OPTIONS} />;
}
// Use React.memo only for expensive components that receive stable props
const SkillCard = React.memo(function SkillCard({ skill }: Props) {
return <div>{/* expensive render */}</div>;
});File Preview Truncation (GitScape-Specific)
File previews must be truncated to prevent browser freeze. Large files kill the page:
const MAX_PREVIEW_CHARS = 10_000; // ~200 lines
function FilePreview({ content }: { content: string }) {
const truncated = content.length > MAX_PREVIEW_CHARS;
const display = truncated ? content.slice(0, MAX_PREVIEW_CHARS) : content;
return (
<div>
<pre>{display}</pre>
{truncated && (
<p className="truncation-notice">
Preview truncated — full content included in export.
</p>
)}
</div>
);
}Error States and Loading States
Every async operation needs all three states:
function SkillExport() {
const { data, isLoading, error } = useQuery(...);
if (isLoading) return <LoadingSpinner label="Fetching repository files..." />;
if (error) return <ErrorMessage message="Could not load repository. Check the URL and try again." />;
return <SkillPreview data={data} />;
}Never show a blank screen. Never swallow errors silently.
Common Rationalizations
| Rationalization | Reality |
| "I'll add accessibility later" | There is no later. Retrofitting keyboard nav into a complex component is 3x harder than building it in. |
| "The div with onClick works fine" | Until a keyboard user or screen reader user tries it. |
| "This state management is overkill for now" | Start right. Lifting state later causes cascading refactors. |
| "I'll handle the loading state after the happy path" | Users see loading states constantly. Handle them now. |
Red Flags
<div onClick={...}>anywhere- Missing
alttext on images - Loading state shows blank content
- Error state shows a technical stack trace to the user
- State that could be derived from props/queries stored in
useState useEffectused to sync local state with server data
Verification
After any UI change:
- All interactive elements use semantic HTML (
button,a,input) - All images have
alttext (oralt=""for decorative) - All form inputs have associated labels
- Tab order is logical and focus is visible
- Loading, error, and empty states are handled
- Component renders correctly at 320px (mobile) and 1440px (desktop)
- No
console.errororconsole.warnin the browser during normal use
Other versions64 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 64
- addyosmani/agent-skills★ 112ksame name
- ollaya-dev/ollaya★ 1.4ksame name
- rizqinrr/viserys-agent★ 560same name
- shashankswe2020-ux/whoop-mcp★ 174same name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- sampleXbro/agentsmesh★ 24same name
- jaskirat1616/grok-skills★ 22same name
- helderberto/agent-skills★ 19same name
- JPeetz/agent-skills★ 14same name
- CrowPus/Zelyq★ 10same name
54 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use constraint-driven-development, doubt-driven-development and 4 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.
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 14 projects that use this
seikaikyoSkilldoubt-driven-development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
Also in 28 projects that use this
seikaikyoSkillinterview-me
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
Also in 30 projects that use this
VercelSkillweb-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
Also in 7 projects that use this
OpenAISkillverification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Also in 5 projects that use this
victorgarciaesgiSkillzoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
Also in 3 projects that use this
In this repository53 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- ad-creativeSkill
- addyosmani-agent-skillsSkill
- api-and-interface-designSkill
- brandkitSkill
- browser-testing-with-devtoolsSkill
- chef-assistantSkill
- ci-cd-and-automationSkill
- cloud-run-basicsSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- design-taste-frontendSkill
- design-taste-frontend-v1Skill
- documentation-and-adrsSkill
- full-output-enforcementSkill
- gemini-apiSkill
- git-workflow-and-versioningSkill
- googlecloudplatform-knowledge-catalogSkill
- google-cloud-recipe-authSkill
- google-cloud-recipe-networking-observabilitySkill
- google-cloud-recipe-onboardingSkill
- google-cloud-waf-cost-optimizationSkill
- google-cloud-waf-reliabilitySkill
- google-cloud-waf-securitySkill
- gpt-tasteSkill
- high-end-visual-designSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- incremental-implementationSkill
- industrial-brutalist-uiSkill
- marketing-ideasSkill
- minimalist-uiSkill
- nvidia-skillspectorSkill
- observability-and-instrumentationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- pricing-strategySkill
- programmatic-seoSkill
- redesign-existing-projectsSkill
- security-and-hardeningSkill
- seo-auditSkill
- shipping-and-launchSkill
- social-contentSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- stitch-design-tasteSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
- videoSkill
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.

