frontend-implementation
Inspect existing codebase conventions, framework, routing, and styling, and implement accessible, reusable UI components handling loading, empty, error, and success states without architectural rewrites.
- License 许可
- MIT
- 最近更新
- 2026-10-21
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- frontend-implementation
- description
- Inspect existing codebase conventions, framework, routing, and styling, and implement accessible, reusable UI components handling loading, empty, error, and success states without architectural rewrites.
02 资源文件 3
- 参考文档references/framework-adaptation-guide.md1.7 KB
- 参考文档references/state-matrix-template.md1.8 KB
- 脚本scripts/inspect-codebase.js1.8 KB
03 SKILL.md 正文
Frontend Implementation Skill
Use this skill when implementing UI components from visual reconstruction specs and design token maps, ensuring alignment with the host codebase architecture.
Core Responsibilities
- Codebase Discovery: Inspect target frameworks and styling setup using inspect-codebase.js.
- Semantic & Accessible Markup: Implement semantic HTML with proper ARIA attributes, keyboard focus states, and color contrast.
- State Completeness: Follow the Component State Matrix to implement default, loading, empty, error, and hover/focus states.
- Architectural Respect: Adhere to the Framework Adaptation Guide to preserve existing project patterns.
Step-by-Step Procedure
1. Audit Existing Codebase Conventions
Run the inspection script to identify active frameworks, TypeScript usage, and component paths:
node skills/frontend-implementation/scripts/inspect-codebase.js [path-to-workspace]
2. Implement Component Structure
- Use semantic HTML tags (
<nav>,<header>,<main>,<article>,<button>). - Apply design tokens or Tailwind utility classes extracted in
design-system-extraction. - Support responsive viewport constraints (mobile-first layout).
3. Handle Lifecycle States
Implement each state defined in state-matrix-template.md:
- Loading State: Provide skeleton placeholders or spinner indicators.
- Empty State: Show friendly fallback text and clear call-to-action when data arrays are empty.
- Error State: Render accessible error alert messages with retry actions.
- Focus Rings: Ensure interactive elements have visible high-contrast focus rings (
focus-visible:ring-2).
4. Verify Local Implementation
- Run existing linter or build commands (
npm run lint,npm run build,npm test). - Ensure no console syntax errors or hydration mismatches are introduced.
- Hand off to
browser-visual-qafor rendering verification.
04 同仓库更多 Skills
valid-skill
A valid sample skill used for automated manifest testing and verification.
missing-name
Missing name field
missing-desc
暂无简介
broken-link
Skill containing a broken relative link.
visual-regression-triage
Compare reference mockups against rendered screenshots at matching viewport dimensions, calculate quantitative pixel difference metrics, isolate bounding boxes, filter rendering noise, and triage discrepancies by severity.
visual-refinement-loop
Coordinate the end-to-end visual refinement loop across reconstruction, implementation, browser capture, regression triage, and accessibility auditing, with configurable iteration caps, stagnation detection, and verified run artifacts.