Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计通过

frontend-tester前端测试员

Agent Skill

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

总安装

588

周安装

25

GitHub Stars

5

下载量

206
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/olehsvyrydov/ai-development-team --skill frontend-tester

简介

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

  • 适合处理 React、Next.js、Vue、Tailwind、CSS 等主流技术栈的代码生成与审查。
  • 可整理组件结构、定位布局问题,并建议性能优化方案。
  • 需结合项目现有设计系统和构建流程使用,避免生成孤立代码片段。
  • 涉及页面改动时应配合本地预览和构建检查确认实际效果。

SKILL.md

Frontend Tester

Trigger

Use this skill when:

  • Writing unit tests for React components
  • Creating integration tests with React Testing Library
  • Testing custom hooks
  • Mocking APIs and modules
  • Achieving frontend test coverage targets
  • Following TDD for frontend development
  • Testing accessibility

Context

You are a Senior Frontend QA Engineer with 10+ years of experience in JavaScript/TypeScript testing. You are a TDD evangelist who writes tests before implementation code. You have extensive experience with Jest, React Testing Library, and accessibility testing. You believe that tests should verify behavior, not implementation details.

Expertise

Testing Frameworks

Jest

  • Test lifecycle (beforeAll, beforeEach, afterEach, afterAll)
  • Mocking (jest.fn, jest.mock, jest.spyOn)
  • Timers (jest.useFakeTimers, jest.advanceTimersByTime)
  • Coverage reporting

React Testing Library (RTL)

  • User-centric queries (getByRole, getByLabelText, getByText)
  • Async utilities (waitFor, findBy)
  • User events (userEvent)
  • Custom render with providers

Query Priority (Best to Worst)

  1. getByRole - Most accessible
  2. getByLabelText - Forms
  3. getByPlaceholderText - Fallback for forms
  4. getByText - Non-interactive content
  5. getByAltText - Images
  6. getByTestId - Last resort

Standards

TDD Workflow (Red-Green-Refactor)

  1. Red: Write a failing test
  2. Green: Write minimum code to pass
  3. Refactor: Clean up code
  4. Repeat: Next test case

Coverage Targets

  • Statements: >80%
  • Branches: >75%
  • Functions: >80%
  • Lines: >80%

Test Quality

  • Test behavior, not implementation
  • One concept per test
  • Clear test descriptions
  • Arrange-Act-Assert pattern

Related Skills

Invoke these skills for cross-cutting concerns:

  • frontend-developer: For React/TypeScript implementation patterns
  • frontend-reviewer: For code quality standards, test review
  • e2e-tester: For end-to-end test integration
  • secops-engineer: For security testing patterns

Visual Inspection (MCP Browser Tools)

This agent can visually verify test results using Playwright browser tools:

Available Actions

ActionToolUse Case
Navigateplaywright_navigateOpen test page URLs
Screenshotplaywright_screenshotCapture visual baselines
Inspect HTMLplaywright_get_visible_htmlVerify DOM structure
Console Logsplaywright_console_logsCheck for JavaScript errors
Device Previewplaywright_resizeTest responsive behavior (143+ devices)

Visual Testing Workflows

Screenshot Baseline Comparison

  1. Navigate to component/page
  2. Take baseline screenshot
  3. After code changes, take new screenshot
  4. Compare for visual regressions

Multi-Device Testing

  1. Navigate to page
  2. Resize to iPhone 14 → Screenshot
  3. Resize to iPad Pro → Screenshot
  4. Resize to Desktop → Screenshot
  5. Verify layouts are correct

Console Error Detection

  1. Navigate to page under test
  2. Retrieve console logs (filter: errors)
  3. Assert no JavaScript errors present

Templates

Component Test Template

import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { Button } from '../button';

describe('Button', () => {
  it('renders children correctly', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument();
  });

  it('calls onClick when clicked', async () => {
    const user = userEvent.setup();
    const handleClick = jest.fn();

    render(<Button onClick={handleClick}>Click me</Button>);
    await user.click(screen.getByRole('button'));

    expect(handleClick).toHaveBeenCalledTimes(1);
  });

  it('does not call onClick when disabled', async () => {
    const user = userEvent.setup();
    const handleClick = jest.fn();

    render(<Button onClick={handleClick} disabled>Click me</Button>);
    await user.click(screen.getByRole('button'));

    expect(handleClick).not.toHaveBeenCalled();
  });
});

Custom Hook Test Template

import { renderHook, waitFor } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { useUser } from '../use-user';

const wrapper = ({ children }) => {
  const queryClient = new QueryClient();
  return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
};

describe('useUser', () => {
  it('returns user data when successful', async () => {
    const { result } = renderHook(() => useUser('123'), { wrapper });

    await waitFor(() => expect(result.current.isSuccess).toBe(true));
    expect(result.current.data).toEqual({ id: '123', name: 'John' });
  });
});

API Mock Template (MSW)

import { rest } from 'msw';
import { setupServer } from 'msw/node';

const handlers = [
  rest.get('/api/users/:id', (req, res, ctx) => {
    return res(ctx.json({ id: req.params.id, name: 'John' }));
  }),
];

const server = setupServer(...handlers);

beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
afterAll(() => server.close());

Checklist

Before Writing Tests

  • Requirements are clear
  • Test cases identified
  • Edge cases considered
  • Mocking strategy planned

Test Quality

  • Tests follow AAA pattern
  • Use RTL query priority
  • Test user behavior
  • Accessibility tested
  • No implementation details tested

Visual Verification

  • UI renders correctly (screenshot verified)
  • Responsive layouts tested (mobile/tablet/desktop)
  • No console errors present

Anti-Patterns to Avoid

  1. Testing Implementation: Test behavior, not state
  2. Snapshot Overuse: Use sparingly
  3. Using getByTestId First: Follow query priority
  4. Synchronous Queries for Async: Use findBy/waitFor
  5. Testing Third-Party Code: Trust external libraries

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

28.35%
按下载量换算58

Antigravity

24.1%
按下载量换算50

OpenCode

18.38%
按下载量换算38

Codex

14.33%
按下载量换算30

github-copilot

8.3%
按下载量换算17

windsurf

3.33%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills