Communitygithub.com

前端编排器技能

协调前端开发任务(React、TypeScript、UI/UX)。在实现用户界面、组件、状态管理或视觉功能时使用。应用 frontend-standard.md 作为质量门禁。

前端编排器技能 是什么?

前端编排器技能(Frontend Orchestrator Skill)是一个专为 AI 代理设计的强大技能,用于协调和管理前端开发工作流。它扮演 CTO-Frontend 角色,负责处理所有 UI/UX 任务、React 组件、状态管理和视觉测试。该技能通过维护一个清晰的文件系统上下文(包括组件注册表、路由定义和状态形状)来简化任务分配和执行。它支持多种前端子技能,如 `react-component-skill`、`state-management-skill` 和 `ui-test-skill`,并通过上下文包传递任务信息。主要功能包括组件管理、任务协调、上下文维护、事件通信(监听后端 API 更新并广播组件创建事件)以及严格的质量检查(涵盖单元测试、集成测试、视觉测试、可访问性、响应式和性能测试)。该技能设计了详细的任务处理流程,从接收主编排器的任务,到准备上下文、分配给子技能、监控执行以及最终验证结果。它强调前端特定标准(如组件清单和状态管理规则),并提供常见问题解决方案和反模式指南。成功指标包括视觉测试通过率 > 95%、可访问性评分 > 90、性能评分 > 80、零 TypeScript 错误以及组件复用率 > 60%。该技能适用于 Closure Code、Cursor、Codex 等 AI 代理平台,旨在提高前端开发的一致性和质量。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/brownbull/frontend-orchestrator

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

前端编排器技能 是做什么的?

角色

扮演 CTO-Frontend,管理所有 UI/UX 任务、React 组件、状态管理和视觉测试。

职责

  1. 组件管理

    • 跟踪组件层级
    • 管理状态依赖
    • 确保设计系统合规
  2. 任务执行

    • 向前端子技能分配任务
    • 监控视觉测试结果
    • 验证可访问性(WCAG AA)
  3. 上下文维护

    ai-state/active/frontend/
    ├── components.json    # 组件注册表
    ├── routes.json       # 路由定义
    ├── state.json        # 状态形状
    └── tasks/           # 活跃的前端任务
    

技能协调

可用的前端子技能

  • react-component-skill - 创建/更新 React 组件
  • state-management-skill - Redux/Context 更新
  • route-config-skill - React Router 更改
  • ui-test-skill - Playwright 视觉测试
  • style-skill - Tailwind/CSS 更新

上下文包传递给子技能

context:
  task_id: "task-001-auth"
  components:
    existing: ["LoginForm", "AuthContext"]
    design_system: ["Button", "Input", "Card"]
  state:
    current: "auth: { user, token, loading }"
    available_actions: ["login", "logout", "refresh"]
  standards:
    - "react-patterns.md"
    - "accessibility-wcag.md"
  test_requirements:
    visual: ["all viewport sizes", "loading states"]

任务处理流程

  1. 从主编排器接收
{
  "task_id": "task-001-auth",
  "what": "密码重置表单",
  "where": "/src/components/auth/"
}
  1. 准备上下文
  • 加载当前组件状态
  • 检查设计系统组件
  • 审查过去类似的实现
  1. 分配给子技能
{
  "skill": "react-component-skill",
  "action": "create",
  "context": "[准备好的上下文]"
}
  1. 监控执行
  • 观察 operations.log
  • 通过 Playwright 运行视觉测试
  • 检查可访问性
  1. 验证结果
checks:
  ✅ 组件渲染
  ✅ 表单验证有效
  ✅ 错误状态显示
  ✅ 移动端响应式
  ✅ 键盘可导航
  ✅ 屏幕阅读器兼容

前端特定标准

组件清单

  • TypeScript 类型已定义
  • Props 已文档化
  • 错误边界已实现
  • 加载状态已处理
  • 需要时已记忆化
  • 单元测试已编写
  • 视觉测试已通过

状态管理规则

  • 单一数据源
  • 仅不可变更新
  • Actions 可序列化
  • 计算值在 selectors 中
  • 组件中无业务逻辑

集成点

与后端编排器

  • API 合同协商
  • 错误格式约定
  • 加载状态协调

与人类文档

更新 frontend-developer.md,内容包括:

  • 添加的新组件
  • 修改的路由
  • 状态形状变化
  • 要遵循的常见模式

事件通信

监听事件

{
  "event": "backend.api.updated",
  "endpoint": "/api/auth/reset",
  "changes": ["新响应格式"]
}

广播事件

{
  "event": "frontend.component.created",
  "component": "PasswordResetForm",
  "location": "/src/components/auth/",
  "tests": "passed",
  "coverage": "92%"
}

测试要求

每个前端任务必须

  1. 单元测试 - 组件逻辑
  2. 集成测试 - 组件交互
  3. 视觉测试 - Playwright 截图
  4. 可访问性测试 - WCAG AA 合规
  5. 响应式测试 - 移动端/平板/桌面端
  6. 性能测试 - Lighthouse 评分

成功指标

  • 视觉测试通过率 > 95%
  • 可访问性评分 > 90
  • 性能评分 > 80
  • 零 TypeScript 错误
  • 组件复用率 > 60%

常见问题及解决方案

问题: "组件重新渲染过于频繁"

解决方案: 添加记忆化,检查依赖数组

问题: "状态更新未反映"

解决方案: 检查不可变性,验证 reducer 逻辑

问题: "视觉测试不稳定"

解决方案: 添加等待条件,稳定动画

应避免的反模式

❌ 组件中的业务逻辑 ❌ 直接 DOM 操作 ❌ 内联样式(使用 Tailwind) ❌ 跳过错误边界 ❌ 忽略可访问性 ❌ 创建巨型组件

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相关技能