frontend-code-review
Skill2 starsChanged 8 months agoUnlicenseView on GitHub
Analyzes git diffs of frontend code (TS, React, Vue, JS) for security flaws, XSS, secrets, state leaks, FSD violations, and anti-patterns. Use for PR reviews or local diff checks. Do not use for reviewing generated artifacts — use Auditor agent instead.
- Reads credentials
23 other projects use a version of this.
Adopted by
Most recently taken up by
- yoriiis/ai-skillstheir own version, first seen Nov 15, 2026
- lien0219/openxflowtheir own version, first seen Nov 8, 2026
- ClaireAll/skillstheir own version, first seen Nov 5, 2026
- best-fan/agent-skillstheir own version, first seen Nov 3, 2026
- langgenius/difytheir own version, first seen Oct 29, 2026
- ramybarsoum/claude-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use backend-code-review, frontend-query-mutation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jpoindexterSkillbackend-code-review
Review backend code for quality, security, maintainability, and best practices based on established checklist rules. Use when the user requests a review, analysis, or improvement of backend files (e.g., `.py`) under the `api/` directory. Do NOT use for frontend files (e.g., `.tsx`, `.ts`, `.js`). Supports pending-change review, code snippets review, and file-focused review.
Also in 5 projects that use this
lien0219Skillfrontend-query-mutation
Guide for implementing Langflow frontend query and mutation patterns with Axios and TanStack React Query v5. Trigger when creating or updating API hooks in controllers/API/queries, consuming UseRequestProcessor in components, deciding whether to use useQuery or useMutation, handling conditional queries, cache invalidation, mutation error handling, or migrating legacy API calls to the query hook pattern.
Also in 3 projects that use this
Charlie85270Skillcomponent-refactoring
Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.
Also in 4 projects that use this
mm-mazharSkillcache-components
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).
Also in 4 projects that use this
nilecuiSkillfrontend-testing
Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.
Also in 7 projects that use this
GoogleSkillpr-creator
Also in 5 projects that use this
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- langgenius/dify★ 161ksame name
- langflow-ai/langflow★ 156ksame name
- YFGaia/dify-plus★ 2.3ksame name
- Ohh-889/skyroc-admin★ 795same name
- chendongqi/OPB-Skills★ 125same name
- alphaparkinc/openclaw-skills★ 9same name
- Alpha-Park/openclaw-skills★ 8same name
- lien0219/openxflow★ 8same name
- immacualate/claude-forge★ 5same name
- yoriiis/ai-skills★ 5same name
13 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/00-project-context.mdcCursor rule
- .cursor/rules/01b-component-gen-next.mdcCursor rule
- .cursor/rules/01-component-gen.mdcCursor rule
- .cursor/rules/02-component-tests.mdcCursor rule
- .cursor/rules/03b-vue-doctor.mdcCursor rule
- .cursor/rules/03-react-doctor.mdcCursor rule
- .cursor/rules/04-ui-tweak.mdcCursor rule
- .cursor/rules/05-refactor.mdcCursor rule
- .cursor/rules/06-frontend-code-review.mdcCursor rule
- .cursor/rules/07-fe-repo-scout.mdcCursor rule
- .cursor/rules/08-be-repo-scout.mdcCursor rule
- .cursor/rules/09-web-vitals.mdcCursor rule
- .cursor/rules/10-browser-check.mdcCursor rule
- .cursor/rules/11-api-bind.mdcCursor rule
- .cursor/rules/12-e2e-tests.mdcCursor rule
- .cursor/rules/13-api-mocks.mdcCursor rule
- agents-checkerSkill
- api-bindSkill
- api-mocksSkill
- be-repo-scoutSkill
- browser-checkSkill
- component-gen-nextSkill
- component-genSkill
- component-testsSkill
- curate-lessonsSkill
- e2e-testsSkill
- fe-repo-scoutSkill
- fix-markdownSkill
- frontend-code-reviewSkill
- init-agentSkill
- init-projectSkill
- init-skillSkill
- prSkill
- react-doctorSkill
- refactorSkill
- setup-configsSkill
- skill-auditSkill
- spec-auditSkill
- ui-tweakSkill
- update-ai-setupSkill
- vue-doctorSkill
- web-vitalsSkill
- agents-checkerSkill
- api-bindSkill
- api-mocksSkill
- be-repo-scoutSkill
- browser-checkSkill
- component-gen-nextSkill
- component-genSkill
- component-testsSkill
- curate-lessonsSkill
- e2e-testsSkill
- fe-repo-scoutSkill
- fix-markdownSkill
- init-agentSkill
- init-projectSkill
- init-skillSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 8 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Before execution the agent MUST load: .claude/protocols/gardener.md
- Very specific: line 16
CI Mode prerequisite: If running in CI, GITHUB_TOKEN must be exported with pull-requests: write permissions.
- Distinctive: line 29
Do NOT output per-phase progress to chat.
- Distinctive: line 30
Do NOT print intermediate grep results or file lists to chat.
- Very specific: line 82
If diff is empty after filtering → output ⚠️ No frontend files in diff and STOP.
- Very specific: line 107
If unclear — read package.json for react or vue dependency.
- Distinctive: line 111
Read CLAUDE.md for project-specific conventions and banned patterns.
- Distinctive: line 119
If diff exceeds 2000 added lines → review only CRITICAL and HIGH categories (Phases 2 and 3).
- Distinctive: line 134
Scope rule: Only flag patterns in changed lines.
- Very specific: line 138
Run only if package.json or config files are in the diff:
- Distinctive: line 147
If React detected in Phase 1.3:
- Very specific: line 153
If React Doctor unavailable → skip with note React Doctor not available — skipping Phase 2b
- Distinctive: line 183
Verify presence of all 4 states:
- Very specific: line 224
When running in CI (environment variable CI=true or GITHUB_ACTIONS=true):
- Distinctive: line 250
Before marking SKILL COMPLETE, verify ALL of the following:
- Very specific: line 262
Call .claude/protocols/gardener.md before SKILL COMPLETE.
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SYSTEM REQUIREMENTS
Before execution the agent MUST load: .claude/protocols/gardener.md
CI Mode prerequisite: If running in CI, GITHUB_TOKEN must be exported with pull-requests: write permissions.
/frontend-code-review — Frontend Code Review
<purpose>
Reviews git diffs for security vulnerabilities, architecture violations, anti-patterns,
and performance regressions. Outputs a structured report (local) or inline PR comments (CI).
</purpose>Verbosity Protocol (SILENT MODE)
- Do NOT output per-phase progress to chat.
- Do NOT print intermediate grep results or file lists to chat.
- Output to chat ONLY: blocker messages and the final SKILL COMPLETE block.
When to Use
- Review a PR before merge
- Review local staged/unstaged changes before committing
- CI-triggered review on pull request events
When NOT to Use
- Reviewing artifacts generated by
/component-genor/api-bind— use Auditor agent - Full repository analysis — use
/fe-repo-scout - Specification review — use
/spec-audit
Input
Usage: /frontend-code-review [target]
Targets:
<pr-number> Review a GitHub PR (e.g., 42)
<branch> Review diff of branch against main
--staged Review staged changes only
(no argument) Review diff of current branch against mainProtocol (BANNED)
- BANNED: commenting on code formatting or style (linter handles this)
- BANNED: suggesting full rewrites of unchanged code
- BANNED: hallucinating code that does not exist in the diff
- BANNED: flagging issues already covered by Biome/ESLint rules
- BANNED: reviewing non-frontend files (Go, Python, SQL, Dockerfile) unless they contain secrets
- BANNED: outputting intermediate grep/diff results to chat
Phase 1 — Context Discovery
1.1 Obtain Diff
# PR mode
git diff origin/main...HEAD -- '*.ts' '*.tsx' '*.vue' '*.js' '*.jsx' '*.css' '*.json'
# --staged mode
git diff --staged -- '*.ts' '*.tsx' '*.vue' '*.js' '*.jsx' '*.css' '*.json'
# PR number mode (gh pr diff does not support -- path filters;
# pipe output through grep or parse changed filenames to filter to frontend extensions)
gh pr diff <number>If diff is empty after filtering → output ⚠️ No frontend files in diff and STOP.
1.2 Classify Changed Files
Group files by FSD layer (if applicable):
| Layer | Pattern |
| app | src/app/** |
| pages | src/pages/** |
| widgets | src/widgets/** |
| features | src/features/** |
| entities | src/entities/** |
| shared | src/shared/** |
| config | *.config.*, tsconfig*, biome.json, package.json |
| other | everything else |
1.3 Detect Framework
Scan diff file extensions:
.tsx/.jsx→ React.vue→ Vue- Mixed → both (run framework-specific checks for each)
If unclear — read package.json for react or vue dependency.
1.4 Read Project Context
Read CLAUDE.md for project-specific conventions and banned patterns.
1.5 Diff Size Guard
git diff origin/main...HEAD --stat | tail -1If diff exceeds 2000 added lines → review only CRITICAL and HIGH categories (Phases 2 and 3). Skip Phase 4. Note truncation in report.
Phase 2 — Security Scan
Reference:
references/security-checklist.md
Scan added lines only (+ lines in diff) for each category in the security checklist.
For each finding, record:
- File path and line number
- Pattern matched
- Severity (CRITICAL / HIGH / MEDIUM)
- Recommendation
Scope rule: Only flag patterns in changed lines. Do not scan unchanged context lines.
Config & Dependency Review (conditional)
Run only if package.json or config files are in the diff:
- New dependencies: check for known vulnerable or deprecated packages
- Removed security headers or CSP rules
- Changed API base URLs or CORS configuration
- TypeScript
strictmode disabled or loosened
Phase 2b — React Doctor Scan [React only]
If React detected in Phase 1.3:
- Run
npx react-doctor@latest . --diff origin/main --score 2>&1 - Map findings: error → HIGH, warning → MEDIUM
- Deduplicate with Phase 3 anti-pattern results (skip findings already covered)
- Include health score in report header
- If React Doctor unavailable → skip with note
React Doctor not available — skipping Phase 2b
Reference:
.claude/skills/react-doctor/references/antipattern-map.mdfor rule→anti-pattern mapping.
Phase 3 — Architecture & Anti-patterns
3.1 FSD Import Violations
For each changed file, verify import paths respect FSD layer hierarchy:
shared → entities → features → widgets → pages → app
(lower) (higher)
VIOLATION: importing from a higher or same layerFor each changed file classified in Phase 1.2, use the Grep tool to search for imports from higher or same-level layers. Example: for files in src/entities/, search for from.*features/, from.*widgets/, from.*pages/.
3.2 Anti-pattern Scan
Lazy Load Protocol: Read
.claude/fe-antipatterns/_index.mdfor grep signatures. Read individual pattern files ONLY when a violation is found in the diff.
Load references/antipattern-scan.md for pattern tables with grep signatures (Common, React-gated, Vue-gated).
3.3 Async State Completeness
For each new or modified component that uses data fetching (useQuery, useSWR, useMutation, fetch, axios):
Verify presence of all 4 states:
- Loading state (
isLoading,isPending, skeleton, spinner) - Error state (
isError,error, error boundary) - Empty state (empty array/null check)
- Success state (data rendering)
Missing states → HIGH finding.
Phase 4 — Performance & A11y Spot-Check
Performance
| Check | What to look for | Severity |
| Heavy imports | import moment|import lodash (non-tree-shakeable) | MEDIUM |
| Unmemoized computation | .filter(|.reduce(|.sort( in render without useMemo|computed | MEDIUM |
| Large JSON import | import.*from.*\.json (bundled data) | MEDIUM |
| Missing cleanup | setInterval|addEventListener without cleanup in return | HIGH |
| CLS risk | Images without explicit width/height or fill | MEDIUM |
A11y Spot-Check
| Check | What to look for | Severity |
| div-as-button | onClick|@click on div|span without role="button" | HIGH |
| Missing alt | <img without alt= | HIGH |
| Missing aria-label | Icon-only buttons without aria-label | HIGH |
| Missing form labels | <input without associated <label> or aria-label | MEDIUM |
| Autofocus abuse | autoFocus on non-modal elements | MEDIUM |
Phase 5 — Report Generation
Local Mode (default)
Generate report using template: references/review-report-template.md
Save to: audit/frontend-code-review_{YYYYMMDD_HHMMSS}.md
CI Mode (GitHub Actions)
When running in CI (environment variable CI=true or GITHUB_ACTIONS=true):
- Post inline PR comments for CRITICAL and HIGH findings:
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
--method POST \
-f body="..." \
-f commit_id="..." \
-f path="..." \
-F line=<number> \
-f side="RIGHT"- Post summary comment on PR with finding counts and top issues.
Severity Classification
| Level | Criteria | Action |
| CRITICAL | Security vulnerability, secret exposure | Must fix before merge |
| HIGH | Architecture violation, missing error handling, a11y blocker | Should fix before merge |
| MEDIUM | Performance concern, minor anti-pattern, code smell | Consider fixing |
Quality Gate
Before marking SKILL COMPLETE, verify ALL of the following:
- Diff obtained and filtered to frontend files only
- Framework detected (not guessed)
- Security scan completed against
references/security-checklist.md - FSD import violations checked (if FSD structure detected)
- Anti-pattern scan used correct framework gate (React/Vue/both)
- No intermediate output printed to chat (SILENT MODE enforced)
- Report written to
audit/(local) or PR comments posted (CI)
Gardener Protocol
Call .claude/protocols/gardener.md before SKILL COMPLETE.
Markdown skills (append to artifact): frontend-code-review
Completion Contract
SKILL COMPLETE: /frontend-code-review
- Report: audit/frontend-code-review_{YYYYMMDD_HHMMSS}.md
- Framework: [detected]
- Diff: [N files changed, +X/-Y lines]
- Findings: [N critical / N high / N medium]
- Top issues: [list]SKILL PARTIAL: /frontend-code-review
- Framework: [detected]
- Artifacts: [list]
- Coverage: [phases completed / total]
- Blockers: [description]Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

