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

frontend-code-review前端代码审查

Agent Skill

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

总安装

272

周安装

11

下载量

85
Local Agent

安装说明

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

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:frontend-code-review(前端代码审查)
来源仓库:https://smithery.ai
仓库路径:frontend-code-review
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

用于辅助前端页面、组件和样式开发,适合生成或审查 React、Vue、Tailwind 等代码。

  • 适用于 Local Agent,可整理组件结构或定位布局和性能问题。
  • 使用时需结合项目现有设计系统、路由和构建方式,避免生成孤立片段。
  • 涉及页面改动时应配合本地预览和构建检查确认视觉效果。
  • 注意响应式表现和构建方式,确保最终输出符合预期。

SKILL.md

Frontend Code Review

Perform thorough frontend code reviews for the Teetsh React/TypeScript codebase.

Review Process

1. Understand the Context

Before reviewing, gather context:

  • Read the PR description or understand the change purpose
  • Identify which features/containers are affected
  • Check if this affects shared components, queries, or styling

2. Load Relevant References

Based on the review type, read appropriate references:

  • Always read: references/common-mistakes.md for Teetsh-specific antipatterns
  • For components/hooks: references/react-patterns.md
  • For data fetching: references/react-query.md
  • For UI/styling: references/styling.md
  • For translations: references/i18n.md
  • For test changes: references/testing.md

3. Review Scope by Type

Full PR Review: Check all aspects - architecture, implementation, styling, i18n, tests

Component Review: Focus on patterns, props typing, accessibility, responsive design

Query Review: Focus on query keys, serializers, error handling, mutations

Styling Review: Focus on twin.macro usage, theme constants, responsive classes

4. Provide Structured Feedback

Organize feedback by priority:

Critical Issues

Security vulnerabilities, broken functionality, accessibility blockers, data loss risks

Important Issues

Missing error/loading states, incorrect patterns, i18n gaps, test gaps

Suggestions

Code clarity, performance optimizations, better patterns

Positive Feedback

Well-designed components, good test coverage, clean patterns

5. Code Examples

For each issue, provide:

  • What: Describe the problem
  • Why: Explain the risk or impact
  • How: Show code example of the fix

Key Review Areas

React Patterns

Check adherence to Teetsh patterns:

  • Container vs Component separation (containers handle logic, components are presentational)
  • Compound components for complex UI groups (Disclosure, FormGroup)
  • Context hooks with validation (useUser, useSchoolSchoolyear)
  • Custom hooks naming (useXxx)
  • Prefer CSS-based responsive (tw="lg:flex"), use useIsBelowBreakpoint only when layouts differ completely
  • Default export for components, named export for utilities

React Query

  • Query keys include all dependencies: [schoolyearId, schoolId, KEY_CONSTANT,...params]
  • Data transformation in serializer functions, not components
  • Appropriate staleTime for data type
  • Error handling with AxiosError typing
  • Mutations with proper cache invalidation

Styling

  • Use tw macro, not className strings
  • Colors from themeConstants.ts, never hardcoded
  • Conditional styles: css={[tw..., condition && tw...]}`
  • Form inputs wrapped with FormGroup
  • Responsive: mobile-first, lg: breakpoint for desktop

i18n

  • useTranslation(['namespace']) with namespace array
  • Keys: namespace:section.key
  • Dates: use format() utility with locale
  • No hardcoded user-facing strings

Accessibility

  • Semantic HTML (button vs div, etc.)
  • ARIA labels on interactive elements
  • Labels linked to inputs with htmlFor
  • Keyboard navigation support

Testing

  • Browser tests (Vitest browser) for components: Component.browser.test.tsx
  • jsdom tests for unit/logic: utils.test.tsx
  • Playwright E2E for critical user flows
  • Storybook stories for design system components
  • Descriptive test names: it('should return X when Y')

Review Output Format

Structure your review as:

## Critical Issues
[Issues that must be fixed before merge]

## Important Issues
[Issues that should be fixed]

## Suggestions
[Optional improvements]

## Positive Feedback
[What was done well]

For each issue:

### [Area]: [Brief description]

**Problem**: [What's wrong and why it matters]

**Current code**:

[Show problematic code]


**Suggested fix**:

[Show corrected code]


**Reference**: [Link to specific pattern]

Example Review Snippets

Missing FormGroup Wrapper


### Styling: Input missing FormGroup wrapper

**Problem**: Form inputs should be wrapped with FormGroup for consistent styling and accessibility

**Current code**:

<Input id="email" value={email} onChange={(e) => setEmail(e.target.value)} />


**Suggested fix**:

<FormGroup id="email" label={t('common:form.email')} error={errors.email}

<Input id="email" value={email} onChange={(e) => setEmail(e.target.value)} hasError={!!errors.email} /> </FormGroup>


**Reference**: See `references/styling.md` - FormGroup Pattern

Query Key Missing Dependencies


### React Query: Query key missing school context

**Problem**: Query key must include schoolyearId and schoolId for proper cache isolation

**Current code**:

useQuery({ queryKey: [STUDENTS_KEY, classId], queryFn: () => getStudents(classId), });


**Suggested fix**:

const { schoolyear, school } = useSchoolSchoolyear();

useQuery({ queryKey: [schoolyear.id, school.id, STUDENTS_KEY, classId], queryFn: () => getStudents({ schoolyearId: schoolyear.id, schoolId: school.id, classId }), });


**Reference**: See `references/react-query.md` - Query Key Structure

Hardcoded String


### i18n: Hardcoded user-facing string

**Problem**: All user-facing text must use i18n for localization support

**Current code**:

<Button>Delete</Button>


**Suggested fix**:

const { t } = useTranslation(['common']); <Button>{t('common:buttons.delete')}</Button>


**Reference**: See `references/i18n.md` - Translation Usage

Using className Instead of tw


### Styling: Using className instead of tw macro

**Problem**: Project uses twin.macro for Tailwind, not className strings

**Current code**:

<div className="flex items-center gap-2">


**Suggested fix**:

<div tw="flex items-center gap-2">


**Reference**: See `references/styling.md` - twin.macro Usage

When NOT to Comment

Avoid feedback on:

  • Trivial formatting issues (Prettier handles this)
  • Personal style preferences not in project patterns
  • Nitpicks that don't affect functionality or maintainability
  • Issues already addressed in other comments

Multi-file Review Strategy

For PRs with many files:

  1. Start with architecture overview (new containers, major changes)
  2. Review core component/container logic first
  3. Review queries and data handling
  4. Review styling and i18n
  5. Review tests
  6. Summarize overall assessment

After Review

If significant issues found:

  • Summarize the most important themes
  • Suggest whether changes are required before merge
  • Offer to explain any patterns or practices in detail

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

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

平台分布

Local Agent

79.26%
按下载量换算67

安全审计

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

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills