# Code Review

> 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.

- Skill: `tomevault-io/code-review-257` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/code-review-257`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/code-review-257/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/code-review-257

---


# 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:

1.  **Executive Summary:** A 2-3 sentence high-level assessment of the code's quality and readiness.
2.  **Critical Issues (If any):** Bugs, security risks, or major architectural violations that *must* be fixed.
3.  **Code Improvements:**
    *   **Refactor Suggestion:** [File Name]: [Brief description] -> *Provide a before/after code snippet.*
    *   **Type Safety:** [Specific Area]: [Suggestion].
4.  **Nitpicks & Polish:** Minor styling adjustments, variable naming, or comments.
5.  **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](https://github.com/randall-liao/cloud-resume-v2) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-16 -->

