Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计未展示

frontend-implementation前端实现

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

9,671

周安装

489

GitHub Stars

公开资料未说明

下载量

6,611
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:frontend-implementation(前端实现)
来源仓库:https://github.com/jpicklyk/task-orchestrator
仓库路径:skills/frontend-implementation
安装命令:
npx skills add jpicklyk/task-orchestrator --skill "frontend-implementation"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add jpicklyk/task-orchestrator --skill "frontend-implementation"

简介

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构或定位布局和性能问题。
  • 使用时需结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时配合本地预览和构建检查确认视觉效果。
  • 发现并安装 AI 代理的技能。
  • frontend-implementation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
Frontend Implementation
description
Frontend development with React, Vue, Angular, modern web technologies. Use for frontend, ui, react, vue, angular, web, component tags. Provides validation commands, component patterns, accessibility guidance.
allowed-tools
Read, Write, Edit, Bash, Grep, Glob

Frontend Implementation Skill

Domain-specific guidance for frontend UI development, component implementation, and user interactions.

When To Use This Skill

Load this Skill when task has tags:

  • frontend, ui, react, vue, angular, web
  • component, jsx, tsx, styling, responsive

Validation Commands

Run Tests

# Full test suite
npm test

# With coverage
npm test -- --coverage

# Watch mode
npm test -- --watch

# Specific test file
npm test -- UserProfile.test.tsx

# Specific test pattern
npm test -- -t "should render profile"

Build Project

# Production build
npm run build

# Development build
npm run build:dev

# Type checking (TypeScript)
npm run type-check

# Linting
npm run lint

Run Application

# Development server
npm start

# With specific port
PORT=3001 npm start

Success Criteria (Before Completing Task)

ALL tests MUST pass (0 failures) ✅ Build MUST succeed without errors ✅ No TypeScript/linting errorsComponent renders without errorsResponsive design works (mobile, tablet, desktop) ✅ Accessibility standards met (ARIA labels, keyboard navigation)

Common Frontend Tasks

Component Development

  • Create functional components (React hooks, Vue composition API)
  • Props and state management
  • Event handling
  • Conditional rendering
  • List rendering with keys

Styling

  • CSS modules or styled-components
  • Responsive design (media queries)
  • Mobile-first approach
  • Consistent with design system

Forms and Validation

  • Form state management (Formik, React Hook Form)
  • Input validation (client-side)
  • Error display
  • Submit handling

API Integration

  • Fetch data with useEffect/axios
  • Loading states
  • Error handling
  • Data transformation

Testing Principles for Frontend

Component Testing (Preferred)

Test user interactions:

test('submits form with valid data', () => {
  render(<LoginForm onSubmit={mockSubmit} />)

  fireEvent.change(screen.getByLabelText('Email'), {
    target: { value: ' [email protected] ' }
  })
  fireEvent.change(screen.getByLabelText('Password'), {
    target: { value: 'password123' }
  })
  fireEvent.click(screen.getByText('Login'))

  expect(mockSubmit).toHaveBeenCalledWith({
    email: ' [email protected] ',
    password: 'password123'
  })
})

What to Test

DO test:

  • Component renders without errors
  • Correct content displays
  • User interactions work (clicks, inputs)
  • Conditional rendering logic
  • Form validation
  • Error states
  • Accessibility (ARIA attributes, keyboard navigation)

DON'T test:

  • Implementation details (state variable names)
  • Third-party library internals
  • Styling specifics (unless critical)

Test User-Facing Behavior

// ✅ GOOD - Tests what user sees
expect(screen.getByText('Welcome, John')).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Submit' })).toBeEnabled()

// ❌ BAD - Tests implementation details
expect(component.state.username).toBe('John')
expect(mockFunction).toHaveBeenCalledTimes(1)

Common Blocker Scenarios

Blocker 1: API Not Ready

Issue: Frontend needs API endpoint that doesn't exist yet

What to try:

  • Check if backend task is marked complete
  • Mock API responses for development
  • Create mock data file

If blocked: Report to orchestrator - backend task may be incomplete

Blocker 2: Design Assets Missing

Issue: Need icons, images, colors not provided

What to try:

  • Check design system documentation
  • Use placeholder assets temporarily
  • Check with design team

If blocked: Report to orchestrator - need design assets or specifications

Blocker 3: TypeScript Type Errors

Issue: Complex types from API don't match frontend expectations

What to try:

  • Check API response format (console.log actual response)
  • Generate types from API schema (OpenAPI, GraphQL)
  • Use unknown type and validate at runtime

Common causes:

  • API changed but types not updated
  • Optional fields not marked with ?
  • Nested objects not properly typed

Blocker 4: Test Environment Issues

Issue: Tests fail in CI but pass locally

What to try:

  • Check Node version consistency
  • Check test environment variables
  • Check for timing issues (add waitFor)
  • Check for browser-specific APIs used without polyfills

Blocker 5: Responsive Design Conflicts

Issue: Component works on desktop but breaks on mobile

What to try:

  • Test in browser dev tools mobile view
  • Check media queries
  • Check for fixed widths vs responsive units
  • Check for overflow issues

Blocker Report Format

⚠️ BLOCKED - Requires Senior Engineer

Issue: [Specific problem - API endpoint 404, missing design specs, etc.]

Attempted Fixes:
- [What you tried #1]
- [What you tried #2]
- [Why attempts didn't work]

Root Cause (if known): [Your analysis]

Partial Progress: [What work you DID complete]

Context for Senior Engineer:
- Error output: [Console errors, network errors]
- Screenshots: [If visual issue]
- Related files: [Files involved]

Requires: [What needs to happen]

Quick Reference

React Functional Component

import React, { useState, useEffect } from 'react';

interface UserProfileProps {
  userId: string;
  onUpdate?: (user: User) => void;
}

export const UserProfile: React.FC<UserProfileProps> = ({ userId, onUpdate }) => {
  const [user, setUser] = useState<User | null>(null);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);

  useEffect(() => {
    fetch(`/api/users/${userId}`)
      .then(res => res.json())
      .then(data => {
        setUser(data);
        setLoading(false);
      })
      .catch(err => {
        setError(err.message);
        setLoading(false);
      });
  }, [userId]);

  if (loading) return <div>Loading...</div>;
  if (error) return <div>Error: {error}</div>;
  if (!user) return <div>User not found</div>;

  return (
    <div className="user-profile">
      <h2>{user.name}</h2>
      <p>{user.email}</p>
    </div>
  );
};

Form with Validation

import { useState } from 'react';

export const LoginForm = ({ onSubmit }) => {
  const [email, setEmail] = useState('');
  const [password, setPassword] = useState('');
  const [errors, setErrors] = useState({});

  const validate = () => {
    const newErrors = {};
    if (!email) newErrors.email = 'Email required';
    if (!email.includes('@')) newErrors.email = 'Invalid email';
    if (!password) newErrors.password = 'Password required';
    if (password.length < 8) newErrors.password = 'Min 8 characters';
    return newErrors;
  };

  const handleSubmit = (e) => {
    e.preventDefault();
    const newErrors = validate();
    if (Object.keys(newErrors).length > 0) {
      setErrors(newErrors);
      return;
    }
    onSubmit({ email, password });
  };

  return (
    <form onSubmit={handleSubmit}>
      <div>
        <label htmlFor="email">Email</label>
        <input
          id="email"
          type="email"
          value={email}
          onChange={(e) => setEmail(e.target.value)}
          aria-invalid={!!errors.email}
          aria-describedby={errors.email ? "email-error" : undefined}
        />
        {errors.email && <span id="email-error" role="alert">{errors.email}</span>}
      </div>
      <div>
        <label htmlFor="password">Password</label>
        <input
          id="password"
          type="password"
          value={password}
          onChange={(e) => setPassword(e.target.value)}
          aria-invalid={!!errors.password}
        />
        {errors.password && <span role="alert">{errors.password}</span>}
      </div>
      <button type="submit">Login</button>
    </form>
  );
};

Accessibility Checklist

ARIA labels for all interactive elements ✅ Keyboard navigation works (Tab, Enter, Escape) ✅ Focus indicators visible ✅ Color contrast meets WCAG AA standards ✅ Screen reader compatible ✅ Semantic HTML (button, nav, main, header) ✅ Alt text for images ✅ Form labels associated with inputs

Common Patterns to Follow

  1. Mobile-first responsive design
  2. Component composition over inheritance
  3. Props for configuration, state for interaction
  4. Lifting state up when shared between components
  5. Error boundaries for error handling
  6. Loading states for async operations
  7. Accessibility by default (ARIA, keyboard support)

What NOT to Do

❌ Don't use inline styles for complex styling ❌ Don't forget key prop in lists ❌ Don't mutate state directly ❌ Don't skip accessibility features ❌ Don't hardcode API URLs (use environment variables) ❌ Don't skip loading and error states ❌ Don't forget mobile responsiveness

Focus Areas

When reading task sections, prioritize:

  • requirements - What UI needs to be built
  • technical-approach - Component structure, state management
  • design - Visual specifications, layout
  • ux - User interactions, flows

Remember

  • Test user interactions - what users see and do, not implementation
  • Accessibility is mandatory - ARIA labels, keyboard navigation
  • Mobile-first - design for mobile, enhance for desktop
  • Error and loading states - always handle async operations
  • Report blockers promptly - missing APIs, design assets, specifications
  • Follow existing patterns - check codebase for similar components
  • Validation is mandatory - ALL tests must pass before completion

Additional Resources

For deeper patterns and examples, see:

  • PATTERNS.md - React hooks patterns, state management (load if needed)
  • BLOCKERS.md - Detailed frontend-specific blockers (load if stuck)
  • examples.md - Complete component examples (load if uncertain)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

27.85%
按下载量换算1,841

OpenCode

24.52%
按下载量换算1,621

Codex

16.91%
按下载量换算1,118

Claude Code

12.58%
按下载量换算832

Antigravity

7.91%
按下载量换算523

Gemini CLI

3.19%
按下载量换算211

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills