Agent SkillsOpenAEV-Platform/openaev › review-frontend

review-frontend

GitHub

用于审查 OpenAEV React/TypeScript 前端代码的清单,涵盖组件结构、表单、MUI 样式、权限控制、国际化、数据加载及 TypeScript 规范等,确保 PR 审核和代码审计质量。

.github/skills/review-frontend/SKILL.md OpenAEV-Platform/openaev

Trigger Scenarios

审查前端 Pull Request 审计前端功能实现

Install

npx skills add OpenAEV-Platform/openaev --skill review-frontend -g -y
More Options

Non-standard path

npx skills add https://github.com/OpenAEV-Platform/openaev/tree/main/.github/skills/review-frontend -g -y

Use without installing

npx skills use OpenAEV-Platform/openaev@review-frontend

指定 Agent (Claude Code)

npx skills add OpenAEV-Platform/openaev --skill review-frontend -a claude-code -g -y

安装 repo 全部 skill

npx skills add OpenAEV-Platform/openaev --all -g -y

预览 repo 内 skill

npx skills add OpenAEV-Platform/openaev --list

SKILL.md

Frontmatter
{
    "name": "review-frontend",
    "description": "Frontend review checklist for OpenAEV React\/TypeScript code: component patterns, forms, MUI usage, permissions, i18n, state management, dead code. Use when reviewing PRs or auditing frontend features."
}

Frontend Review

Procedure

Step 1 — Check component structure

  • One component per file, one folder per feature
  • Functional components with FunctionComponent typing
  • No class components in new code (.jsx.tsx migration required when touching)
  • Props defined via explicit interface Props (not inline)

Step 2 — Check forms

  • Zod for validation via zodImplement<T>().with({...})
  • React Hook Form via useForm<T> + FormProvider
  • Field controllers: TextFieldController, SelectFieldController, TagFieldController
  • Form layout: flexbox with gap: theme.spacing(2), no MUI Grid
  • Validate types match api-types.d.ts (auto-generated, never manual)

Step 3 — Check MUI & styling

  • No MUI for layout — native div, section, header, flexbox/grid
  • sx over style — use sx on MUI components, never style={{ }}
  • Theme tokens — use theme.palette, theme.spacing(), theme.shape, theme.typography for all visual values; no hardcoded #hex, rgba(), or raw px (fixed width exempt)

Step 4 — Check permissions

  • Create/Edit: wrapped with <Can I={ACTIONS.X} a={SUBJECTS.Y}>
  • No hardcoded role checks — use CASL ability.can()
  • New subjects → added in src/utils/permissions/types.ts

Step 5 — Check i18n

  • t() called early — pass translated strings to child components
  • Keys = English text: t('Organization name'), not t('organization_name')
  • No missing translations:
    cd openaev-front && yarn i18n-checker 2>&1 | tail -20
    

Step 6 — Check data loading patterns

  • Paginated lists: useQueryableWithLocalStorage + PaginationComponentV2
  • Actions: simple calls in actions/{feature}/{feature}-actions.ts
  • Hooks: custom hook per feature (e.g., useOrganizations.ts) for local state

Step 7 — Check TypeScript

  • No any types
  • No @ts-ignore without explanatory comment
  • Auto-generated types from API used (not manual interfaces for API responses):
    grep -rn "interface.*Input\|interface.*Output" openaev-front/src/ --include="*.ts" --include="*.tsx" | grep -v api-types | grep -v node_modules | head -20
    

Step 8 — Check dead code

  • No unused imports (ESLint catches most)
  • No orphaned .jsx files if a .tsx replacement exists
  • No components imported but not rendered
  • No dead props — grep all call-sites of modified components; any prop declared in interface Props that no consumer passes must be removed

Step 9 — Report

Document findings using conventional comments format:

  • issue (blocking): for pattern violations that cause bugs or inconsistency
  • suggestion (non-blocking): for improvements and modernization
  • nitpick: for style preferences
  • praise: for well-implemented patterns

Version History

  • 3.260818.1 Current 2026-08-20 12:00

Same Skill Collection

.github/skills/add-contract-output-type/SKILL.md
.github/skills/add-migration/SKILL.md
.github/skills/add-test/SKILL.md
.github/skills/create-feature-module/SKILL.md
.github/skills/reduce-tx-baseline/SKILL.md
.github/skills/review-code/SKILL.md
.github/skills/review-docs/SKILL.md
.github/skills/review-migration/SKILL.md
.github/skills/review-multi-tenancy/SKILL.md
.github/skills/review-performance/SKILL.md
.github/skills/review-security/SKILL.md
.github/skills/activate-tenant-table/SKILL.md

Metadata

Files
0
Version
3.260818.1
Hash
0adc27a6
Indexed
2026-08-20 12:00

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-24 21:45
浙ICP备14020137号-1 $방문자$