Agent Skillsbiersoeckli/QuickStack › frontend-ui-patterns

frontend-ui-patterns

GitHub

规范 QuickStack 前端开发,涵盖 React 组件、表单验证、状态管理及服务/客户端边界划分。指导使用 shadcn/ui、Zustand 及 Server Actions 构建符合项目约定的 UI。

.agents/skills/frontend-ui-patterns/SKILL.md biersoeckli/QuickStack

Trigger Scenarios

创建或更新前端页面和 React 组件 实现基于 Zod 的表单和 Server Action 配置 Zustand 状态管理和对话框 处理流式 UI 或服务端/客户端边界逻辑

Install

npx skills add biersoeckli/QuickStack --skill frontend-ui-patterns -g -y
More Options

Non-standard path

npx skills add https://github.com/biersoeckli/QuickStack/tree/main/.agents/skills/frontend-ui-patterns -g -y

Use without installing

npx skills use biersoeckli/QuickStack@frontend-ui-patterns

指定 Agent (Claude Code)

npx skills add biersoeckli/QuickStack --skill frontend-ui-patterns -a claude-code -g -y

安装 repo 全部 skill

npx skills add biersoeckli/QuickStack --all -g -y

预览 repo 内 skill

npx skills add biersoeckli/QuickStack --list

SKILL.md

Frontmatter
{
    "name": "frontend-ui-patterns",
    "description": "Create and update QuickStack frontend pages, React components, forms, dialogs, tables, streaming UI, and Zustand-backed state using the project's established UI conventions. Use when editing frontend files, shadcn\/ui composition, react-hook-form + Zod flows, Server Action consumption from client components, or client\/server component boundaries."
}

Frontend UI Patterns

Quick Start

For QuickStack frontend work:

  • Use kebab-case filenames.
  • Put shadcn/ui primitives in src/components/ui/.
  • Put composed UI in src/components/custom/.
  • Put frontend hooks, helpers, sockets, and Zustand usage in src/frontend/.
  • Co-locate page-specific Server Actions in actions.ts beside the consuming page.

Core Workflow

When creating or updating frontend UI:

  • Decide the boundary first: server pages fetch data and check auth; client components handle interaction.
  • Build forms with react-hook-form, Zod, shadcn Form, and shared field wrappers.
  • Choose the Server Action flow by UI need: Toast.fromAction() for immediate feedback, Actions.run() for imperatively loaded data, and useActionState plus FormUtils.mapValidationErrorsToForm() for forms with field errors.
  • Use Zustand-backed dialogs and stores for reusable or cross-component flows; use local state for page-owned dialogs.
  • Use SimpleDataTable for standard tables before building custom table behavior.
  • Style with shadcn/ui plus Tailwind utilities and cn().

Boundary Rules

  • Use 'use server' for pages and layouts that fetch data or gate authorization.
  • Use 'use client' for dialogs, forms, tables, event handlers, and streaming UI.
  • Use auth helpers from action-wrapper.utils.ts in server components.

Forms And Actions

  • Add route-safe validation with shared or local Zod schemas.
  • With Zod 4 and zodResolver, type every form with the schema's input and output types. Import z from "zod" and use useForm<z.input<typeof schema>, unknown, z.output<typeof schema>>({ resolver: zodResolver(schema), ... }). Do not use z.infer as the useForm field-values type when the schema has coercion, transforms, preprocessors, or defaults.
  • Map server validation errors back with FormUtils.mapValidationErrorsToForm(...).
  • Use SubmitButton for form submits when possible.

State, Dialogs, And Streaming

  • Reuse stores in src/frontend/states/zustand.states.ts before adding new ones.
  • Use useDialog, useConfirmDialog, and useInputDialog for modal flows.
  • Clean up SSE and socket work with AbortController or equivalent effect cleanup.

Reference

See REFERENCE.md for concrete examples covering server/client boundaries, auth helpers, forms, Server Actions, Zustand stores, SimpleDataTable, dialogs, styling, and real-time UI.

Version History

  • 0.0.13 Current 2026-08-20 14:28

Same Skill Collection

.agents/skills/ask-matt/SKILL.md
.agents/skills/backend-services/SKILL.md
.agents/skills/backend-testing/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/codebase-design/SKILL.md
.agents/skills/diagnosing-bugs/SKILL.md
.agents/skills/domain-modeling/SKILL.md
.agents/skills/elysia-api-routes/SKILL.md
.agents/skills/grilling/SKILL.md
.agents/skills/handoff/SKILL.md
.agents/skills/implement/SKILL.md
.agents/skills/improve-codebase-architecture/SKILL.md
.agents/skills/prototype/SKILL.md
.agents/skills/research/SKILL.md
.agents/skills/resolving-merge-conflicts/SKILL.md
.agents/skills/setup-matt-pocock-skills/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/teach/SKILL.md
.agents/skills/to-questionnaire/SKILL.md
.agents/skills/to-spec/SKILL.md
.agents/skills/to-tickets/SKILL.md
.agents/skills/triage/SKILL.md
.agents/skills/wayfinder/SKILL.md
.agents/skills/writing-for-agents/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/grill-with-docs/SKILL.md

Metadata

Files
0
Version
0.0.13
Hash
b0c1fe3d
Indexed
2026-08-20 14:28

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-24 19:58
浙ICP备14020137号-1 $방문자$