Terrae review
Review code changes implemented in the current session before committing
install
source · Clone the upstream repo
git clone https://github.com/alamenai/terrae
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/alamenai/terrae "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/review" ~/.claude/skills/alamenai-terrae-review && rm -rf "$T"
manifest:
.claude/skills/review/SKILL.mdsource content
Review Skill
Review the code changes implemented in the current session before committing.
Instructions
-
Gather Changes
git status git diff --statIdentify all modified and new files from the current work.
-
Read Changed Files For each modified or new file, read the full content to understand the implementation. Use
for modified files to see what changed.git diff <file> -
Analyze Changes Review the code for:
- Correctness: Logic errors, edge cases, potential bugs
- Project Conventions: Following Terrae patterns (arrow functions,
overtype
, etc.)interface - Performance: Unnecessary re-renders, memory leaks, inefficient algorithms
- Security: XSS, injection vulnerabilities, exposed secrets
- TypeScript: Proper typing, avoiding
, type safetyany - React Patterns: Proper hooks usage, effect dependencies, cleanup functions
-
Structure the Review Format your review with clear sections:
## Code Review: [Feature/Change Name] ### Overview Brief summary of what the changes do. ### Code Quality & Style - Positives - Issues found ### Potential Issues & Risks Bugs, edge cases, or concerns. ### Performance Implications Any performance considerations. ### Suggestions for Improvement Specific, actionable recommendations. ### Summary Overall assessment and next steps. -
Be Constructive
- Acknowledge good code, not just problems
- Provide specific line numbers when referencing issues
- Suggest fixes, not just problems
- Distinguish between blockers and nice-to-haves
-
Check for Common Issues
- Missing cleanup in useEffect
- Missing dependencies in hooks
- Unhandled promise rejections
- Missing error boundaries
- Hardcoded values that should be constants
- Missing TypeScript types
- Console.log statements left in code
-
Verify Against Project Rules Read the rule files in
and verify the code follows them:.claude/rules/
: Types, naming, ordering.claude/rules/typescript.md
: Formatting, arrow functions, explicit returns, early returns.claude/rules/javascript.md
: File structure, component structure, map component template.claude/rules/react/component.md
: useEffect extraction, dependencies, memoization rules.claude/rules/react/hooks.md
: Type extraction, ordering, defaults, documentation.claude/rules/react/props.md
: Component size, composition, common patterns.claude/rules/react/patterns.md
: Conditional rendering, inline functions, keys, fragments.claude/rules/react/rendering.md
: Resource cleanup, refs vs state, layer management, canvas, DOM.claude/rules/react/performance.md
: Naming, functions, comments, formatting, error handling.claude/rules/clean-code.md
: App Router folder structure, file naming.claude/rules/nextjs.md
: XSS, CSP, CORS, CSRF, secrets, rate limiting.claude/rules/security.md
Flag any violations with the specific rule and file location.
-
Verify Page Navigation If docs pages were added or modified, verify the
andprev
props innext
match the sidebar navigation order defined inDocsLayout
. Check:src/app/docs/_components/docs-sidebar.tsx- prev/next titles match the sidebar item titles exactly
- prev/next hrefs point to the correct neighboring pages
- New pages are linked from their neighbors (both prev and next sides)
- The first page has no
, the last page has noprevnext