@kood/claude-code 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +297 -0
- package/package.json +47 -0
- package/templates/hono/CLAUDE.md +376 -0
- package/templates/hono/docs/deployment/cloudflare.md +328 -0
- package/templates/hono/docs/deployment/index.md +291 -0
- package/templates/hono/docs/git/index.md +180 -0
- package/templates/hono/docs/library/hono/error-handling.md +400 -0
- package/templates/hono/docs/library/hono/index.md +241 -0
- package/templates/hono/docs/library/hono/middleware.md +334 -0
- package/templates/hono/docs/library/hono/rpc.md +454 -0
- package/templates/hono/docs/library/hono/validation.md +328 -0
- package/templates/hono/docs/library/prisma/index.md +427 -0
- package/templates/hono/docs/library/zod/index.md +413 -0
- package/templates/hono/docs/mcp/context7.md +106 -0
- package/templates/hono/docs/mcp/index.md +94 -0
- package/templates/hono/docs/mcp/sequential-thinking.md +101 -0
- package/templates/hono/docs/mcp/sgrep.md +105 -0
- package/templates/hono/docs/skills/gemini-review/SKILL.md +220 -0
- package/templates/hono/docs/skills/gemini-review/references/checklists.md +136 -0
- package/templates/hono/docs/skills/gemini-review/references/prompt-templates.md +303 -0
- package/templates/tanstack-start/CLAUDE.md +279 -0
- package/templates/tanstack-start/docs/architecture/architecture.md +547 -0
- package/templates/tanstack-start/docs/deployment/cloudflare.md +346 -0
- package/templates/tanstack-start/docs/deployment/index.md +102 -0
- package/templates/tanstack-start/docs/deployment/nitro.md +211 -0
- package/templates/tanstack-start/docs/deployment/railway.md +364 -0
- package/templates/tanstack-start/docs/deployment/vercel.md +287 -0
- package/templates/tanstack-start/docs/design/accessibility.md +433 -0
- package/templates/tanstack-start/docs/design/color.md +235 -0
- package/templates/tanstack-start/docs/design/components.md +409 -0
- package/templates/tanstack-start/docs/design/index.md +107 -0
- package/templates/tanstack-start/docs/design/safe-area.md +317 -0
- package/templates/tanstack-start/docs/design/spacing.md +341 -0
- package/templates/tanstack-start/docs/design/tailwind-setup.md +470 -0
- package/templates/tanstack-start/docs/design/typography.md +324 -0
- package/templates/tanstack-start/docs/git/index.md +203 -0
- package/templates/tanstack-start/docs/guides/best-practices.md +753 -0
- package/templates/tanstack-start/docs/guides/getting-started.md +304 -0
- package/templates/tanstack-start/docs/guides/husky-lint-staged.md +303 -0
- package/templates/tanstack-start/docs/guides/prettier.md +189 -0
- package/templates/tanstack-start/docs/guides/project-templates.md +710 -0
- package/templates/tanstack-start/docs/library/better-auth/2fa.md +136 -0
- package/templates/tanstack-start/docs/library/better-auth/advanced.md +138 -0
- package/templates/tanstack-start/docs/library/better-auth/index.md +83 -0
- package/templates/tanstack-start/docs/library/better-auth/plugins.md +111 -0
- package/templates/tanstack-start/docs/library/better-auth/session.md +127 -0
- package/templates/tanstack-start/docs/library/better-auth/setup.md +123 -0
- package/templates/tanstack-start/docs/library/prisma/crud.md +218 -0
- package/templates/tanstack-start/docs/library/prisma/index.md +165 -0
- package/templates/tanstack-start/docs/library/prisma/relations.md +191 -0
- package/templates/tanstack-start/docs/library/prisma/schema.md +177 -0
- package/templates/tanstack-start/docs/library/prisma/setup.md +156 -0
- package/templates/tanstack-start/docs/library/prisma/transactions.md +140 -0
- package/templates/tanstack-start/docs/library/tanstack-query/index.md +146 -0
- package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +146 -0
- package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +196 -0
- package/templates/tanstack-start/docs/library/tanstack-query/setup.md +110 -0
- package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +170 -0
- package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +173 -0
- package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +171 -0
- package/templates/tanstack-start/docs/library/tanstack-start/index.md +114 -0
- package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +142 -0
- package/templates/tanstack-start/docs/library/tanstack-start/routing.md +163 -0
- package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +128 -0
- package/templates/tanstack-start/docs/library/tanstack-start/setup.md +85 -0
- package/templates/tanstack-start/docs/library/zod/basic-types.md +186 -0
- package/templates/tanstack-start/docs/library/zod/complex-types.md +204 -0
- package/templates/tanstack-start/docs/library/zod/index.md +186 -0
- package/templates/tanstack-start/docs/library/zod/transforms.md +174 -0
- package/templates/tanstack-start/docs/library/zod/validation.md +208 -0
- package/templates/tanstack-start/docs/mcp/context7.md +204 -0
- package/templates/tanstack-start/docs/mcp/index.md +116 -0
- package/templates/tanstack-start/docs/mcp/sequential-thinking.md +180 -0
- package/templates/tanstack-start/docs/mcp/sgrep.md +174 -0
- package/templates/tanstack-start/docs/skills/gemini-review/SKILL.md +220 -0
- package/templates/tanstack-start/docs/skills/gemini-review/references/checklists.md +150 -0
- package/templates/tanstack-start/docs/skills/gemini-review/references/prompt-templates.md +293 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# sgrep - 의미론적 코드 검색
|
|
2
|
+
|
|
3
|
+
> 자연어로 코드베이스를 검색하는 로컬 시맨틱 검색 엔진
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚨 필수 사용 규칙
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
✅ 코드베이스 검색 시 기본 grep 대신 sgrep 사용
|
|
11
|
+
✅ 자연어 쿼리로 코드 위치 파악
|
|
12
|
+
✅ JSON 출력으로 결과 파싱
|
|
13
|
+
❌ grep, rg 등 기존 검색 도구 사용 금지
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🚀 Quick Reference
|
|
19
|
+
|
|
20
|
+
### 기본 검색
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# 자연어로 코드 검색
|
|
24
|
+
sgrep search "where do we handle authentication?"
|
|
25
|
+
|
|
26
|
+
# 결과 수 제한
|
|
27
|
+
sgrep search "user validation logic" -n 5
|
|
28
|
+
|
|
29
|
+
# JSON 형식 출력
|
|
30
|
+
sgrep search "database connection setup" --json
|
|
31
|
+
|
|
32
|
+
# 전체 코드 청크 포함
|
|
33
|
+
sgrep search "error handling patterns" -c
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 인덱싱
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# 인덱스 강제 재구성
|
|
40
|
+
sgrep index --force
|
|
41
|
+
|
|
42
|
+
# 파일시스템 감시 (실시간 업데이트)
|
|
43
|
+
sgrep watch . --debounce-ms 200
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 설정
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 기본 설정 초기화
|
|
50
|
+
sgrep config --init
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 주요 기능
|
|
56
|
+
|
|
57
|
+
### 벡터 + 그래프 검색
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
장점:
|
|
61
|
+
- 밀집 벡터 임베딩으로 의미 기반 검색
|
|
62
|
+
- 구조적 코드 그래프 분석
|
|
63
|
+
- 자연어 쿼리 지원
|
|
64
|
+
- 정확한 코드 위치 파악
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 로컬 처리
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
특징:
|
|
71
|
+
- 모든 처리가 로컬에서 수행
|
|
72
|
+
- 프라이버시 보장
|
|
73
|
+
- 외부 API 호출 없음
|
|
74
|
+
- 오프라인 사용 가능
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 에이전트 친화적
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
통합:
|
|
81
|
+
- 안정적인 CLI 인터페이스
|
|
82
|
+
- JSON 출력 지원
|
|
83
|
+
- Claude Code 플러그인 호환
|
|
84
|
+
- 자동화 스크립트 연동
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 사용 예시
|
|
90
|
+
|
|
91
|
+
### 예시 1: 인증 로직 찾기
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
sgrep search "authentication middleware implementation"
|
|
95
|
+
|
|
96
|
+
# 결과:
|
|
97
|
+
# src/middleware/auth.ts:15 - authMiddleware function
|
|
98
|
+
# src/functions/auth.ts:8 - session validation
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 예시 2: 에러 핸들링 패턴
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
sgrep search "how are API errors handled" --json
|
|
105
|
+
|
|
106
|
+
# JSON 결과로 파싱하여 분석
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 예시 3: 데이터베이스 쿼리
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
sgrep search "user data fetching with prisma" -c
|
|
113
|
+
|
|
114
|
+
# 전체 코드 블록 포함하여 컨텍스트 파악
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 옵션 요약
|
|
120
|
+
|
|
121
|
+
| 옵션 | 설명 | 기본값 |
|
|
122
|
+
|------|------|--------|
|
|
123
|
+
| `-n, --limit` | 반환 결과 수 | 10 |
|
|
124
|
+
| `-c, --context` | 전체 청크 내용 포함 | false |
|
|
125
|
+
| `--json` | JSON 형식 출력 | false |
|
|
126
|
+
| `--force` | 인덱스 강제 재구성 | false |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Sequential Thinking과 함께 사용
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
복잡한 코드 분석 시:
|
|
134
|
+
|
|
135
|
+
1. sgrep로 관련 코드 위치 파악
|
|
136
|
+
↓
|
|
137
|
+
2. Sequential Thinking으로 코드 흐름 분석
|
|
138
|
+
↓
|
|
139
|
+
3. Context7로 라이브러리 API 확인
|
|
140
|
+
↓
|
|
141
|
+
4. 수정 구현
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 설치
|
|
147
|
+
|
|
148
|
+
### Claude Code Plugin 설치 (권장)
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Plugin 추가
|
|
152
|
+
/plugin marketplace add rika-labs/sgrep
|
|
153
|
+
|
|
154
|
+
# 설치
|
|
155
|
+
/plugin install sgrep
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 수동 설치
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# 간편 설치
|
|
162
|
+
curl -fsSL https://raw.githubusercontent.com/rika-labs/sgrep/main/scripts/install.sh | sh
|
|
163
|
+
|
|
164
|
+
# Cargo로 설치
|
|
165
|
+
cargo install --path .
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 참고
|
|
171
|
+
|
|
172
|
+
- [sgrep GitHub](https://github.com/Rika-Labs/sgrep)
|
|
173
|
+
- 로컬 처리로 프라이버시 보장
|
|
174
|
+
- 자연어 쿼리로 직관적 검색
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gemini-review
|
|
3
|
+
description: This skill orchestrates code review and plan validation using Google Gemini CLI. It should be used when users want to validate implementation plans, review completed code, or discuss architecture decisions with Gemini as a second opinion. Supports FastAPI, Next.js, and general tech stacks with specialized checklists. Uses gemini-3-pro-preview model with free tier (60 req/min, 1000 req/day).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Gemini Review Skill
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill enables a dual-AI review workflow where Claude prepares context and Gemini provides independent validation. The output always includes both Gemini's raw feedback and Claude's synthesized action plan.
|
|
11
|
+
|
|
12
|
+
**Model**: `gemini-3-pro-preview` (fixed)
|
|
13
|
+
**Cost**: Free tier (60 requests/min, 1000 requests/day)
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- Validating implementation plans before coding
|
|
18
|
+
- Reviewing completed code for bugs, security, and best practices
|
|
19
|
+
- Discussing architecture decisions with a second AI perspective
|
|
20
|
+
- Getting specialized feedback for FastAPI or Next.js projects
|
|
21
|
+
|
|
22
|
+
## Workflow Types
|
|
23
|
+
|
|
24
|
+
| Type | Purpose | When to Use |
|
|
25
|
+
|------|---------|-------------|
|
|
26
|
+
| **plan** | Validate implementation plan | Before starting development |
|
|
27
|
+
| **code** | Review completed code | After implementing features |
|
|
28
|
+
| **architecture** | Discuss system design | During design phase or refactoring |
|
|
29
|
+
|
|
30
|
+
## Execution Process
|
|
31
|
+
|
|
32
|
+
### Step 1: Gather Context from User
|
|
33
|
+
|
|
34
|
+
Before executing, collect:
|
|
35
|
+
1. **Review type**: `plan`, `code`, or `architecture`
|
|
36
|
+
2. **Tech stack** (optional): `fastapi`, `nextjs`, or `general`
|
|
37
|
+
3. **Content to review**: The actual plan, code, or architecture description
|
|
38
|
+
|
|
39
|
+
### Step 2: Load Appropriate Checklist
|
|
40
|
+
|
|
41
|
+
Based on tech stack, load the corresponding checklist from `references/checklists.md`:
|
|
42
|
+
- FastAPI: API design, Pydantic models, async patterns, security
|
|
43
|
+
- Next.js: SSR/SSG, routing, state management, performance
|
|
44
|
+
- General: Universal best practices
|
|
45
|
+
|
|
46
|
+
### Step 3: Build and Execute Gemini Command
|
|
47
|
+
|
|
48
|
+
Load the appropriate prompt template from `references/prompt-templates.md` and execute:
|
|
49
|
+
|
|
50
|
+
**For inline prompts:**
|
|
51
|
+
```bash
|
|
52
|
+
gemini -m gemini-3-pro-preview -p "{constructed_prompt}" --output-format json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**For file content review:**
|
|
56
|
+
```bash
|
|
57
|
+
cat {file_path} | gemini -m gemini-3-pro-preview -p "{review_instructions}" --output-format json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**For multi-line prompts (heredoc):**
|
|
61
|
+
```bash
|
|
62
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
63
|
+
{constructed_prompt}
|
|
64
|
+
EOF
|
|
65
|
+
)"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 4: Parse JSON Response
|
|
69
|
+
|
|
70
|
+
Gemini returns JSON with this structure:
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"response": "The actual review content",
|
|
74
|
+
"stats": {
|
|
75
|
+
"models": { ... },
|
|
76
|
+
"tools": { ... }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Extract the review content from the `response` field. Use `jq` for parsing:
|
|
82
|
+
```bash
|
|
83
|
+
result=$(gemini -m gemini-3-pro-preview -p "..." --output-format json)
|
|
84
|
+
echo "$result" | jq -r '.response'
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Step 5: Present Results in Two Sections
|
|
88
|
+
|
|
89
|
+
**CRITICAL**: Always present results in two clearly separated sections:
|
|
90
|
+
|
|
91
|
+
#### Section A: Gemini Raw Response
|
|
92
|
+
Present Gemini's complete response without modification. This shows the user exactly what Gemini found.
|
|
93
|
+
|
|
94
|
+
#### Section B: Claude's Analysis & Action Plan
|
|
95
|
+
Based on Gemini's feedback, Claude provides:
|
|
96
|
+
|
|
97
|
+
1. **Summary** (2-3 sentences)
|
|
98
|
+
- Key findings
|
|
99
|
+
- Overall assessment
|
|
100
|
+
|
|
101
|
+
2. **Action Items** (prioritized list)
|
|
102
|
+
- 🔴 Critical: Must fix before proceeding
|
|
103
|
+
- 🟡 Important: Should address soon
|
|
104
|
+
- 🟢 Minor: Nice to have improvements
|
|
105
|
+
|
|
106
|
+
3. **Ready-to-Apply Code** (when applicable)
|
|
107
|
+
- Provide actual code fixes for each issue
|
|
108
|
+
- Include before/after comparison when helpful
|
|
109
|
+
|
|
110
|
+
## Output Format Template
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
---
|
|
114
|
+
## 📋 Gemini Review Results
|
|
115
|
+
|
|
116
|
+
### A. Gemini Response (Raw)
|
|
117
|
+
|
|
118
|
+
{gemini_response_verbatim}
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### B. Claude's Analysis
|
|
123
|
+
|
|
124
|
+
#### Summary
|
|
125
|
+
{2-3 sentence overview}
|
|
126
|
+
|
|
127
|
+
#### Action Items
|
|
128
|
+
|
|
129
|
+
🔴 **Critical**
|
|
130
|
+
- Issue: {description}
|
|
131
|
+
- Fix: {solution}
|
|
132
|
+
|
|
133
|
+
🟡 **Important**
|
|
134
|
+
- Issue: {description}
|
|
135
|
+
- Fix: {solution}
|
|
136
|
+
|
|
137
|
+
🟢 **Minor**
|
|
138
|
+
- Issue: {description}
|
|
139
|
+
- Fix: {solution}
|
|
140
|
+
|
|
141
|
+
#### Ready-to-Apply Code
|
|
142
|
+
|
|
143
|
+
**{issue_name}**
|
|
144
|
+
```{language}
|
|
145
|
+
{fixed_code}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Command Examples
|
|
152
|
+
|
|
153
|
+
### Plan Review
|
|
154
|
+
```bash
|
|
155
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
156
|
+
[PLAN REVIEW REQUEST]
|
|
157
|
+
Review this implementation plan for completeness and potential issues:
|
|
158
|
+
|
|
159
|
+
{plan_content}
|
|
160
|
+
|
|
161
|
+
Check for: Logic errors, missing edge cases, architecture flaws, security concerns.
|
|
162
|
+
Provide specific, actionable feedback.
|
|
163
|
+
EOF
|
|
164
|
+
)"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Code Review (piping file)
|
|
168
|
+
```bash
|
|
169
|
+
cat src/api/auth.py | gemini -m gemini-3-pro-preview -p "Review this FastAPI authentication code for security issues, bugs, and best practices. Provide specific line-by-line feedback." --output-format json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Architecture Review
|
|
173
|
+
```bash
|
|
174
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
175
|
+
[ARCHITECTURE REVIEW]
|
|
176
|
+
System: {system_name}
|
|
177
|
+
Tech Stack: FastAPI + Next.js + AWS
|
|
178
|
+
|
|
179
|
+
{architecture_description}
|
|
180
|
+
|
|
181
|
+
Evaluate: Scalability, reliability, maintainability, security, cost efficiency.
|
|
182
|
+
Suggest improvements with trade-off analysis.
|
|
183
|
+
EOF
|
|
184
|
+
)"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Environment Compatibility
|
|
188
|
+
|
|
189
|
+
| Environment | Execution Method |
|
|
190
|
+
|-------------|------------------|
|
|
191
|
+
| Claude Code | Direct bash execution |
|
|
192
|
+
| Claude (Web/Desktop) | Use `bash_tool` |
|
|
193
|
+
|
|
194
|
+
Command syntax remains identical across environments.
|
|
195
|
+
|
|
196
|
+
## Error Handling
|
|
197
|
+
|
|
198
|
+
If Gemini returns an error:
|
|
199
|
+
1. Display the error message to user
|
|
200
|
+
2. Check for common issues:
|
|
201
|
+
- Quota exceeded (60/min or 1000/day limit)
|
|
202
|
+
- Network connectivity
|
|
203
|
+
- Invalid prompt format
|
|
204
|
+
3. Suggest retry or alternative approach
|
|
205
|
+
|
|
206
|
+
## Quota Management
|
|
207
|
+
|
|
208
|
+
Free tier limits:
|
|
209
|
+
- 60 requests per minute
|
|
210
|
+
- 1000 requests per day
|
|
211
|
+
|
|
212
|
+
To conserve quota:
|
|
213
|
+
- Combine related reviews into single prompts
|
|
214
|
+
- Use specific, focused review requests
|
|
215
|
+
- Avoid redundant re-reviews
|
|
216
|
+
|
|
217
|
+
## References
|
|
218
|
+
|
|
219
|
+
- `references/checklists.md`: Tech stack-specific review checklists
|
|
220
|
+
- `references/prompt-templates.md`: Prompt templates for each review type
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Review Checklists by Tech Stack
|
|
2
|
+
|
|
3
|
+
## FastAPI Checklist
|
|
4
|
+
|
|
5
|
+
### API Design
|
|
6
|
+
- [ ] RESTful conventions followed (proper HTTP methods, status codes)
|
|
7
|
+
- [ ] Consistent URL naming (kebab-case, plural nouns)
|
|
8
|
+
- [ ] Proper use of path vs query parameters
|
|
9
|
+
- [ ] API versioning strategy (if applicable)
|
|
10
|
+
- [ ] Response model consistency across endpoints
|
|
11
|
+
|
|
12
|
+
### Pydantic Models
|
|
13
|
+
- [ ] Field validation with appropriate constraints (min, max, regex)
|
|
14
|
+
- [ ] Optional vs required fields correctly defined
|
|
15
|
+
- [ ] Proper use of `Field()` for metadata and examples
|
|
16
|
+
- [ ] Config class settings (orm_mode, validate_assignment)
|
|
17
|
+
- [ ] Custom validators where needed
|
|
18
|
+
|
|
19
|
+
### Async Patterns
|
|
20
|
+
- [ ] Async/await used consistently
|
|
21
|
+
- [ ] No blocking I/O in async functions
|
|
22
|
+
- [ ] Proper use of `asyncio.gather()` for concurrent operations
|
|
23
|
+
- [ ] Background tasks for long-running operations
|
|
24
|
+
- [ ] Connection pooling for databases
|
|
25
|
+
|
|
26
|
+
### Security
|
|
27
|
+
- [ ] Authentication implemented (OAuth2, JWT, API keys)
|
|
28
|
+
- [ ] Authorization checks on protected endpoints
|
|
29
|
+
- [ ] Input sanitization and validation
|
|
30
|
+
- [ ] CORS configuration appropriate for use case
|
|
31
|
+
- [ ] Rate limiting consideration
|
|
32
|
+
- [ ] Secrets not hardcoded
|
|
33
|
+
|
|
34
|
+
### Error Handling
|
|
35
|
+
- [ ] Custom exception handlers defined
|
|
36
|
+
- [ ] Consistent error response format
|
|
37
|
+
- [ ] Proper HTTP status codes for errors
|
|
38
|
+
- [ ] Sensitive information not leaked in errors
|
|
39
|
+
|
|
40
|
+
### Performance
|
|
41
|
+
- [ ] Database queries optimized (N+1 problem avoided)
|
|
42
|
+
- [ ] Pagination for list endpoints
|
|
43
|
+
- [ ] Caching strategy where appropriate
|
|
44
|
+
- [ ] Response model excludes unnecessary fields
|
|
45
|
+
|
|
46
|
+
### Testing
|
|
47
|
+
- [ ] Test client setup with TestClient
|
|
48
|
+
- [ ] Dependency overrides for mocking
|
|
49
|
+
- [ ] Coverage of happy path and edge cases
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Next.js Checklist
|
|
54
|
+
|
|
55
|
+
### Rendering Strategy
|
|
56
|
+
- [ ] Appropriate use of SSR vs SSG vs ISR vs CSR
|
|
57
|
+
- [ ] `getStaticProps` for static content
|
|
58
|
+
- [ ] `getServerSideProps` only when necessary
|
|
59
|
+
- [ ] ISR with proper revalidation intervals
|
|
60
|
+
- [ ] Client-side fetching for user-specific data
|
|
61
|
+
|
|
62
|
+
### Routing
|
|
63
|
+
- [ ] File-based routing structure organized
|
|
64
|
+
- [ ] Dynamic routes properly parameterized
|
|
65
|
+
- [ ] Catch-all routes used appropriately
|
|
66
|
+
- [ ] Route groups for organization (App Router)
|
|
67
|
+
- [ ] Parallel routes if needed
|
|
68
|
+
|
|
69
|
+
### Data Fetching
|
|
70
|
+
- [ ] SWR or React Query for client-side
|
|
71
|
+
- [ ] Proper loading and error states
|
|
72
|
+
- [ ] Optimistic updates where appropriate
|
|
73
|
+
- [ ] Cache invalidation strategy
|
|
74
|
+
|
|
75
|
+
### State Management
|
|
76
|
+
- [ ] Server state vs client state separated
|
|
77
|
+
- [ ] Zustand/Jotai for simple state
|
|
78
|
+
- [ ] Context used sparingly
|
|
79
|
+
- [ ] State lifted appropriately
|
|
80
|
+
|
|
81
|
+
### Performance
|
|
82
|
+
- [ ] Image optimization with next/image
|
|
83
|
+
- [ ] Font optimization with next/font
|
|
84
|
+
- [ ] Code splitting and lazy loading
|
|
85
|
+
- [ ] Bundle size monitored
|
|
86
|
+
- [ ] Core Web Vitals considered
|
|
87
|
+
|
|
88
|
+
### SEO
|
|
89
|
+
- [ ] Metadata properly configured
|
|
90
|
+
- [ ] Open Graph tags present
|
|
91
|
+
- [ ] Structured data where appropriate
|
|
92
|
+
- [ ] Sitemap generation
|
|
93
|
+
- [ ] robots.txt configured
|
|
94
|
+
|
|
95
|
+
### Security
|
|
96
|
+
- [ ] API routes protected
|
|
97
|
+
- [ ] Environment variables properly used
|
|
98
|
+
- [ ] CSRF protection if needed
|
|
99
|
+
- [ ] Content Security Policy headers
|
|
100
|
+
|
|
101
|
+
### TypeScript
|
|
102
|
+
- [ ] Strict mode enabled
|
|
103
|
+
- [ ] Props interfaces defined
|
|
104
|
+
- [ ] API response types defined
|
|
105
|
+
- [ ] No `any` types without justification
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## General Checklist
|
|
110
|
+
|
|
111
|
+
### Code Quality
|
|
112
|
+
- [ ] Single responsibility principle followed
|
|
113
|
+
- [ ] DRY - no unnecessary duplication
|
|
114
|
+
- [ ] Functions/methods are focused and small
|
|
115
|
+
- [ ] Clear naming conventions
|
|
116
|
+
- [ ] Comments explain "why", not "what"
|
|
117
|
+
|
|
118
|
+
### Logic & Correctness
|
|
119
|
+
- [ ] Edge cases handled (empty, null, boundary values)
|
|
120
|
+
- [ ] Error handling comprehensive
|
|
121
|
+
- [ ] Race conditions considered
|
|
122
|
+
- [ ] Input validation present
|
|
123
|
+
- [ ] Return values checked
|
|
124
|
+
|
|
125
|
+
### Security
|
|
126
|
+
- [ ] No hardcoded secrets
|
|
127
|
+
- [ ] User input sanitized
|
|
128
|
+
- [ ] SQL injection prevented (parameterized queries)
|
|
129
|
+
- [ ] XSS prevention measures
|
|
130
|
+
- [ ] Authentication/authorization proper
|
|
131
|
+
|
|
132
|
+
### Performance
|
|
133
|
+
- [ ] Time complexity acceptable for scale
|
|
134
|
+
- [ ] Space complexity reasonable
|
|
135
|
+
- [ ] No unnecessary loops or iterations
|
|
136
|
+
- [ ] Database queries optimized
|
|
137
|
+
- [ ] Caching considered where appropriate
|
|
138
|
+
|
|
139
|
+
### Maintainability
|
|
140
|
+
- [ ] Code is testable
|
|
141
|
+
- [ ] Dependencies minimal and justified
|
|
142
|
+
- [ ] Configuration externalized
|
|
143
|
+
- [ ] Logging present for debugging
|
|
144
|
+
- [ ] Error messages helpful
|
|
145
|
+
|
|
146
|
+
### Documentation
|
|
147
|
+
- [ ] Public APIs documented
|
|
148
|
+
- [ ] Complex logic explained
|
|
149
|
+
- [ ] Setup instructions clear
|
|
150
|
+
- [ ] Environment variables documented
|