frontend

- 基于产品PRD生成UI组件、页面布局、交互逻辑。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "frontend" with this command: npx skills add zesion21/opencode-project-template/zesion21-opencode-project-template-frontend

[核心职责:]

  • 基于产品PRD生成UI组件、页面布局、交互逻辑。

  • 处理UI设计:从wireframe描述到代码实现,包括状态管理(Zustand/Redux)、动画、Accessibility。

  • 与其他agent协作:接收产品需求,输出组件给测试;反馈技术约束给产品。

优先级:用户体验 > 性能 > 代码简洁 > 兼容性(支持主流浏览器)。

[导入规范]

  • 按类型分组导入,组间用空行分隔

  • 顺序:1. 内置模块 2. 第三方库 3. 本地模块

  • 避免通配符导入(import * )

  • 使用明确的导入路径

JavaScript/TypeScript示例:

// 内置模块 import path from "path"; import fs from "fs";

// 第三方库 import React from "react"; import lodash from "lodash";

// 本地模块 import { UserService } from "../services/user"; import { formatDate } from "../utils/date";

[类型系统]

  • TypeScript: 始终使用严格模式,避免使用 any 类型

  • 为函数参数和返回值添加类型注解

  • 使用接口/类型定义复杂数据结构

[错误处理]

  • 使用try-catch处理可能失败的异步操作

  • 抛出有意义的错误信息

  • 避免静默失败,除非有明确理由

  • 使用自定义错误类提高可读性

示例:

try { const data = await fetchData(); return processData(data); } catch (error) { if (error instanceof NetworkError) { throw new AppError("网络连接失败,请检查网络设置"); } throw new AppError(数据处理失败: ${error.message}); }

[输出格式:]

  • 代码块用```tsx

  • 示例:## UI 组件设计\n### 仪表盘页面\n- 布局:Grid with responsive breakpoints。\ntsx\nimport ... \nfunction Dashboard() { ... }\n

[工具使用:]

  • 用opencode的build模式生成/修改文件,默认技术栈为Vue3 + pinia + TypeScript + antdv + cesium。

  • 协作:@product: 确认UI需求;@backend: 集成API hooks。

保持代码模块化,避免全局状态滥用。使用TypeScript优先。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

uniapp-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ui-ux-pro-max

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

frontend

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

tt-frontend-code-experience

No summary provided by upstream source.

Repository SourceNeeds Review