ai-assisted-frontend-workflow
Skill2 starsChanged 4 months agoMITView on GitHub
Meta-workflow for AI-agent-driven frontend work — converting a design (image/Figma/description) to code, refactoring existing components safely, auditing UI for design/UX consistency, and optimizing an existing codebase. Use whenever the user shares a design/screenshot/Figma link to implement, asks the agent to refactor or clean up frontend code, asks for a design/UX review of existing UI, or asks to "optimize" the frontend codebase.
In this repository22 other files it gives its agents.
- accessibility-a11ySkill
- design-system-tailwindSkill
- motion-design-toolkitSkill
- nextjs-architectureSkill
- react-component-engineeringSkill
- react-three-fiber-3dSkill
- responsive-mobile-firstSkill
- auth-authorizationSkill
- database-schema-designSkill
- form-validation-error-handlingSkill
- mern-stack-architectureSkill
- rest-api-integrationSkill
- state-managementSkill
- landing-page-conversionSkill
- payment-gateway-integrationSkill
- saas-dashboard-adminSkill
- startup-mvp-developmentSkill
- ux-research-flow-designSkill
- visual-design-languageSkill
- deployment-vercel-productionSkill
- performance-seo-optimizationSkill
- project-architecture-clean-codeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 14
Call out anything the static design doesn't specify (loading state, empty state, error state, exact responsive behavior) and either propose …
- Very specific: line 15
After implementation, do a side-by-side self-review against the source design for spacing/alignment/color accuracy before presenting it as …
- Distinctive: line 31
Run a structured pass, not just vibes:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
AI-Assisted Frontend Workflow Skill
Governs how this agent approaches four recurring AI-driven frontend tasks. Route to the relevant section.
1. Design-to-code (image/Figma → implementation)
- Inventory the design first: layout structure (grid/flex regions), spacing scale used, color palette, typography scale, component states visible (hover/active/disabled if shown), and responsive intent if multiple breakpoints are provided.
- Match to the project's existing design system/tokens (
design-system-tailwindskill) rather than inventing new arbitrary values — if the design uses a color/spacing not in the current token set, flag it as a new token to add, don't hardcode an arbitrary value. - Build server-first (Next.js Server Components) and only mark client where the design implies interactivity.
- Call out anything the static design doesn't specify (loading state, empty state, error state, exact responsive behavior) and either propose a sensible default or ask — don't silently invent behavior for states the design didn't show.
- After implementation, do a side-by-side self-review against the source design for spacing/alignment/color accuracy before presenting it as done.
2. Component refactoring (existing code → cleaner code)
- Establish current behavior first (read the component fully, note all props/behaviors) — a refactor must be behavior-preserving unless the user explicitly asked for a behavior change too.
- Apply
react-component-engineeringskill's checklist: split responsibilities, extract hooks, tighten prop types. - Refactor incrementally and note what changed and why (e.g. "extracted data-fetching into
useProductDatahook, split the 300-line component intoProductCard+ProductActions") rather than a silent full rewrite — the user needs to trust the diff. - Flag but don't silently fix out-of-scope issues found along the way (e.g. an unrelated accessibility gap) — mention them separately so the user can decide.
3. Codebase optimization (performance/bundle/build)
Investigate before prescribing — profile first:
- Bundle size: check for accidentally-client-bundled server-only code, un-tree-shaken barrel imports, heavy libraries (three.js, moment.js) loaded on routes that don't need them.
- Render performance: identify components re-rendering unnecessarily (React DevTools Profiler) before reaching for
memo/useMemospeculatively. - Image/asset optimization: unoptimized images are the most common real-world performance culprit — check
next/imageusage and formats before deeper code-level optimization. - Report findings with impact estimate before making sweeping changes — optimization work should be justified by an actual measured problem, not applied speculatively across the whole codebase.
4. Design/UX audit & review
Run a structured pass, not just vibes:
- Visual consistency: spacing, typography, and color against the design system (
visual-design-languageskill) - Accessibility: run the
accessibility-a11yskill's checklist - Responsive behavior: check at the breakpoints in
responsive-mobile-firstskill - UX flow soundness: missing loading/empty/error states, unclear CTAs, flow branches not handled (
ux-research-flow-designskill) Present findings as a prioritized list (critical/should-fix/nice-to-have), not an undifferentiated wall of nitpicks.
Cross-cutting principle
For all four workflows: state assumptions explicitly, prefer incremental verifiable changes over big-bang rewrites, and route to the more specific skill (component engineering, accessibility, design system, etc.) for the actual implementation detail — this skill is the dispatcher/process, not the full technical reference.
Example prompts this skill should trigger on
"Here's a Figma screenshot of the new pricing page, build it." "Refactor this Dashboard component, it's gotten really messy." "Can you do a UX audit of our settings page?" "The app feels slow, can you optimize the frontend?"
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.

