@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,293 @@
|
|
|
1
|
+
# Prompt Templates for Gemini Review
|
|
2
|
+
|
|
3
|
+
## Command Patterns
|
|
4
|
+
|
|
5
|
+
All commands use the fixed model `gemini-3-pro-preview` with JSON output for parsing.
|
|
6
|
+
|
|
7
|
+
### Basic Pattern
|
|
8
|
+
```bash
|
|
9
|
+
gemini -m gemini-3-pro-preview -p "{prompt}" --output-format json
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### File Piping Pattern
|
|
13
|
+
```bash
|
|
14
|
+
cat {file_path} | gemini -m gemini-3-pro-preview -p "{instructions}" --output-format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Multi-line Heredoc Pattern
|
|
18
|
+
```bash
|
|
19
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
20
|
+
{multi_line_prompt}
|
|
21
|
+
EOF
|
|
22
|
+
)"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Response Parsing
|
|
26
|
+
```bash
|
|
27
|
+
result=$(gemini -m gemini-3-pro-preview -p "..." --output-format json)
|
|
28
|
+
review_content=$(echo "$result" | jq -r '.response')
|
|
29
|
+
echo "$review_content"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Plan Review Template
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
38
|
+
[PLAN REVIEW REQUEST]
|
|
39
|
+
|
|
40
|
+
## Context
|
|
41
|
+
Project: {project_name}
|
|
42
|
+
Tech Stack: {tech_stack}
|
|
43
|
+
Current State: {current_state_description}
|
|
44
|
+
|
|
45
|
+
## Implementation Plan
|
|
46
|
+
{plan_content}
|
|
47
|
+
|
|
48
|
+
## Review Checklist
|
|
49
|
+
{checklist_items}
|
|
50
|
+
|
|
51
|
+
## Review Instructions
|
|
52
|
+
Analyze this implementation plan and provide feedback on:
|
|
53
|
+
|
|
54
|
+
1. **Completeness**
|
|
55
|
+
- Are all requirements addressed?
|
|
56
|
+
- Any missing steps or considerations?
|
|
57
|
+
|
|
58
|
+
2. **Logic & Feasibility**
|
|
59
|
+
- Will this approach work as intended?
|
|
60
|
+
- Any logical flaws or contradictions?
|
|
61
|
+
|
|
62
|
+
3. **Edge Cases**
|
|
63
|
+
- What edge cases might be missed?
|
|
64
|
+
- How should they be handled?
|
|
65
|
+
|
|
66
|
+
4. **Risks & Issues**
|
|
67
|
+
- Potential problems during implementation?
|
|
68
|
+
- Dependencies or blockers?
|
|
69
|
+
|
|
70
|
+
5. **Alternatives**
|
|
71
|
+
- Better approaches available?
|
|
72
|
+
- Trade-offs to consider?
|
|
73
|
+
|
|
74
|
+
Respond with:
|
|
75
|
+
- ✅ Strengths of the plan
|
|
76
|
+
- ⚠️ Concerns or issues found
|
|
77
|
+
- 💡 Suggestions for improvement
|
|
78
|
+
- 🔄 Alternative approaches (if any)
|
|
79
|
+
EOF
|
|
80
|
+
)"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Code Review Template
|
|
86
|
+
|
|
87
|
+
### Option A: Inline Code
|
|
88
|
+
```bash
|
|
89
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
90
|
+
[CODE REVIEW REQUEST]
|
|
91
|
+
|
|
92
|
+
## Context
|
|
93
|
+
File: {file_path}
|
|
94
|
+
Language: {language}
|
|
95
|
+
Tech Stack: {tech_stack}
|
|
96
|
+
Purpose: {purpose_description}
|
|
97
|
+
|
|
98
|
+
## Code to Review
|
|
99
|
+
```{language}
|
|
100
|
+
{code_content}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Review Checklist
|
|
104
|
+
{checklist_items}
|
|
105
|
+
|
|
106
|
+
## Review Instructions
|
|
107
|
+
Perform a thorough code review focusing on:
|
|
108
|
+
|
|
109
|
+
1. **Bugs & Logic Errors**
|
|
110
|
+
- Incorrect logic or algorithms
|
|
111
|
+
- Off-by-one errors
|
|
112
|
+
- Null/undefined handling
|
|
113
|
+
- Type mismatches
|
|
114
|
+
|
|
115
|
+
2. **Security Vulnerabilities**
|
|
116
|
+
- Injection risks (SQL, XSS, etc.)
|
|
117
|
+
- Authentication/authorization gaps
|
|
118
|
+
- Data exposure risks
|
|
119
|
+
- Input validation issues
|
|
120
|
+
|
|
121
|
+
3. **Performance Issues**
|
|
122
|
+
- Inefficient algorithms (specify Big-O if problematic)
|
|
123
|
+
- N+1 queries
|
|
124
|
+
- Memory leaks
|
|
125
|
+
- Unnecessary operations
|
|
126
|
+
|
|
127
|
+
4. **Best Practices**
|
|
128
|
+
- Code organization
|
|
129
|
+
- Naming conventions
|
|
130
|
+
- Error handling patterns
|
|
131
|
+
- Testing considerations
|
|
132
|
+
|
|
133
|
+
5. **Maintainability**
|
|
134
|
+
- Code clarity
|
|
135
|
+
- Documentation needs
|
|
136
|
+
- Coupling and cohesion
|
|
137
|
+
- Future extensibility
|
|
138
|
+
|
|
139
|
+
For each issue found, provide:
|
|
140
|
+
- 🔴 CRITICAL / 🟡 IMPORTANT / 🟢 MINOR
|
|
141
|
+
- Location (line number or function name)
|
|
142
|
+
- Description of the issue
|
|
143
|
+
- Suggested fix with code example
|
|
144
|
+
EOF
|
|
145
|
+
)"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Option B: Piping File Content
|
|
149
|
+
```bash
|
|
150
|
+
cat {file_path} | gemini -m gemini-3-pro-preview --output-format json -p "Review this {language} code ({tech_stack} project) for:
|
|
151
|
+
1. Bugs and logic errors
|
|
152
|
+
2. Security vulnerabilities
|
|
153
|
+
3. Performance issues
|
|
154
|
+
4. Best practices violations
|
|
155
|
+
5. Maintainability concerns
|
|
156
|
+
|
|
157
|
+
For each issue: specify severity (🔴 CRITICAL/🟡 IMPORTANT/🟢 MINOR), location, description, and suggested fix with code."
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Architecture Review Template
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
gemini -m gemini-3-pro-preview --output-format json -p "$(cat << 'EOF'
|
|
166
|
+
[ARCHITECTURE REVIEW REQUEST]
|
|
167
|
+
|
|
168
|
+
## System Overview
|
|
169
|
+
Name: {system_name}
|
|
170
|
+
Purpose: {system_purpose}
|
|
171
|
+
Tech Stack: {tech_stack}
|
|
172
|
+
Scale: {expected_scale}
|
|
173
|
+
|
|
174
|
+
## Current/Proposed Architecture
|
|
175
|
+
{architecture_description}
|
|
176
|
+
|
|
177
|
+
## Components
|
|
178
|
+
{components_list}
|
|
179
|
+
|
|
180
|
+
## Data Flow
|
|
181
|
+
{data_flow_description}
|
|
182
|
+
|
|
183
|
+
## Specific Questions
|
|
184
|
+
{specific_questions}
|
|
185
|
+
|
|
186
|
+
## Review Instructions
|
|
187
|
+
Evaluate this architecture considering:
|
|
188
|
+
|
|
189
|
+
1. **Scalability**
|
|
190
|
+
- Can it handle expected load?
|
|
191
|
+
- Horizontal vs vertical scaling options?
|
|
192
|
+
- Bottlenecks identified?
|
|
193
|
+
|
|
194
|
+
2. **Reliability**
|
|
195
|
+
- Single points of failure?
|
|
196
|
+
- Fault tolerance mechanisms?
|
|
197
|
+
- Recovery strategies?
|
|
198
|
+
|
|
199
|
+
3. **Maintainability**
|
|
200
|
+
- Component coupling?
|
|
201
|
+
- Deployment complexity?
|
|
202
|
+
- Operational overhead?
|
|
203
|
+
|
|
204
|
+
4. **Security**
|
|
205
|
+
- Attack surface?
|
|
206
|
+
- Data protection?
|
|
207
|
+
- Access control boundaries?
|
|
208
|
+
|
|
209
|
+
5. **Cost Efficiency**
|
|
210
|
+
- Resource utilization?
|
|
211
|
+
- Scaling costs?
|
|
212
|
+
- Operational costs?
|
|
213
|
+
|
|
214
|
+
6. **Trade-offs**
|
|
215
|
+
- What are we sacrificing?
|
|
216
|
+
- Alternative architectures?
|
|
217
|
+
- Migration path considerations?
|
|
218
|
+
|
|
219
|
+
Respond with:
|
|
220
|
+
- 📊 Overall assessment
|
|
221
|
+
- ✅ Architectural strengths
|
|
222
|
+
- ⚠️ Concerns and risks
|
|
223
|
+
- 💡 Recommendations
|
|
224
|
+
- 🔄 Alternative approaches worth considering
|
|
225
|
+
EOF
|
|
226
|
+
)"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## FastAPI-Specific Additions
|
|
232
|
+
|
|
233
|
+
When tech_stack is `fastapi`, append to the relevant template:
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
## FastAPI-Specific Review Points
|
|
237
|
+
- Pydantic model design and validation
|
|
238
|
+
- Async/await correctness
|
|
239
|
+
- Dependency injection usage
|
|
240
|
+
- OpenAPI documentation quality
|
|
241
|
+
- Middleware and exception handler patterns
|
|
242
|
+
- Database session management
|
|
243
|
+
- Background task handling
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Next.js-Specific Additions
|
|
249
|
+
|
|
250
|
+
When tech_stack is `nextjs`, append to the relevant template:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
## Next.js-Specific Review Points
|
|
254
|
+
- Rendering strategy appropriateness (SSR/SSG/ISR/CSR)
|
|
255
|
+
- Data fetching patterns
|
|
256
|
+
- Route organization
|
|
257
|
+
- Image and font optimization
|
|
258
|
+
- Bundle size impact
|
|
259
|
+
- SEO metadata handling
|
|
260
|
+
- API route security
|
|
261
|
+
- TypeScript type safety
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Quick Review Templates
|
|
267
|
+
|
|
268
|
+
### Security Quick Check
|
|
269
|
+
```bash
|
|
270
|
+
cat {file_path} | gemini -m gemini-3-pro-preview -p "Security audit this code. Find: injection vulnerabilities, auth issues, data exposure risks, input validation gaps. List each with severity and fix." --output-format json
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Performance Quick Check
|
|
274
|
+
```bash
|
|
275
|
+
cat {file_path} | gemini -m gemini-3-pro-preview -p "Performance review this code. Find: inefficient algorithms (note Big-O), N+1 queries, memory issues, unnecessary operations. Suggest optimizations." --output-format json
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Bug Hunt
|
|
279
|
+
```bash
|
|
280
|
+
cat {file_path} | gemini -m gemini-3-pro-preview -p "Find bugs in this code: logic errors, edge cases, null handling, race conditions, type issues. For each bug, show the fix." --output-format json
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Template Usage Instructions
|
|
286
|
+
|
|
287
|
+
1. Select the appropriate base template (plan/code/architecture)
|
|
288
|
+
2. Fill in all `{placeholder}` fields with actual content
|
|
289
|
+
3. Load the relevant checklist from `checklists.md` based on tech stack
|
|
290
|
+
4. Append tech-stack-specific additions if applicable
|
|
291
|
+
5. Execute via Gemini CLI
|
|
292
|
+
6. Parse JSON response to extract `.response` field
|
|
293
|
+
7. Present both raw Gemini response and Claude's analysis
|