web-slicing
Convert screenshot/Figma designs into pixel-perfect frontend UI with reusable components. Use when the task focuses on visual and layout implementation.
- License 许可
- MIT
- 最近更新
- 2026-10-12
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- web-slicing
- description
- Convert screenshot/Figma designs into pixel-perfect frontend UI with reusable components. Use when the task focuses on visual and layout implementation.
02 资源文件 3
- 参考文档agents/openai.yaml288 B
- 参考文档references/context.md3.7 KB
- 参考文档templates/checklist.md930 B
03 SKILL.md 正文
Skill: Web Slicing
Context (Required)
- Folder scope + code examples:
references/context.md - Execution checklist:
templates/checklist.md
Implement UI from designs with precision. Focus on visuals and layout — no API integration yet.
Workflow
-
Study the design: screenshot, Figma link, or layout description provided by the user.
-
Read the relevant guide before creating files in that folder:
.agents/guides/web-page.md— for files inapp/.agents/guides/web-component.md— for files incomponents/
-
Create files following the page structure convention:
app/(group)/[feature]/ ├── page.tsx → Suspense wrapper (Server Component) └── [feature]-content.tsx → main Client Component (all logic: state, form, table, dialog) -
Reference real code examples from:
.agents/examples/web-slicing/nextjs-app-router/examples/— basic CRUD template
-
Use components from the existing library:
Button,Input,Dialog,Table,Select,RadioGroup,TextareaActionsDropdownfor edit/delete actionsPanelCardas table wrapperStatusBadgefor status displayLoadingSpinnerfor loading state- Lucide React for icons
- Tailwind CSS for styling
-
Data not yet available from API → use dummy data / placeholder props.
Prohibitions
- FORBIDDEN for UI files in
app/**(exceptapp/api/**) orcomponents/**to importaxiosor callfetch; use dummy props or an existing transaction hook instead. - RECOMMENDED to create
_components/for components private to the route. Keep*-page-content.tsxbesidepage.tsxas the route orchestrator. - FORBIDDEN to use
anyas a type. - FORBIDDEN to hardcode colors or spacing — use Tailwind tokens.
Pre-Completion Checklist
- [ ]
page.tsxis a thin Suspense wrapper - [ ]
*-page-content.tsxsits besidepage.tsxand orchestrates route state, hooks, and layout - [ ] Route-specific components are in
_components/; shared components are inapps/web/components/ - [ ] No direct API call in components
- [ ] No
any - [ ] Every file ends with a newline (EOF)
04 同仓库更多 Skills
web-slicing
Convert screenshot/Figma designs into pixel-perfect frontend UI with reusable components. Use when the task focuses on visual and layout implementation.
web-seo-geo-friendly
Optimize public Next.js App Router pages for SEO and GEO (Generative Engine Optimization). Use when the user explicitly requests SEO/GEO optimization on public pages.
web-code-review
Review frontend code with a firm senior-lead standard, focusing on bugs, regressions, architecture risks, and test gaps in apps/web and the shared contracts the frontend depends on.
web-bugfix
Fix frontend bugs with minimum-touch changes, keep other surfaces stable, and sync schema, types, hooks, constants, tests, and related docs when impacted.
web-api-integrated
Integrate API endpoints into the frontend with Zod schemas, response types, constants, and react-query hooks. Use when implementing endpoints from an API contract, Postman, or Swagger.
skill-creator
Create a new skill from scratch with full structure — SKILL.md, references, templates, openai.yaml, Claude wrapper, and registration in manifest + AGENTS.md + CLAUDE.md.