/ai-toolkit:spartan:spartan:fe-review [optional: PR title or focus area]from ai-toolkit
Reviews frontend PR changes against configurable rules (defaults React/Next.js) — checks App Router conventions, TypeScript strictness, and performance best practices.
Ships in ai-toolkit. Installing the plugin adds it to Claude Code.
Performing a thorough review of frontend changes.
# Check for project config
cat .spartan/config.yaml 2>/dev/null
# Get changed frontend files
git diff main...HEAD --name-only | grep -E '\.(tsx?|jsx?|vue|svelte|css)$'
If .spartan/config.yaml exists:
rules.frontend + rules.shared — check against these rulesreview-stages — only run enabled stagesconditional-rules is set, match rules to changed filesIf no config: Use the default React/Next.js checklist below + scan for rules/frontend-react/ or ~/.claude/rules/frontend-react/.
Read all matched rule files before reviewing code.
Run git diff main...HEAD and analyze all modified frontend files.
'use client' when strictly needed (event handlers, browser APIs, stateful UI)'use client' just to use async/await (Server Components handle async natively)useEffect'use server'), not client-side fetch to API routesrevalidatePath or revalidateTag called after mutations (not manual router.refresh())(group)/ used to avoid URL pollution when grouping by auth/layout{ params: { id: string } }loading.tsx and error.tsx present for routes with async data# Check for anti-patterns
git diff main...HEAD -- "*.tsx" "*.ts" | grep "'use client'" | wc -l # count client components
git diff main...HEAD -- "*.tsx" | grep "useEffect.*fetch\|axios\|fetch(" # data fetching in effects
any types — use unknown + type guard if uncertain! non-null assertions without comment explaining why it's safe# Check for type escape hatches
git diff main...HEAD -- "*.tsx" "*.ts" | grep ": any\|as any\|@ts-ignore\|@ts-expect"
next/image (not <img>)next/link (not <a href>)dynamic() if not needed on initial paint'use client' that pushes rendering to browserfetch calls in Server Components use next: { revalidate } or next: { tags } appropriatelyuseFeature.ts)key prop on list items uses stable ID, not array indexComponent.test.tsx)@testing-library/react — no shallow renderingquerySelector in tests — use accessible queries (getByRole, getByLabelText)# Find components without tests
git diff main...HEAD --name-only | grep "\.tsx$" | while read f; do
testfile="${f%.tsx}.test.tsx"
[[ ! -f "$testfile" ]] && echo "⚠️ Missing test: $testfile"
done
<button>, not <div onClick>)<label> (htmlFor + id, or aria-label)alt text (empty alt="" for decorative)_types/ match Kotlin DTOs exactlyprocess.env.NEXT_PUBLIC_API_URL), never hardcodedOnly runs if .planning/design/system/tokens.md or .planning/design-config.md exists.
Read the design tokens file first. Then check every changed frontend file:
bg-blue-*, bg-purple-*, text-gray-*font-sans, Inter, Roboto, Arial, system-uip-[13px] or mt-[7px] → flag as warning# Quick scan for hardcoded colors (should be tokens)
git diff main...HEAD -- "*.tsx" "*.ts" "*.css" | grep -E '#[0-9a-fA-F]{3,8}|bg-(blue|red|green|purple|pink|indigo|violet)-[0-9]' | head -20
# Quick scan for generic fonts
git diff main...HEAD -- "*.tsx" "*.ts" "*.css" | grep -E "font-sans|Inter|Roboto|Arial|system-ui" | head -10
## Frontend PR Review: [title]
### Approved / Needs Changes / Blocked
### Critical Issues (must fix before merge)
- [issue with file:line reference and suggested fix]
### Suggestions (improve code quality)
- [suggestion]
### Performance Notes
- [any perf observations]
### Accessibility Notes
- [any a11y issues]
### Praise
- [what was done well — be specific]
### Verdict
[recommendation + any conditions]
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub c0x12c/ai-toolkit --plugin ai-toolkit71 commands in this plugin
/spartanSmart entry point for the Spartan AI Toolkit. Detects project context, routes to the right workflow or command. Use this when you're not sure where to start./spartan:spartan:brainstormspartan:brainstormStructured brainstorming — generate ideas, filter fast, rank the top 3/spartan:spartan:brownfieldspartan:brownfieldAnalyze an existing codebase and generate a structured context map + onboarding spec before making any changes. Use when joining a legacy project or unfamiliar service./spartan:spartan:buildspartan:buildBuild a new feature end-to-end — backend, frontend, or full-stack with auto-detection/spartan:spartan:carefulspartan:carefulActivate destructive operation warnings. Claude will detect and require explicit confirmation before running dangerous commands like rm -rf, DROP TABLE, force-push, git reset --hard, overwriting migrations, or deleting production resources./spartan:spartan:codexspartan:codexRun Codex CLI as a second-opinion reviewer. Subcommands mirror Spartan workflow — review, pr, ship (multi-round), security, uncommitted, commit, setup, yolo. Use when you want a different model to review Claude's output before requesting human review.Other plugins' commands for the same job