Our review
This skill provides a comprehensive set of code review guidelines integrating practices from Google, Palantir, Conventional Comments, and React best practices, with a focus on Feature-Sliced Design and Atomic Design.
Strengths
- Standardizes code review comments with clear prefixes
- Encourages clean code practices like early return, DRY, and destructuring
- Provides consistent naming conventions
- Integrates project-specific architecture rules
Limitations
- Highly specific to React/TypeScript and FSD architecture
- May be too prescriptive for smaller teams
- Requires team buy-in to be effective
Use when establishing or enforcing a consistent code review process in a React/TypeScript frontend project using Feature-Sliced Design.
Avoid if the project uses a different architecture or language, or if the team prefers a more lightweight review process.
Security analysis
SafeThis skill is a static code review guide written in Markdown. It contains no executable instructions, shell commands, or code that could perform destructive actions, exfiltrate data, or disable safety features. The code snippets are purely illustrative and do not pose a security risk.
No concerns found
Examples
Review this pull request according to the integrated code review guidelines (Google, Palantir, Conventional Comments). Check FSD architecture, naming conventions, and code quality standards.Examine this code for early return usage, proper destructuring, no magic numbers/strings, and ensure TypeScript types are used instead of 'any'.Provide code review comments using Conventional Comments prefixes (issue, suggestion, nit, praise) for this code diff.๐ ์ค๋งํธ ๋ถ๋งํฌ ํตํฉ ์ฝ๋ ๋ฆฌ๋ทฐ ๊ฐ์ด๋๋ผ์ธ
๋ณธ ๊ฐ์ด๋๋ผ์ธ์ Google, Palantir์ ๋ฆฌ๋ทฐ ์์น, Conventional Comments์ ์ํต ๋ฐฉ์, Pagepro์ React ๋ฒ ์คํธ ํ๋ํฐ์ค, ๊ทธ๋ฆฌ๊ณ ๋ณธ ํ๋ก์ ํธ์ ๊ณ ์ ์ํคํ ์ฒ๋ฅผ ํ๋๋ก ํตํฉํ ์๋์ด ์์ง๋์ด๋ง ๊ธฐ์ค์ ๋๋ค.
๐๏ธ 1. ํ๋ก์ ํธ ์ํคํ ์ฒ ํ์ค (FSD + Pages Router)
์ฐ๋ฆฌ ํ๋ก์ ํธ๋ Feature-Sliced Design (FSD) ๊ณผ Atomic Design ํจํด์ ์๊ฒฉํ ์ค์ํฉ๋๋ค.
๐ Layer ์ง์นจ
- shared: ๊ณตํต UI(Atoms), ์ ํธ๋ฆฌํฐ, ์ ์ญ Hooks (์:
src/shared/ui/Button.tsx) - entities: ๋ฐ์ดํฐ ๋๋ฉ์ธ ํต์ฌ ์ํฐํฐ (์:
src/entities/bookmark) - features: ์ฌ์ฉ์ ์ํธ์์ฉ ๋ฐ ๋น์ฆ๋์ค ๋ก์ง ๋จ์ (์:
src/features/add-bookmark) - widgets: ์ฌ๋ฌ ๊ธฐ๋ฅ์ ์กฐํฉํ ํฐ UI ์กฐ๊ฐ (์:
src/widgets/BookmarkList) - pages: ๋ผ์ฐํ ์ ์ฉ ๋ ์ด์ด. ๋น์ฆ๋์ค ๋ก์ง์ ์ฌ๊ธฐ์ ์์ฑํ๋ฉด ์ ๋ฉ๋๋ค.
โ๏ธ Atomic Design
- Atoms: ๋ฒํผ, ์ ๋ ฅ์ฐฝ ๋ฑ ๋ ์ชผ๊ฐค ์ ์๋ ์ต์ ๋จ์
- Molecules: Atoms๊ฐ ์กฐํฉ๋ ๊ธฐ๋ฅ์ ์ปดํฌ๋ํธ (SearchBar ๋ฑ)
- Organisms: ๋๋ฉ์ธ ๋ฐ์ดํฐ์ ์ฐ๊ฒฐ๋ ๋ ๋ฆฝ์ ๊ตฌ์ฑ ์์ (BookmarkCard ๋ฑ)
๐ฌ 2. PR ์ ์ถ ์ ์ฒดํฌ (Submission Rules)
๋ฆฌ๋ทฐ์ด์ ์๊ฐ์ ์กด์คํ๊ธฐ ์ํด ์ ์ถ ์ ์๋๋ฅผ ๋ฐ๋์ ํ์ธํฉ๋๋ค.
- Lint ๋จผ์ ์คํ: ESLint, Prettier ์ค๋ฅ๋ฅผ ์ ์ถ ์ ์ง์ ํด๊ฒฐํฉ๋๋ค.
- ์
ํ ๋ฆฌ๋ทฐ: ํ๋ซํผ์์ ์ง์ diff๋ฅผ ํ์ธํ๊ณ
console.log, ์ฃผ์ ์์ฌ, ํฌ๋งท ์ด์๋ฅผ ์ ๋ฆฌํฉ๋๋ค. - PR ์ค๋ช ํฌํจ: ์ด๋ค ๋ฌธ์ ๋ฅผ ์ ํด๊ฒฐํ๋์ง ๊ฐ๋ตํ ์์ฑํฉ๋๋ค. (ํ๋ ์ค์ด๋ผ๋)
- UI ๋ณ๊ฒฝ ์ ์คํฌ๋ฆฐ์ท ์ฒจ๋ถ: ๋ฆฌ๋ทฐ์ด๊ฐ ์ง์ ์คํํ์ง ์์๋ ๋ณ๊ฒฝ ์ฌํญ์ ํ์ ํ ์ ์๊ฒ ํฉ๋๋ค.
- PR ํฌ๊ธฐ ์ ํ: ๋ณ๊ฒฝ์ด ํฌ๋ค๋ฉด ์๋ธ ๋ธ๋์น๋ก ๋๋ ์์ ๋จ์๋ก ์ ์ถํฉ๋๋ค.
๐ 3. ๋ช ๋ช ๊ท์น (Naming Conventions)
- Variables:
camelCase- Boolean์
is,has,should,can์ ๋์ฌ ์ฌ์ฉ (์:isLoggedIn,hasToken) visibleโisVisible์ฒ๋ผ HTML ์์ฑ๊ณผ ํผ๋๋์ง ์๊ฒ ํฉ๋๋ค.
- Boolean์
- Constants: ์ ์ญ ๋ถ๋ณ๊ฐ์
SCREAMING_SNAKE_CASE(์:MAX_RETRY_COUNT) - Functions:
camelCase+ ๋์ฌ ์์ (์:fetchData(),calculateTotal())- ๋ฐํ ๋ชฉ์ ์ด ๋ช
ํํ๋ฉด ์ด๋ฆ์ ๋๋ฌ๋
๋๋ค.
parseDataโparseToAPIFormat
- ๋ฐํ ๋ชฉ์ ์ด ๋ช
ํํ๋ฉด ์ด๋ฆ์ ๋๋ฌ๋
๋๋ค.
- React Components:
PascalCase(์:BookmarkCard.tsx) - Types & Interfaces:
PascalCase.I์ ๋์ฌ(IBookmark) ์ฌ์ฉ ๊ธ์ง. - Event Handlers: ๊ตฌํ๋ถ๋
handle, Prop ์ ๋ฌ ์on(์:<Button onClick={handleClick} />)
๐ป 4. ์ฝ๋ ํ์ง ์ง์นจ (Code Quality)
๊ธฐ๋ณธ ์์น
- Early Return (Guard Clause): ์ค์ฒฉ
if๋ฌธ ๋์ ์กฐ๊ฑด ๋ถ์ผ์น ์ ์ฆ์ ๋ฆฌํดํฉ๋๋ค. - No Magic Numbers/Strings: ์๋ฏธ ๋ถ๋ช ์ ๊ฐ์ ์์๋ก ์ถ์ถํฉ๋๋ค.
- Single Responsibility (SRP): ํ๋์ ํจ์/์ปดํฌ๋ํธ๋ ํ ๊ฐ์ง ์ผ๋ง ํฉ๋๋ค.
- Destructuring: Props, ๊ฐ์ฒด๋ ๊ตฌ์กฐ ๋ถํด ํ ๋น์ผ๋ก ๊ฐ๋ ์ฑ์ ๋์ ๋๋ค.
- Avoid
any: TypeScriptany์ฌ์ฉ ์ ๋ ๊ธ์ง. ์ธํฐํ์ด์ค๋ฅผ ๋ช ํํ ์ ์ํฉ๋๋ค. - No Code Repetition (DRY): ๋์ผํ๊ฑฐ๋ ์ ์ฌํ ๋ก์ง์ด ์ฌ๋ฌ ๊ณณ์ ์๋ค๋ฉด ์ถ์ถํฉ๋๋ค.
์์กด์ฑ & ์ํฌํธ
- ์ npm ํจํค์ง ์ถ๊ฐ ์ ๋ฐ๋์ ๋ฆฌ๋ทฐ: ์ ๋ง ํ์ํ์ง ๊ฒํ ํฉ๋๋ค.
- ๊ธฐ๋ฅ ์ค๋ณต ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๊ธ์ง: ์)
date-fns+moment๋์ ์ฌ์ฉ ๋ถ๊ฐ. - Tree Shaking ๊ณ ๋ ค: ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ ์ฒด๋ฅผ ์ํฌํธํ์ง ์์ต๋๋ค.
// โ ๋ฒ๋ค ์ ์ฒด ํฌํจ
import _ from "lodash";
// โ
ํ์ํ ๊ฒ๋ง
import uniq from "lodash/uniq";
๋ก์ง & ์์ ์ฑ
- ํ๋์ฝ๋ฉ ๊ธ์ง: ๊ฒฝ๋ก, ์ด๋ฆ, ๊ฐ์ ์์๋ ์ค์ ํ์ผ๋ก ๊ด๋ฆฌํฉ๋๋ค.
- ํ์ ํธํ์ฑ ์ ์ง: ๊ธฐ์กด optional props๋ฅผ required๋ก ๋ฐ๊พธ๊ฑฐ๋ ํจ์ ์๊ทธ๋์ฒ๋ฅผ ๋ณ๊ฒฝํ ๋ ๊ธฐ์กด ํธ์ถ๋ถ์ ์ํฅ์ด ์๋์ง ํ์ธํฉ๋๋ค.
- ํผ ์ ํจ์ฑ ๊ฒ์ฌ: ๋ชจ๋ ํผ ํ๋์ ์ ์ ํ validation์ด ์๋์ง ํ์ธํฉ๋๋ค.
- ์๋ฌ ํธ๋ค๋ง: API ์๋ต ์คํจ, try/catch์ catch ๋ธ๋ก์ด ์ ์ ํ ์ฒ๋ฆฌ๋๋์ง ํ์ธํฉ๋๋ค.
- ๋น๋๊ธฐ ์ต์ ํ: async ํจ์๊ฐ ์์ฐจ ์คํ์ด ๊ผญ ํ์ํ์ง, ๋ณ๋ ฌ(
Promise.all)๋ก ์ฒ๋ฆฌ ๊ฐ๋ฅํ์ง ๊ฒํ ํฉ๋๋ค.
// โ ๋ถํ์ํ ์์ฐจ ์คํ
const user = await fetchUser();
const posts = await fetchPosts();
// โ
๋ณ๋ ฌ ์ฒ๋ฆฌ
const [user, posts] = await Promise.all([fetchUser(), fetchPosts()]);
๐ฌ 5. Conventional Comments (์ํต ๋ฐฉ์)
๋ฆฌ๋ทฐ ๋๊ธ์ ์๋ ์ ๋์ฌ๋ฅผ ๋ถ์ฌ ์๋๋ฅผ ๋ช ํํ ํฉ๋๋ค.
- issue: (ํ์ ์์ ) ์ฝ๋ ์ค๋ฅ, ๋ ผ๋ฆฌ์ ๊ฒฐํจ, ๋ณด์ ๋ฌธ์
- suggestion: (๊ถ์ฅ) ์ฑ๋ฅ ๊ฐ์ , ๊ฐ๋ ์ฑ ํฅ์ ์ ์
- nit: (์ ํ) ์ฌ์ํ ๊ฐ์ ์ฌํญ (์คํ, ๋ค์ด๋ฐ ์คํ์ผ ๋ฑ)
- praise: (์นญ์ฐฌ) ์ ์์ฑ๋ ์ฝ๋๋ ์ค๊ณ์ ๋ํ ๊ธ์ ์ ํผ๋๋ฐฑ
๋ฆฌ๋ทฐ ์ํต ์์น
- ์ ๋ฐ๊ฟ์ผ ํ๋์ง ์ค๋ช ํฉ๋๋ค: "A๋ฅผ B๋ก ๋ฐ๊พธ์ธ์"๊ฐ ์๋๋ผ ์ด์ ๋ฅผ ํจ๊ป ์ ์ต๋๋ค.
- ์๋ ๋ถ๋ถ์ ์นญ์ฐฌํฉ๋๋ค: ํ ๋ถ์๊ธฐ์ ๋๊ธฐ ๋ถ์ฌ์ ์ง์ ์ํฅ์ ์ค๋๋ค.
- ์คํ์ผ ์ด์๋ ๋ฐ๋ณตํ์ง ์์ต๋๋ค: ๊ฐ์ ์คํ์ผ ๋ฌธ์ ๊ฐ ์ฌ๋ฌ ๊ณณ์ ์๋ค๋ฉด, ํ ๋ฒ๋ง ์ธ๊ธํ๊ณ ์ ์ฒด ํด๊ฒฐ์ ์์ฒญํฉ๋๋ค.
- ์ฝ๋๋ฅผ ์ดํด ๋ชป ํ๋ค๋ฉด ์ง๋ฌธํฉ๋๋ค: ๋นํ์ด ์๋ ํธ๊ธฐ์ฌ์ผ๋ก ์ ๊ทผํ๋ ๊ฒ์ด ์ข์ ๋ฆฌ๋ทฐ์ ํต์ฌ์ ๋๋ค.
๐ 6. ๊ธ๋ก๋ฒ ๊ธฐ์ ๋ฆฌ๋ทฐ ์ฒ ํ (Google & Palantir)
- ์ฝ๋ ํ์ง์ด ์ฐ์ (Google): ์ ์ฒด์ ์ธ ์ฝ๋๋ฒ ์ด์ค ํ์ง์ด ๊พธ์คํ ๋์์ง๋ ์์ค์ด๋ผ๋ฉด ์น์ธํฉ๋๋ค.
- ๋จ์ํจ์ด ์ต๊ณ (Palantir): ์ฝ๋ ์ฌ๋์ด ๋ฐ๋ก ์ดํดํ ์ ์์ ๋งํผ ๋ช ํํ๊ณ ๋จ์ํด์ผ ํฉ๋๋ค.
๐ 7. ์ฐ๋ฆฌ ํ๋ก์ ํธ ๊ณ ์ ๋น์ฆ๋์ค ๋ก์ง (Guest Tracker)
- ๋นํ์ 20๊ฐ ์ ํ: ๋ถ๋งํฌ ์ ์ฅ ์ ๋ฐ๋์ ๋นํ์ ์ฌ๋ถ์ ํ์ฌ ์ ์ฅ ๊ฐ์๋ฅผ ์ฒดํฌํ๋ ๋ก์ง์ด ํฌํจ๋์ด์ผ ํฉ๋๋ค.
- ๋ฐ์ดํฐ ์ด์ : ๋ก๊ทธ์ธ ์ ๋ก์ปฌ ๋ฐ์ดํฐ๋ฅผ ์ ์ ๊ณ์ ์ผ๋ก ์์ ํ๊ฒ ์ด์ ํ๋ ๋ก์ง์ ๊ฒ์ฆํฉ๋๋ค.
โ ๋น ๋ฅธ ๋ฆฌ๋ทฐ ์ฒดํฌ๋ฆฌ์คํธ
PR ์ ์ถ ์
- [ ] Lint ์ค๋ฅ ์์
- [ ]
console.log์ ๊ฑฐ - [ ] PR ์ค๋ช ์์ฑ
- [ ] UI ๋ณ๊ฒฝ ์ ์คํฌ๋ฆฐ์ท ์ฒจ๋ถ
์ํคํ ์ฒ
- [ ] FSD ๋ ์ด์ด ๊ท์น ์ค์ (pages์ ๋น์ฆ๋์ค ๋ก์ง ์์)
- [ ] Atomic Design ๋ถ๋ฅ ์ ์ ํจ
์ฝ๋ ํ์ง
- [ ]
anyํ์ ์์ - [ ] ํ๋์ฝ๋ฉ๋ ๊ฐ ์์
- [ ] ์ค๋ณต ๋ก์ง ์์ (DRY)
- [ ] ์ปดํฌ๋ํธ ๋จ์ผ ์ฑ ์ ์์น ์ค์
- [ ] Early Return ์ ์ฉ
์์กด์ฑ
- [ ] ์ ํจํค์ง ์ถ๊ฐ ์ด์ ๋ช ํํจ
- [ ] ๊ธฐ๋ฅ ์ค๋ณต ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์
- [ ] ์ ์ฒด ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ํฌํธ ์์
์์ ์ฑ
- [ ] ์๋ฌ ํธ๋ค๋ง ์ ์ ํจ
- [ ] ํผ ์ ํจ์ฑ ๊ฒ์ฌ ์์
- [ ] ๋น๋๊ธฐ ๋ณ๋ ฌ ์ฒ๋ฆฌ ๊ฒํ ๋จ
- [ ] ํ์ ํธํ์ฑ ๊นจ์ง์ง ์์
๋น์ฆ๋์ค ๋ก์ง
- [ ] ๋นํ์ 20๊ฐ ์ ํ ๋ก์ง ํฌํจ (ํด๋น ์)
- [ ] ๋ก๊ทธ์ธ ์ ๋ฐ์ดํฐ ์ด์ ๋ก์ง ๊ฒ์ฆ (ํด๋น ์)
- alan2207/bulletproof-react โ โ 34k github.com/alan2207/bulletproof-react React ์ํคํ ์ฒ ๋ ํผ๋ฐ์ค๋ก ์ปค๋ฎค๋ํฐ์์ ๊ฐ์ฅ ๋ง์ด ์ธ์ ๋ฐ๋ ๋ฆฌํฌ์งํ ๋ฆฌ์์. ์ง๊ธ Anso๊ฐ ๊ณต๋ถํ๋ ๊ฒ๋ค๊ณผ ๊ฑฐ์ ์ ํํ ๊ฒน์ณ์.
Feature ๊ธฐ๋ฐ ํด๋ ๊ตฌ์กฐ (FSD๋ ์ฌ์ค์ ๋์ผํ ๊ฐ๋ ) ์ปดํฌ๋ํธ ๋ถ๋ฆฌ ๊ธฐ์ค, ๋ค์ด๋ฐ, Custom Hook ์ค๊ณ ๋จ๋ฐฉํฅ ์์กด์ฑ ๊ท์น (shared โ features โ app) ESLint๋ก ๋ ์ด์ด ๊ฐ import ๋ฐฉํฅ ๊ฐ์ ํ๋ ๋ฐฉ๋ฒ๊น์ง ์ค๋ช
์ง๊ธ ๋ง๋๋ ๊ฐ์ด๋๋ผ์ธ์ ์ค์ ์ฝ๋ ๋ฒ์ ์ด๋ผ๊ณ ๋ณด๋ฉด ๋ผ์.
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.