前端审查
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 较高消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: code-review-frontend
description: Use when: "review this PR", "code review", "check my diff", "/review" name: code-review-frontend…
category: 工程开发
runtime: 无特殊运行时
---
# code-review-frontend 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Guardrails / Skill Directory / Step 0: Codebase Context Discovery”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Guardrails / Skill Directory / Step 0: Codebase Context Discovery”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/gsd-map-codebase`、`/interrogate-me` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Guardrails / Skill Directory / Step 0: Codebase Context Discovery”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: code-review-frontend
description: Use when: "review this PR", "code review", "check my diff", "/review" name: code-review-frontend…
category: 工程开发
source: tomevault-io/skills-registry
---
# code-review-frontend
## 什么时候使用
- 用于审阅代码、文档或方案并给出可执行反馈 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Guardrails / Skill Directory / Step 0: Codebase Context Discovery」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "code-review-frontend" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Guardrails / Skill Directory / Step 0: Codebase Context Discovery
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} name: code-review-frontend description: | Multi-agent PR review orchestrator. Discovers codebase quality standards first (lint, format, build, CI), then spawns specialized agents in parallel to surface real issues in the git diff. Agents report findings only — no fixes. Every finding is VERIFIED or tagged [ASSUMPTION]. Use when: "review this PR", "code review", "check my diff", "/review"
Multi-Agent Pre-Landing PR Review
Core contract: Surface real issues. Never invent. Every finding must be traceable to the diff, a config file, or declared as an [ASSUMPTION]. This skill does not fix code.
Guardrails
- Review only the changed behavior and its direct integration points.
- Do not recommend broad rewrites, abstractions, or style churn unless they prevent a verified bug.
- If evidence is weak, label the assumption or omit the finding.
- Prefer findings with a concrete repro, failing test, config violation, or line-level reasoning.
Skill Directory
SKILL_DIR=./
Sub-skill paths (read when relevant):
$SKILL_DIR/checklist.md— base review checklist$SKILL_DIR/typescript-react-reviewer/SKILL.md— TypeScript + React 19 reviewer$SKILL_DIR/typescript-react-reviewer/references/— antipatterns, react19-patterns, checklist$SKILL_DIR/frontend-patterns/SKILL.md— React component & state patterns$SKILL_DIR/jest-react-testing/SKILL.md— Jest + RTL testing quality$SKILL_DIR/jest-react-testing/EXAMPLES.md— test examples reference$SKILL_DIR/vercel-react-best-practices/SKILL.md— Vercel perf rules (70 rules, 8 categories)$SKILL_DIR/vercel-react-best-practices/AGENTS.md— full compiled rules doc$SKILL_DIR/vercel-react-best-practices/rules/— individual rule files$SKILL_DIR/TODOS-format.md— TODO item format reference
Step 0: Codebase Context Discovery
Before anything else, check whether the codebase has been mapped and its conventions are known. Without this, agents cannot distinguish a real violation from a project-specific pattern.
0a. Check .planning/ for existing docs
ls .planning/ 2>/dev/null && find .planning -name "*.md" | head -20
Read any files that describe:
- Architecture, conventions, coding standards
- Tech stack, frameworks in use
- CI/CD pipeline or quality enforcement
If .planning/ has sufficient context → proceed to Step 0b.
If .planning/ is empty or missing codebase context → stop and run:
/gsd-map-codebase
After mapping completes, if enterprise work style / team conventions are still unclear:
/interrogate-me
Do not proceed to review until codebase context is sufficient. Assumptions without any context produce noise, not signal.
0b. Discover Quality Tooling (Source of Truth)
Run these commands to find the project's actual quality standards. These become the ground truth that agents cite in findings.
# Lint config
find . -maxdepth 3 \( -name ".eslintrc*" -o -name "eslint.config.*" \) 2>/dev/null | head -10
# Format config
find . -maxdepth 3 \( -name ".prettierrc*" -o -name "prettier.config.*" \) 2>/dev/null | head -10
# TypeScript config
find . -maxdepth 3 -name "tsconfig*.json" 2>/dev/null | head -10
# Build / quality scripts
cat package.json 2>/dev/null | grep -A 30 '"scripts"'
# CI quality gates
find . -path "./.git" -prune -o -name "*.yml" -path "*/.github/workflows/*" -print 2>/dev/null | head -10
# Stylelint, commitlint, husky, lint-staged
find . -maxdepth 3 \( -name ".stylelintrc*" -o -name ".commitlintrc*" -o -name ".lintstagedrc*" \) 2>/dev/null | head -10
Read each config file found. Extract:
- Lint rules enforced (eslint rules/plugins active)
- Format rules (printWidth, semi, quotes, trailing commas)
- TypeScript strictness (strict, noUncheckedIndexedAccess, etc.)
- Pre-commit hooks (what runs before every commit)
- CI quality gates (what must pass in CI)
Record findings as QUALITY_CONTEXT — agents will reference this, not invent rules.
If no quality tooling found at all → every agent finding for that category must be
tagged [ASSUMPTION — no config found].
Step 1: Branch + Diff Check
git branch --show-current
If on base branch → "Nothing to review — on base branch." → stop.
git fetch origin <base> --quiet && git diff origin/<base> --stat
No diff → same message → stop.
git log origin/<base>..HEAD --oneline
git diff origin/<base>
Read .planning/tasks/TODOS.md if it exists.
Step 2: Scope Detection
Based on files in the diff, decide which specialist agents to spawn:
| Files changed | Agent |
|---|---|
| Any file (always) | base-checklist |
.ts, .tsx |
typescript-react-reviewer |
| React components, hooks, context, state | frontend-patterns |
.test.*, .spec.*, __tests__/ |
jest-react-testing |
Any .ts, .tsx, .js, .jsx frontend file |
vercel-perf |
Agents are additive. A .test.tsx change spawns jest-react-testing + typescript-react-reviewer + vercel-perf + base-checklist.
Step 3: Spawn Sub-Agents in Parallel
Spawn all applicable agents in one message (parallel execution). Pass each agent:
- The QUALITY_CONTEXT discovered in Step 0b
- The base branch name
- The skill files to read
Agents do not fix code. They report findings only.
Agent: base-checklist
Always spawn.
You are a code security and correctness reviewer. Your job is to find real issues — not invent them.
QUALITY CONTEXT (from main agent's discovery):
<paste QUALITY_CONTEXT here>
YOUR TASK:
1. Run: git diff origin/<base>
2. Read: ./checklist.md
3. Review diff against every checklist category.
4. Do NOT fix anything. Report findings only.
EVIDENCE RULES (critical — follow exactly):
- VERIFIED: You can point to the exact diff line or config line that proves the issue.
- [ASSUMPTION]: You believe there is an issue but cannot trace it to a specific line or config rule.
State what you assumed and why. The human will validate.
- If you cannot verify AND the assumption is too weak → do not include the finding at all.
It is better to miss a finding than to invent one.
REPORT FORMAT (use exactly):
## [AGENT: base-checklist]
Model: claude-sonnet-4-6
Skill: checklist.md
### Quality Config Used
<list which config files were referenced, or "None found — all findings are assumptions">
### Findings
| # | Severity | File:Line | Evidence | Issue | What to Check |
|---|----------|-----------|----------|-------|---------------|
| 1 | CRITICAL | src/foo.rb:42 | VERIFIED (diff +42) | Direct SQL interpolation | Use parameterized query |
| 2 | HIGH | src/bar.rb:18 | [ASSUMPTION] no DB schema found | Possible N+1 in loop | Verify association has .includes |
### Verdict
BLOCK | WARN | PASS
### Top Finding
<the single most important finding, or "None">
VERDICT RULES:
- BLOCK = CRITICAL finding that is VERIFIED
- WARN = HIGH findings, or CRITICAL that is only [ASSUMPTION]
- PASS = no findings
Agent: typescript-react-reviewer
Spawn when .ts or .tsx files changed.
You are a TypeScript + React 19 code reviewer. Your job is to surface real issues — not invent them.
QUALITY CONTEXT (from main agent's discovery):
<paste QUALITY_CONTEXT here — especially tsconfig strictness and eslint rules>
YOUR TASK:
1. Run: git diff origin/<base>
2. Read in order:
./typescript-react-reviewer/SKILL.md
./typescript-react-reviewer/references/antipatterns.md
./typescript-react-reviewer/references/react19-patterns.md
./typescript-react-reviewer/references/checklist.md
3. Cross-check findings against the QUALITY CONTEXT — if the project's tsconfig/eslint already
catches the issue automatically, note that instead of flagging it as a human-action item.
4. Do NOT fix anything. Report findings only.
EVIDENCE RULES:
- VERIFIED: Traceable to a specific diff line or to a tsconfig/eslint rule that confirms the pattern is wrong.
- [ASSUMPTION]: You recognize the pattern as problematic based on skill knowledge, but the project
config does not explicitly address it. State what framework knowledge you're drawing from.
- Weak assumptions = omit the finding entirely.
REPORT FORMAT (use exactly):
## [AGENT: typescript-react-reviewer]
Model: claude-sonnet-4-6
Skill: typescript-react-reviewer/SKILL.md + references/
### Quality Config Used
<tsconfig strictness level found, eslint plugins active, or "None found">
### Findings
| # | Severity | File:Line | Evidence | Issue | What to Check |
|---|----------|-----------|----------|-------|---------------|
### Verdict
BLOCK | WARN | PASS
### Top Finding
<the single most important finding, or "None">
VERDICT RULES:
- BLOCK = VERIFIED critical React/TS issue (hook rules violation, memory leak, React 19 specific bug,
type unsafety that will cause runtime errors)
- WARN = [ASSUMPTION] critical issues, or verified high-priority issues
- PASS = no findings
Agent: frontend-patterns
Spawn when React component, hook, context, or UI state files changed.
You are a React frontend patterns reviewer. Your job is to surface real issues — not invent them.
QUALITY CONTEXT (from main agent's discovery):
<paste QUALITY_CONTEXT here>
YOUR TASK:
1. Run: git diff origin/<base>
2. Read: ./frontend-patterns/SKILL.md
3. Focus on: component composition, state colocation, custom hook design, form handling,
accessibility, error boundaries. Skip React 19 hook correctness (typescript-react-reviewer covers that).
4. Do NOT fix anything. Report findings only.
EVIDENCE RULES:
- VERIFIED: Traceable to the diff. You can describe exactly what line introduces the problem.
- [ASSUMPTION]: You believe the pattern is problematic but need more context about component
usage, routing, or data flow to be certain. State what additional info would confirm it.
- If you'd need to see files not in the diff to be certain → tag as [ASSUMPTION] and say which
files would clarify.
REPORT FORMAT (use exactly):
## [AGENT: frontend-patterns]
Model: claude-haiku-4-5-20251001
Skill: frontend-patterns/SKILL.md
### Quality Config Used
<any relevant config, or "None found">
### Findings
| # | Severity | File:Line | Evidence | Issue | What to Check |
|---|----------|-----------|----------|-------|---------------|
### Verdict
BLOCK | WARN | PASS
### Top Finding
<the single most important finding, or "None">
Agent: jest-react-testing
Spawn when test files changed (.test.*, .spec.*, __tests__/).
You are a Jest + React Testing Library reviewer. Your job is to surface real issues — not invent them.
QUALITY CONTEXT (from main agent's discovery):
<paste QUALITY_CONTEXT here — especially jest config, coverage thresholds>
YOUR TASK:
1. Run: git diff origin/<base>
2. Read:
./jest-react-testing/SKILL.md
./jest-react-testing/EXAMPLES.md
3. Look for the jest config file in the repo (jest.config.*, jest section in package.json).
Read it — this tells you the actual test environment and setup. Cross-reference with findings.
4. Also check: does production code in the diff lack test coverage that the QUALITY CONTEXT
says is required (coverage thresholds)?
5. Do NOT fix anything. Report findings only.
EVIDENCE RULES:
- VERIFIED: You can point to the test file line that demonstrates the issue (wrong query type,
missing cleanup, etc.) OR to a jest config rule that the test violates.
- [ASSUMPTION]: You believe there is a testing gap, but haven't confirmed whether other test
files cover the missing case. State which files you'd need to check.
REPORT FORMAT (use exactly):
## [AGENT: jest-react-testing]
Model: claude-haiku-4-5-20251001
Skill: jest-react-testing/SKILL.md
### Quality Config Used
<jest config found, coverage thresholds, or "None found">
### Findings
| # | Severity | File:Line | Evidence | Issue | What to Check |
|---|----------|-----------|----------|-------|---------------|
### Verdict
BLOCK | WARN | PASS
### Top Finding
<the single most important finding, or "None">
VERDICT RULES:
- BLOCK = VERIFIED test that actively gives false confidence (wrong async pattern causing silent pass,
test pollution via missing cleanup, testing implementation not behavior)
- WARN = [ASSUMPTION] gaps, or verified maintainability anti-patterns
- PASS = no findings
Agent: vercel-perf
Spawn when any frontend file (.ts, .tsx, .js, .jsx) changed.
You are a React + Next.js performance reviewer using Vercel engineering best practices.
Your job is to surface real issues — not invent them.
QUALITY CONTEXT (from main agent's discovery):
<paste QUALITY_CONTEXT here — especially Next.js config, bundle analyzer setup>
YOUR TASK:
1. Run: git diff origin/<base>
2. Read: ./vercel-react-best-practices/SKILL.md
3. For any rule that seems violated, read the specific rule file before reporting:
./vercel-react-best-practices/rules/<rule-name>.md
Do not report a violation without reading the full rule — partial knowledge produces noise.
4. Prioritize: CRITICAL categories first (waterfalls, bundle), then HIGH, then MEDIUM.
5. Do NOT fix anything. Report findings only.
EVIDENCE RULES:
- VERIFIED: You read the specific rule file AND can point to the diff line that violates it.
Cite both the rule file name and the diff line.
- [ASSUMPTION]: You believe a rule might apply but the diff alone is not enough to confirm —
e.g., you'd need to see the component's parent or the Next.js config. Say what you need.
- If you haven't read the specific rule file for a potential violation → do not report it.
REPORT FORMAT (use exactly):
## [AGENT: vercel-perf]
Model: claude-sonnet-4-6
Skill: vercel-react-best-practices/SKILL.md
### Quality Config Used
<Next.js version found, bundle analyzer, or "None found">
### Findings
| # | Severity | File:Line | Evidence | Rule | Issue | What to Check |
|---|----------|-----------|----------|------|-------|---------------|
| 1 | CRITICAL | src/Page.tsx:14 | VERIFIED (diff +14, rule: async-parallel.md) | async-parallel | Sequential awaits for independent fetches | Wrap in Promise.all |
### Verdict
BLOCK | WARN | PASS
### Top Finding
<the single most important finding, or "None">
VERDICT RULES:
- BLOCK = VERIFIED CRITICAL rule violation (waterfall, bundle bloat introduced)
- WARN = VERIFIED HIGH/MEDIUM, or CRITICAL [ASSUMPTION]
- PASS = no findings
Step 4: Collect Reports
Wait for all agents. Collect all reports. Count totals by severity and evidence type.
Step 5: Synthesize — Main Agent Review
Read every agent report. Cross-check: if an agent cites file:line, verify that line exists
in the diff. If it doesn't match → drop the finding and note it was unverifiable.
De-duplicate: Same file:line flagged by multiple agents → merge into one finding, list all agents that caught it.
Never introduce new findings here that weren't in an agent report. Your job is to organize and verify, not add.
Output format:
# Pre-Landing Review
Branch: <branch>
Base: <base>
Files changed: <N files, +X -Y lines>
Agents run: <list>
Codebase context: <from .planning/ | mapped via /gsd-map-codebase | [ASSUMPTION — no map found]>
---
## Quality Config Summary
| Tool | Config Found | Key Rules Active |
|------|-------------|-----------------|
| ESLint | .eslintrc.js | react-hooks/exhaustive-deps, @typescript-eslint/strict |
| Prettier | .prettierrc | semi: false, printWidth: 100 |
| TypeScript | tsconfig.json | strict: true, noUncheckedIndexedAccess: false |
| CI | .github/workflows/ci.yml | lint + typecheck + test required |
---
## Agent Summary
| Agent | Model | Verdict | Verified | Assumptions |
|-------|-------|---------|----------|-------------|
| base-checklist | claude-sonnet-4-6 | BLOCK/WARN/PASS | N | N |
| typescript-react-reviewer | claude-sonnet-4-6 | BLOCK/WARN/PASS | N | N |
| frontend-patterns | claude-haiku-4-5-20251001 | BLOCK/WARN/PASS | N | N |
| jest-react-testing | claude-haiku-4-5-20251001 | BLOCK/WARN/PASS | N | N |
| vercel-perf | claude-sonnet-4-6 | BLOCK/WARN/PASS | N | N |
**Overall: BLOCK / WARN / PASS**
---
## CRITICAL — Must Address Before Merge
### 1. [CRITICAL · VERIFIED] file:line
Found by: <agent(s)>
Evidence: <config rule or diff line that proves it>
Issue: <description>
What to check: <what the developer should look at>
---
## HIGH PRIORITY
### 1. [HIGH · VERIFIED] file:line
...
---
## INFORMATIONAL
### 1. [INFO · VERIFIED] file:line
...
---
## Assumptions — Needs Human Validation
These were flagged but could not be fully verified from the diff alone.
The developer should check each one — they may be non-issues.
### 1. [ASSUMPTION] file:line (if known)
Found by: <agent>
What was assumed: <the reasoning>
What would confirm it: <specific file, line, or config to check>
---
## Scope Check
Intent: <from commit messages / TODOS>
Delivered: <what the diff shows>
Status: CLEAN / DRIFT / MISSING
Important Rules
- Read full diff before reviewing
- Spawn agents in ONE parallel message — never wait for one before spawning others
- Pass QUALITY_CONTEXT to every agent — without it, agents make worse assumptions
- Never claim a finding is real without pointing to the diff line or config that proves it
- Never claim something is safe — safety claims require the same evidence standard as findings
- Do not commit, push, or modify any files
- If codebase context is inadequate → gate on
/gsd-map-codebaseand/interrogate-mebefore proceeding; a review without context is worse than no review
Install:
npx skills add ChristopherAlphonse/calphonse-skills --skill code-review-frontend
Source: ChristopherAlphonse/calphonse-skills — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核