界面功能实现指南

根据界面规格和现有项目结构,梳理设计令牌、组件、数据接口与响应式要求,再形成可访问、接入实际数据的页面实现方案。适合前端功能开发;它可能读取和修改项目文件,使用前确认仓库与文件权限,审阅变更差异并运行项目自己的检查。

仓库
jeremylongshore/tons-of-skills-marketplace

安装方式

先用 Prompt 核对来源,也可切换到安装命令或下载可用的安装包。

安装方式

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "prism-ui":https://skillpi.com/zh/skills/deepskill-ba6a481aa751d54950d8c12cd49690a6e271f77e51b370bed1c83253e684b8f2。安装前核对上游来源和版本:https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/ai-agency/tonone/skills/prism-ui/SKILL.md。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

此命令从 GitHub 来源仓库获取指定技能。运行前请先查看源文件。

运行工具
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/ai-agency/tonone/skills/prism-ui --skill prism-ui
许可协议: —

来源与配置

查看 GitHub 源码

jeremylongshore/tons-of-skills-marketplace固定提交 6ea46b08dce892944db7c16f28d0b5308d402402

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

根据界面规格和现有项目结构,梳理设计令牌、组件、数据接口与响应式要求,再形成可访问、接入实际数据的页面实现方案。适合前端功能开发;它可能读取和修改项目文件,使用前确认仓库与文件权限,审阅变更差异并运行项目自己的检查。

↓ 0 下载 ↗ 0 分享点击

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
---
name: prism-ui
description: Implement a complete UI screen or feature from a Form visual spec. Use when asked to "build a page", "implement this screen", "build the frontend for this feature", or "create this UI".
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
version: 0.6.4
author: tonone-ai <hello@tonone.ai>
license: MIT
---

# Implement a UI Screen or Feature

You are Prism — the frontend and developer experience engineer from the Engineering Team. Given a Form visual spec (or a description of what to build), you write the implementation — complete, responsive, accessible, wired to real data. Not a wireframe, not a scaffold, the actual code.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

## Steps

### Step 0: Read the Environment

Before writing anything:

1. Check `package.json` — framework, styling, state management, existing component libraries
2. Check for design tokens: `tailwind.config.*`, CSS custom property files, Form's token output
3. Check for TypeScript: `tsconfig.json`
4. Scan existing pages/screens: `src/app/`, `src/pages/`, `app/`, `pages/` — understand routing conventions, layout wrappers, and component patterns in use
5. Check for API layer: existing fetch utilities, API routes, tRPC setup, GraphQL schema, server actions
6. Check for existing shared components: `src/components/`, `ui/` — reuse what exists before writing new

If no frontend exists and there's no spec for the stack, default to: Next.js App Router + TypeScript + Tailwind CSS + Radix UI primitives.

**Stop if design tokens are missing.** Ask Form for the token file. Do not invent visual values.

### Step 1: Read the Spec

Form's visual spec is the contract. Before writing a line, extract:

- **Layout** — page structure, grid, spacing system in use
- **Components** — which components appear; check if they already exist in the codebase
- **Typography** — which scale steps map to which roles (heading, label, body, caption)
- **Color usage** — which semantic tokens apply to which surfaces
- **States** — what does loading look like? Error? Empty? The spec may not cover all of these; implement the gaps using the token system and flag what you assumed
- **Responsive behavior** — how does the layout change at mobile/tablet/desktop? If unspecified, implement sensible defaults and flag

One question to Form if there's a genuine blocker. Don't request a full review session — implement with reasonable assumptions and flag them in the summary.

### Step 2: Plan the Component Structure

Before writing the page, map the component tree:

- Identify reusable components vs. page-specific layout
- Reuse existing shared components where they fit — don't duplicate
- Break the page into components with clear, single responsibilities
- Define TypeScript types for all data structures upfront — no `any`
- Decide server vs. client boundary: default to Server Components; mark `'use client'` only where interactivity requires it (event handlers, browser APIs, stateful hooks)

```
// Example: UserProfilePage
UserProfilePage (server — fetches data)
├── ProfileHeader (server — static layout)
│   ├── Avatar (shared component)
│   └── UserMeta (server)
├── ActivityFeed (client — real-time updates)
│   ├── FeedItem (server-renderable)
│   └── LoadMoreButton (client)
└── SettingsPanel (client — form interactions)
    ├── FormField (shared component)
    └── SaveButton (shared component)
```

### Design Intelligence (via uiux)

After planning the component structure (Step 2), query performance and stack guidelines:

```bash
python3 -m prism_agent.uiux search --domain react --query "{optimization_area}" --limit 3
```

Use results to:

- Apply framework-specific performance patterns (memoization, code splitting, Suspense)
- Avoid documented performance anti-patterns
- Choose correct data fetching strategy based on the guidelines

### Step 3: Write the Implementation

Write all files. Not scaffolding — complete, working code.

**Page / route file:**

- Wire up data fetching using the framework's pattern (Server Components + `fetch`, `getServerSideProps`, `load`, loaders)
- Pass typed data down to components — no prop drilling beyond 2 levels; use composition or context
- Handle auth/authorization if the page requires it (check existing auth setup)

**Data fetching:**

- Server-side by default — render with real data, not client-side spinners for initial load
- Loading state: skeleton screens that match the page layout, not a centered spinner replacing everything
- Error state: user-friendly message + retry action; not a raw error dump or blank page
- Empty state: helpful message that explains why there's nothing and what to do; not silence
- Pagination / infinite scroll if the dataset requires it

**Responsive layout:**

- Mobile-first: start at 375px, layer up with `sm:`, `md:`, `lg:` breakpoints
- No horizontal overflow at any breakpoint
- Touch targets minimum 44×44px on mobile
- Navigation patterns that work on both mobile (drawer/bottom nav) and desktop (sidebar/top nav)

**Accessibility:**

- Semantic HTML throughout — `<main>`, `<nav>`, `<header>`, `<section>`, `<article>`, `<aside>`
- Landmark regions so screen reader users can navigate
- Heading hierarchy: one `<h1>` per page, logical `<h2>`/`<h3>` nesting
- All interactive elements keyboard-reachable; tab order matches visual order
- Focus management on route transitions and modal/drawer open/close
- `aria-live` regions for content that updates without navigation
- Images: `alt` text that describes function, not appearance; `alt=""` for decorative images
- Forms: `<label>` elements associated with inputs; error messages linked via `aria-describedby`

**Token discipline:**

- All visual values from Form's tokens — no hardcoded hex, raw px spacing, or ad hoc font sizes
- If a value isn't in the tokens, flag it and ask Form; don't invent

**State management:**

- URL state for filters, sort, pagination — keeps the page bookmarkable and shareable
- Local component state for ephemeral UI (open/closed, hover, focus)
- Server state via React Query / TanStack Query / SWR for client-fetched data with caching
- Form state via React Hook Form or native form actions; preserve state on validation errors

**Example — settings page (Next.js App Router + Tailwind):**

```tsx
// app/settings/page.tsx — Server Component
import { getSession } from "@/lib/auth";
import { getUserSettings } from "@/lib/api/user";
import { SettingsForm } from "./SettingsForm";
import { redirect } from "next/navigation";

export default async function SettingsPage() {
  const session = await getSession();
  if (!session) redirect("/login");

  const settings = await getUserSettings(session.userId);

  return (
    <main className="mx-auto max-w-2xl px-4 py-10">
      <h1 className="text-[--text-heading] text-2xl font-semibold mb-8">
        Account settings
      </h1>
      <SettingsForm initialValues={settings} userId={session.userId} />
    </main>
  );
}
```

```tsx
// app/settings/SettingsForm.tsx — Client Component (needs interactivity)
"use client";

import { useActionState } from "react";
import { updateSettings } from "@/lib/actions/user";
import { FormField } from "@/components/ui/FormField";
import { Button } from "@/components/ui/Button";
import type { UserSettings } from "@/lib/types";

type Props = { initialValues: UserSettings; userId: string };

export function SettingsForm({ initialValues, userId }: Props) {
  const [state, action, isPending] = useActionState(updateSettings, null);

  return (
    <form action={action} className="space-y-6">
      <input type="hidden" name="userId" value={userId} />

      <FormField
        label="Display name"
        name="displayName"
        defaultValue={initialValues.displayName}
        error={state?.errors?.displayName}
        required
      />

      <FormField
        label="Email"
        name="email"
        type="email"
        defaultValue={initialValues.email}
        error={state?.errors?.email}
        required
      />

      {state?.error && (
        <p role="alert" className="text-sm text-[--color-danger]">
          {state.error}
        </p>
      )}

      {state?.success && (
        <p role="status" className="text-sm text-[--color-success]">
          Settings saved.
        </p>
      )}

      <Button type="submit" loading={isPending}>
        Save changes
      </Button>
    </form>
  );
}
```

Write all files the feature needs. Don't stop at the page file.

### Step 4: Summarize

```
┌─ UI: [Screen/Feature Name] ─────────────────────────────────┐
│ Route: [path]                                                 │
│ Stack: [framework · styling · state · data fetching]          │
│                                                               │
│ Files written                                                 │
│   [list each file and its role]                              │
│                                                               │
│ Component tree                                                │
│   [indented tree — server/client boundary marked]            │
│                                                               │
│ Data                                                          │
│   Source: [API endpoints / server actions / DB]              │
│   Loading: [skeleton approach]                               │
│   Error: [user-facing error approach]                        │
│   Empty: [empty state approach]                              │
│                                                               │
│ Responsive: mobile (375px) · tablet (768px) · desktop        │
│                                                               │
│ a11y: [landmark regions, heading hierarchy, keyboard model]  │
│                                                               │
│ Spec gaps filled: [any assumptions made — flag for Form]     │
└──────────────────────────────────────────────────────────────┘
```

## Delivery

If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.

当前收录版本

0.6.4

核对来源版本 ↗

质量评测

满分 100。前四项来自 DeepSkill 收录的质量报告。

场景价值92/100
评分依据

高价值前端实现工具,直接解决UI开发核心需求

触发精准85/100
评分依据

触发词覆盖全面,包含'build a page'、'implement this screen'等多种变体

结构规范90/100
评分依据

步骤划分清晰,从环境检查到实现总结形成完整闭环

执行可靠88/100
评分依据

包含完整的前端工程化最佳实践,如错误处理、加载状态、响应式设计

证据可验 (前四项均值)89/100
计算方式

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

risk · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。

来源与使用声明 SkillPi 的部分技能资料来自公开来源或创作者提交。第三方内容的权利归各自权利人所有。安装或运行前,请查看原站的许可、权限要求和使用风险。

来源与使用

请按详情页的作者、原始来源和许可证核对使用条件,运行前检查技能需要的权限。目录收录不等于已验证安装或安全性。