Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

dev-coding-frontend开发编码前端

Agent Skill

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

总安装

321

周安装

13

GitHub Stars

公开资料未说明

下载量

101
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/codihaus/claude-skills --skill dev-coding-frontend

简介

dev-coding-frontend 辅助前端页面、组件、样式和交互逻辑的开发与维护,支持 React、Next.js、Vue 等主流框架。

  • 适用于生成或审查 UI 代码、整理组件结构、排查布局问题等常见任务。
  • 使用时需结合项目现有设计系统、路由配置和构建流程,避免产出孤立片段。
  • 涉及页面改动时应配合本地预览和构建检查,确认视觉效果无误。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

/dev-coding-frontend - Frontend Implementation

Skill Awareness: See skills/_registry.md for all available skills. - Loaded by: /dev-coding when UI work needed - References: Load tech-specific from references/ (nextjs.md, vue.md, etc.) - Before: Backend API contract should be documented

Frontend-specific patterns for UI components, pages, and client-side logic.

When Loaded

This skill is loaded by /dev-coding when:

  • Spec requires UI components
  • Spec requires pages/routes
  • Spec requires client-side logic

Workflow

Step 1: Understand Frontend Requirements

From the UC spec, extract:

## Frontend Requirements Checklist

[ ] Pages/Routes needed?
    - Path
    - Layout
    - Auth required?

[ ] Components needed?
    - New components
    - Modify existing
    - Shared vs feature-specific

[ ] State management?
    - Local state
    - Global state
    - Server state (API data)

[ ] Forms?
    - Fields
    - Validation rules
    - Submit handling

[ ] API integration?
    - Endpoints to call
    - Request/response handling
    - Loading/error states

Step 2: Review API Contract

If backend was just implemented (or exists), review:

## Available API

From backend implementation notes:

### POST /api/auth/login
- Request: `{ email, password }`
- Response: `{ token, user }`
- Errors: 400 (validation), 401 (credentials)

Know this BEFORE building UI to match shapes.

Step 3: Component Architecture

Decide component structure:

Feature component structure:
src/
├── components/
│   ├── ui/              # Shared/base components
│   │   ├── Button.tsx
│   │   └── Input.tsx
│   └── features/
│       └── auth/        # Feature-specific
│           ├── LoginForm.tsx
│           └── SignupForm.tsx
├── app/ (or pages/)
│   └── login/
│       └── page.tsx     # Page that uses LoginForm

Follow project conventions (from scout):

  • Where components live
  • Naming pattern
  • Export style

Step 4: Build Components

Order: Base components → Feature components → Pages

1. Check if base components exist (Button, Input, etc.)
2. Create feature components
3. Create/modify pages
4. Wire up routing

Component Pattern:

// Follow project conventions
// This is a common pattern, adapt to project

interface LoginFormProps {
  onSuccess?: (user: User) => void;
  redirectTo?: string;
}

export function LoginForm({ onSuccess, redirectTo = '/' }: LoginFormProps) {
  const [isLoading, setIsLoading] = useState(false);
  const [error, setError] = useState<string | null>(null);

  const handleSubmit = async (e: FormEvent) => {
    e.preventDefault();
    setIsLoading(true);
    setError(null);

    try {
      const result = await login(formData);
      onSuccess?.(result.user);
      router.push(redirectTo);
    } catch (err) {
      setError(err.message);
    } finally {
      setIsLoading(false);
    }
  };

  return (
    <form onSubmit={handleSubmit}>
      {error && <Alert variant="error">{error}</Alert>}
      {/* Form fields */}
      <Button type="submit" disabled={isLoading}>
        {isLoading ? 'Loading...' : 'Login'}
      </Button>
    </form>
  );
}

Step 5: API Integration

Create API client functions:

// lib/api/auth.ts
export async function login(credentials: LoginCredentials) {
  const response = await fetch('/api/auth/login', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(credentials),
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.message || 'Login failed');
  }

  return response.json();
}

Handle states:

// Loading state
{isLoading && <Spinner />}

// Error state
{error && <Alert variant="error">{error}</Alert>}

// Empty state
{items.length === 0 && <EmptyState message="No items found" />}

// Success state
{items.map(item => <ItemCard key={item.id} item={item} />)}

Step 6: Form Handling

Validation Pattern:

// Client-side validation
const validateForm = (data: FormData) => {
  const errors: Record<string, string> = {};

  if (!data.email) {
    errors.email = 'Email is required';
  } else if (!isValidEmail(data.email)) {
    errors.email = 'Invalid email format';
  }

  if (!data.password) {
    errors.password = 'Password is required';
  } else if (data.password.length < 8) {
    errors.password = 'Password must be at least 8 characters';
  }

  return errors;
};

// Show errors
{errors.email && <span className="error">{errors.email}</span>}

Form Libraries (use if project has them):

  • react-hook-form
  • formik
  • native form handling

Step 7: Verification

Visual verification:

// Option 1: Playwright screenshot
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/login' });
await mcp__playwright__browser_snapshot({});

// Option 2: Manual check
// Navigate to page in browser, verify appearance

Interaction verification:

// Fill and submit form
await mcp__playwright__browser_type({
  element: 'email input',
  ref: 'email-input-ref',
  text: 'test@test.com'
});

await mcp__playwright__browser_click({
  element: 'submit button',
  ref: 'submit-btn-ref'
});

// Verify result
await mcp__playwright__browser_snapshot({});

Verification checklist:

[ ] Page renders without errors
[ ] Components display correctly
[ ] Forms validate input
[ ] Submit calls correct API
[ ] Loading states show
[ ] Errors display properly
[ ] Success redirects/updates correctly
[ ] Mobile responsive (if required)

Common Patterns

Conditional Rendering

// Auth guard
{isAuthenticated ? <Dashboard /> : <Redirect to="/login" />}

// Loading
{isLoading ? <Spinner /> : <Content />}

// Permission
{user.canEdit && <EditButton />}

Data Fetching

// Server component (Next.js App Router)
async function PostsPage() {
  const posts = await getPosts(); // Fetches on server
  return <PostList posts={posts} />;
}

// Client component with useEffect
function PostsPage() {
  const [posts, setPosts] = useState([]);
  const [isLoading, setIsLoading] = useState(true);

  useEffect(() => {
    getPosts().then(setPosts).finally(() => setIsLoading(false));
  }, []);

  if (isLoading) return <Spinner />;
  return <PostList posts={posts} />;
}

// With SWR/React Query
function PostsPage() {
  const { data: posts, error, isLoading } = useSWR('/api/posts', fetcher);

  if (isLoading) return <Spinner />;
  if (error) return <Error message={error.message} />;
  return <PostList posts={posts} />;
}

Navigation

// Next.js
import { useRouter } from 'next/navigation';
const router = useRouter();
router.push('/dashboard');

// React Router
import { useNavigate } from 'react-router-dom';
const navigate = useNavigate();
navigate('/dashboard');

Toast/Notifications

// Success feedback
toast.success('Saved successfully');

// Error feedback
toast.error('Failed to save. Please try again.');

// Use project's toast library (sonner, react-hot-toast, etc.)

Accessibility Checklist

[ ] Images have alt text
[ ] Form inputs have labels
[ ] Buttons have accessible names
[ ] Color contrast sufficient
[ ] Keyboard navigation works
[ ] Focus states visible
[ ] Screen reader tested (if critical)

Responsive Checklist

[ ] Mobile layout (< 768px)
[ ] Tablet layout (768px - 1024px)
[ ] Desktop layout (> 1024px)
[ ] Touch targets large enough (44px minimum)
[ ] No horizontal scroll on mobile

Debugging

Component Not Rendering

# Check console for errors
# Browser DevTools → Console

# Check if component imported correctly
# Check if props passed correctly
# Check conditional rendering logic

API Call Failing

# Check Network tab in DevTools
# Verify URL, method, headers
# Check CORS if cross-origin
# Verify backend is running

Styling Issues

# Check if styles imported
# Check class names (typos)
# Check CSS specificity
# Check for conflicting styles
# Use DevTools Elements panel

Using Playwright for Debug

// Take screenshot of current state
await mcp__playwright__browser_take_screenshot({
  filename: 'debug-screenshot.png'
});

// Check console messages
await mcp__playwright__browser_console_messages({
  level: 'error'
});

// Check network requests
await mcp__playwright__browser_network_requests({});

Tech-Specific References

Load additional patterns based on detected tech:

TechReference File
Next.jsreferences/nextjs.md
Vuereferences/vue.md
Reactreferences/react.md
shadcn/uireferences/shadcn.md
Tailwindreferences/tailwind.md

These files contain tech-specific patterns, gotchas, and best practices. Add them as your projects use different stacks.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

展示第三方安全扫描或审计结果

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

平台分布

Codex

40.44%
按下载量换算41

Claude

29.64%
按下载量换算30

Cursor

17.94%
按下载量换算18

Gemini CLI

9.95%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills