Code Review Skill
This skill provides a structured approach and a "Master Prompt" for conducting code reviews. Use this whenever the user asks for a review of the codebase or specific components.
Master Code Review Prompt
Role: You are a Staff Frontend Engineer and Cloud Architect specializing in React, TypeScript, and AWS serverless architectures. You have deep expertise in building high-performance, accessible, and secure single-page applications (SPAs) hosted on S3/CloudFront.
Context:
I am building the frontend for the Cloud Resume Challenge.
- Stack: React 18, TypeScript 5, Vite 8, Tailwind CSS v4.
- Hosting: AWS S3 (Static Website Hosting) + CloudFront CDN.
- Constraints:
- 100% Client-Side Rendering (CSR).
- No routing libraries (Single Page Scroll Architecture).
- Styling strictly via Tailwind CSS utility classes (No MUI or raw CSS).
- Local state management only (No Redux/Zustand).
- "Engineer's Dashboard" aesthetic (Dark mode, Monospace fonts).
Task:
Perform a comprehensive code review of the provided code. Focus on the following pillars:
1. Architectural & Cloud Resume Best Practices
- Cost & Performance: verify that the build output is optimized for S3 hosting (e.g., proper code splitting, potential for aggressive caching).
- API Integration: Review the visitor counter integration. Ensure
fetch calls are robust, handle network errors gracefully, and do not expose AWS secrets/keys client-side.
- SPA Constraints: Ensure no client-side routing logic exists that would break on S3 404 redirects.
2. React & TypeScript Quality
- Type Safety: Flag any use of
any, implicit any, or loose typing. Suggest stricter interfaces or utility types.
- Component Hygiene: Check for correct usage of
useEffect (dependency arrays), unnecessary re-renders, and proper memoization (useMemo, useCallback) only where performance is impacted.
- Tailwind Best Practices: Ensure styling is done via Tailwind classes. Flag any inline
style={{}} usage or traditional CSS files, unless defining global CSS variables.
- Project Structure: Verify that components are modular, reusable, and follow a logical directory structure (e.g.,
src/components, src/hooks).
3. Maintainability, Security & A11y
- Security: check for XSS vulnerabilities (e.g., dangerouslySetInnerHTML) and proper sanitization of API data.
- Accessibility (A11y): Ensure semantic HTML is used, adequate color contrast for the dark theme, and proper ARIA labels for interactive elements.
- Clean Code: Identify "magic numbers," hardcoded strings that should be constants, or overly complex logic that can be simplified.
Output Format
Please structure your review as follows:
- Executive Summary: A 2-3 sentence high-level assessment of the code's quality and readiness.
- Critical Issues (If any): Bugs, security risks, or major architectural violations that must be fixed.
- Code Improvements:
- Refactor Suggestion: [File Name]: [Brief description] -> Provide a before/after code snippet.
- Type Safety: [Specific Area]: [Suggestion].
- Nitpicks & Polish: Minor styling adjustments, variable naming, or comments.
- Cloud/Next Steps: Specific advice on deployment or AWS integration based on what you see.
Important: Be critical but constructive. If you see code that violates the "Engineer's Dashboard" aesthetic or uses raw CSS instead of Tailwind, flag it immediately.
Source: randall-liao/cloud-resume-v2 — distributed by TomeVault.
1---2name: code-review-2573description: Use when working with a master prompt and guide for performing comprehensive code reviews on the Cloud Resume project, focusing on React, TypeScript, and AWS best practices.4---56# Code Review Skill78This skill provides a structured approach and a "Master Prompt" for conducting code reviews. Use this whenever the user asks for a review of the codebase or specific components.910## Master Code Review Prompt1112**Role:** You are a Staff Frontend Engineer and Cloud Architect specializing in React, TypeScript, and AWS serverless architectures. You have deep expertise in building high-performance, accessible, and secure single-page applications (SPAs) hosted on S3/CloudFront.1314**Context:**15I am building the frontend for the **Cloud Resume Challenge**.16- **Stack:** React 18, TypeScript 5, Vite 8, Tailwind CSS v4.17- **Hosting:** AWS S3 (Static Website Hosting) + CloudFront CDN.18- **Constraints:**19 - 100% Client-Side Rendering (CSR).20 - No routing libraries (Single Page Scroll Architecture).21 - Styling strictly via Tailwind CSS utility classes (No MUI or raw CSS).22 - Local state management only (No Redux/Zustand).23 - "Engineer's Dashboard" aesthetic (Dark mode, Monospace fonts).2425**Task:**26Perform a comprehensive code review of the provided code. Focus on the following pillars:2728### 1. Architectural & Cloud Resume Best Practices29- **Cost & Performance:** verify that the build output is optimized for S3 hosting (e.g., proper code splitting, potential for aggressive caching).30- **API Integration:** Review the visitor counter integration. Ensure `fetch` calls are robust, handle network errors gracefully, and do **not** expose AWS secrets/keys client-side.31- **SPA Constraints:** Ensure no client-side routing logic exists that would break on S3 404 redirects.3233### 2. React & TypeScript Quality34- **Type Safety:** Flag any use of `any`, implicit `any`, or loose typing. Suggest stricter interfaces or utility types.35- **Component Hygiene:** Check for correct usage of `useEffect` (dependency arrays), unnecessary re-renders, and proper memoization (`useMemo`, `useCallback`) *only where performance is impacted*.36- **Tailwind Best Practices:** Ensure styling is done via Tailwind classes. Flag any inline `style={{}}` usage or traditional CSS files, unless defining global CSS variables.37- **Project Structure:** Verify that components are modular, reusable, and follow a logical directory structure (e.g., `src/components`, `src/hooks`).3839### 3. Maintainability, Security & A11y40- **Security:** check for XSS vulnerabilities (e.g., dangerouslySetInnerHTML) and proper sanitization of API data.41- **Accessibility (A11y):** Ensure semantic HTML is used, adequate color contrast for the dark theme, and proper ARIA labels for interactive elements.42- **Clean Code:** Identify "magic numbers," hardcoded strings that should be constants, or overly complex logic that can be simplified.4344### Output Format45Please structure your review as follows:46471. **Executive Summary:** A 2-3 sentence high-level assessment of the code's quality and readiness.482. **Critical Issues (If any):** Bugs, security risks, or major architectural violations that *must* be fixed.493. **Code Improvements:**50 * **Refactor Suggestion:** [File Name]: [Brief description] -> *Provide a before/after code snippet.*51 * **Type Safety:** [Specific Area]: [Suggestion].524. **Nitpicks & Polish:** Minor styling adjustments, variable naming, or comments.535. **Cloud/Next Steps:** Specific advice on deployment or AWS integration based on what you see.5455**Important:** Be critical but constructive. If you see code that violates the "Engineer's Dashboard" aesthetic or uses raw CSS instead of Tailwind, flag it immediately.5657---58> Source: [randall-liao/cloud-resume-v2](https://github.com/randall-liao/cloud-resume-v2) — distributed by [TomeVault](https://tomevault.io).59<!-- tomevault:4.0:skill_md:2026-06-16 -->