@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.
Files changed (78) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +297 -0
  3. package/package.json +47 -0
  4. package/templates/hono/CLAUDE.md +376 -0
  5. package/templates/hono/docs/deployment/cloudflare.md +328 -0
  6. package/templates/hono/docs/deployment/index.md +291 -0
  7. package/templates/hono/docs/git/index.md +180 -0
  8. package/templates/hono/docs/library/hono/error-handling.md +400 -0
  9. package/templates/hono/docs/library/hono/index.md +241 -0
  10. package/templates/hono/docs/library/hono/middleware.md +334 -0
  11. package/templates/hono/docs/library/hono/rpc.md +454 -0
  12. package/templates/hono/docs/library/hono/validation.md +328 -0
  13. package/templates/hono/docs/library/prisma/index.md +427 -0
  14. package/templates/hono/docs/library/zod/index.md +413 -0
  15. package/templates/hono/docs/mcp/context7.md +106 -0
  16. package/templates/hono/docs/mcp/index.md +94 -0
  17. package/templates/hono/docs/mcp/sequential-thinking.md +101 -0
  18. package/templates/hono/docs/mcp/sgrep.md +105 -0
  19. package/templates/hono/docs/skills/gemini-review/SKILL.md +220 -0
  20. package/templates/hono/docs/skills/gemini-review/references/checklists.md +136 -0
  21. package/templates/hono/docs/skills/gemini-review/references/prompt-templates.md +303 -0
  22. package/templates/tanstack-start/CLAUDE.md +279 -0
  23. package/templates/tanstack-start/docs/architecture/architecture.md +547 -0
  24. package/templates/tanstack-start/docs/deployment/cloudflare.md +346 -0
  25. package/templates/tanstack-start/docs/deployment/index.md +102 -0
  26. package/templates/tanstack-start/docs/deployment/nitro.md +211 -0
  27. package/templates/tanstack-start/docs/deployment/railway.md +364 -0
  28. package/templates/tanstack-start/docs/deployment/vercel.md +287 -0
  29. package/templates/tanstack-start/docs/design/accessibility.md +433 -0
  30. package/templates/tanstack-start/docs/design/color.md +235 -0
  31. package/templates/tanstack-start/docs/design/components.md +409 -0
  32. package/templates/tanstack-start/docs/design/index.md +107 -0
  33. package/templates/tanstack-start/docs/design/safe-area.md +317 -0
  34. package/templates/tanstack-start/docs/design/spacing.md +341 -0
  35. package/templates/tanstack-start/docs/design/tailwind-setup.md +470 -0
  36. package/templates/tanstack-start/docs/design/typography.md +324 -0
  37. package/templates/tanstack-start/docs/git/index.md +203 -0
  38. package/templates/tanstack-start/docs/guides/best-practices.md +753 -0
  39. package/templates/tanstack-start/docs/guides/getting-started.md +304 -0
  40. package/templates/tanstack-start/docs/guides/husky-lint-staged.md +303 -0
  41. package/templates/tanstack-start/docs/guides/prettier.md +189 -0
  42. package/templates/tanstack-start/docs/guides/project-templates.md +710 -0
  43. package/templates/tanstack-start/docs/library/better-auth/2fa.md +136 -0
  44. package/templates/tanstack-start/docs/library/better-auth/advanced.md +138 -0
  45. package/templates/tanstack-start/docs/library/better-auth/index.md +83 -0
  46. package/templates/tanstack-start/docs/library/better-auth/plugins.md +111 -0
  47. package/templates/tanstack-start/docs/library/better-auth/session.md +127 -0
  48. package/templates/tanstack-start/docs/library/better-auth/setup.md +123 -0
  49. package/templates/tanstack-start/docs/library/prisma/crud.md +218 -0
  50. package/templates/tanstack-start/docs/library/prisma/index.md +165 -0
  51. package/templates/tanstack-start/docs/library/prisma/relations.md +191 -0
  52. package/templates/tanstack-start/docs/library/prisma/schema.md +177 -0
  53. package/templates/tanstack-start/docs/library/prisma/setup.md +156 -0
  54. package/templates/tanstack-start/docs/library/prisma/transactions.md +140 -0
  55. package/templates/tanstack-start/docs/library/tanstack-query/index.md +146 -0
  56. package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +146 -0
  57. package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +196 -0
  58. package/templates/tanstack-start/docs/library/tanstack-query/setup.md +110 -0
  59. package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +170 -0
  60. package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +173 -0
  61. package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +171 -0
  62. package/templates/tanstack-start/docs/library/tanstack-start/index.md +114 -0
  63. package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +142 -0
  64. package/templates/tanstack-start/docs/library/tanstack-start/routing.md +163 -0
  65. package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +128 -0
  66. package/templates/tanstack-start/docs/library/tanstack-start/setup.md +85 -0
  67. package/templates/tanstack-start/docs/library/zod/basic-types.md +186 -0
  68. package/templates/tanstack-start/docs/library/zod/complex-types.md +204 -0
  69. package/templates/tanstack-start/docs/library/zod/index.md +186 -0
  70. package/templates/tanstack-start/docs/library/zod/transforms.md +174 -0
  71. package/templates/tanstack-start/docs/library/zod/validation.md +208 -0
  72. package/templates/tanstack-start/docs/mcp/context7.md +204 -0
  73. package/templates/tanstack-start/docs/mcp/index.md +116 -0
  74. package/templates/tanstack-start/docs/mcp/sequential-thinking.md +180 -0
  75. package/templates/tanstack-start/docs/mcp/sgrep.md +174 -0
  76. package/templates/tanstack-start/docs/skills/gemini-review/SKILL.md +220 -0
  77. package/templates/tanstack-start/docs/skills/gemini-review/references/checklists.md +150 -0
  78. package/templates/tanstack-start/docs/skills/gemini-review/references/prompt-templates.md +293 -0
@@ -0,0 +1,105 @@
1
+ # sgrep - Semantic Grep
2
+
3
+ > AST 기반 시맨틱 코드 검색 도구
4
+
5
+ ---
6
+
7
+ ## ⛔ 필수 규칙
8
+
9
+ ```
10
+ ❌ grep, rg 등 기본 검색 도구 사용 금지
11
+ ❌ find 명령어로 코드 검색 금지
12
+ ✅ 코드베이스 검색 시 sgrep 사용 필수
13
+ ```
14
+
15
+ ---
16
+
17
+ ## 개요
18
+
19
+ sgrep는 단순 텍스트 매칭이 아닌 AST(Abstract Syntax Tree) 기반의 시맨틱 검색을 수행합니다.
20
+
21
+ ### grep vs sgrep
22
+
23
+ | 기능 | grep | sgrep |
24
+ |------|------|-------|
25
+ | 검색 방식 | 텍스트 매칭 | AST 기반 |
26
+ | 코드 구조 인식 | ❌ | ✅ |
27
+ | 언어별 최적화 | ❌ | ✅ |
28
+ | False positive | 많음 | 적음 |
29
+
30
+ ---
31
+
32
+ ## 사용 시점
33
+
34
+ ### ✅ sgrep 사용
35
+ - 함수 정의 찾기
36
+ - 클래스 사용처 검색
37
+ - 특정 패턴의 코드 찾기
38
+ - import 문 검색
39
+ - API 엔드포인트 검색
40
+
41
+ ### 예시 상황
42
+ ```
43
+ "prisma.user.create 사용처를 찾아줘" → sgrep 사용
44
+ "authMiddleware가 어디서 쓰이는지 찾아줘" → sgrep 사용
45
+ "HTTPException을 throw하는 곳을 찾아줘" → sgrep 사용
46
+ ```
47
+
48
+ ---
49
+
50
+ ## 장점
51
+
52
+ ### 1. 정확한 코드 구조 인식
53
+ ```typescript
54
+ // 주석 안의 function은 무시
55
+ // function test() {}
56
+
57
+ // 실제 함수만 찾음
58
+ function test() {}
59
+ ```
60
+
61
+ ### 2. 언어별 최적화
62
+ - TypeScript/JavaScript
63
+ - Python
64
+ - Go
65
+ - 기타 주요 언어
66
+
67
+ ### 3. 패턴 매칭
68
+ - 함수 호출 패턴
69
+ - 클래스 정의 패턴
70
+ - import/export 패턴
71
+
72
+ ---
73
+
74
+ ## 설치
75
+
76
+ ### Claude Code Plugin 설치 (권장)
77
+
78
+ ```bash
79
+ # Plugin 추가
80
+ /plugin marketplace add rika-labs/sgrep
81
+
82
+ # 설치
83
+ /plugin install sgrep
84
+ ```
85
+
86
+ ### 사용법
87
+
88
+ ```bash
89
+ # 인증 처리 코드 찾기
90
+ sgrep search for where we handle authentication
91
+
92
+ # API 엔드포인트 검색
93
+ sgrep search API routes definition
94
+
95
+ # 에러 핸들링 패턴
96
+ sgrep search error handling with HTTPException
97
+ ```
98
+
99
+ ---
100
+
101
+ ## 관련 문서
102
+
103
+ - [MCP 개요](./index.md)
104
+ - [Sequential Thinking](./sequential-thinking.md)
105
+ - [Context7](./context7.md)
@@ -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 Hono, Cloudflare Workers, 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 Hono or Cloudflare Workers 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): `hono`, `cloudflare`, 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
+ - Hono: API design, middleware patterns, validation, error handling
43
+ - Cloudflare: Workers, KV, D1, R2, edge runtime considerations
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/routes/auth.ts | gemini -m gemini-3-pro-preview -p "Review this Hono 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: Hono + Cloudflare Workers + D1
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,136 @@
1
+ # Review Checklists by Tech Stack
2
+
3
+ ## Hono 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
+ - [ ] Response format consistency (c.json, c.text, c.html)
10
+ - [ ] Appropriate use of c.notFound() and error responses
11
+
12
+ ### Middleware
13
+ - [ ] Middleware order is correct (auth before route handlers)
14
+ - [ ] createMiddleware used for typed middleware
15
+ - [ ] Middleware properly passes control with next()
16
+ - [ ] Built-in middleware configured correctly (cors, logger, etc.)
17
+ - [ ] Custom middleware is reusable and testable
18
+
19
+ ### Validation (zValidator)
20
+ - [ ] All POST/PUT/PATCH routes have zValidator
21
+ - [ ] Validation targets correct: json, query, param, header, form
22
+ - [ ] Zod v4 syntax used (z.email(), z.url())
23
+ - [ ] Custom error handling in zValidator callback
24
+ - [ ] Schema reuse across related endpoints
25
+
26
+ ### Error Handling
27
+ - [ ] HTTPException used for HTTP errors
28
+ - [ ] Global onError handler configured
29
+ - [ ] Error responses have consistent format
30
+ - [ ] Sensitive information not leaked in errors
31
+ - [ ] Custom error classes for business logic errors
32
+
33
+ ### Type Safety
34
+ - [ ] Bindings type defined for environment variables
35
+ - [ ] Variables type defined for request context
36
+ - [ ] c.env and c.var properly typed
37
+ - [ ] RPC types exported (AppType)
38
+ - [ ] InferRequestType/InferResponseType used in clients
39
+
40
+ ### Security
41
+ - [ ] Authentication middleware on protected routes
42
+ - [ ] Bearer token or JWT validation implemented
43
+ - [ ] CORS configured appropriately
44
+ - [ ] Rate limiting considered
45
+ - [ ] Secrets accessed via c.env, not hardcoded
46
+
47
+ ---
48
+
49
+ ## Cloudflare Workers Checklist
50
+
51
+ ### Bindings Configuration
52
+ - [ ] wrangler.toml properly configured
53
+ - [ ] All bindings declared (KV, D1, R2, etc.)
54
+ - [ ] Binding types match wrangler.toml
55
+ - [ ] Environment variables set for secrets
56
+ - [ ] compatibility_flags includes nodejs_compat if needed
57
+
58
+ ### KV Namespace
59
+ - [ ] Keys are properly namespaced
60
+ - [ ] TTL (expirationTtl) set where appropriate
61
+ - [ ] Metadata used for additional key info
62
+ - [ ] List operations use prefix and cursor for pagination
63
+ - [ ] Error handling for KV operations
64
+
65
+ ### D1 Database
66
+ - [ ] Prepared statements used (no string concatenation)
67
+ - [ ] Batch operations for multiple queries
68
+ - [ ] Error handling for database operations
69
+ - [ ] Schema migrations managed properly
70
+ - [ ] Indexes created for frequently queried columns
71
+
72
+ ### R2 Bucket
73
+ - [ ] Content-Type set on uploads
74
+ - [ ] Proper error handling for missing objects
75
+ - [ ] Multipart uploads for large files
76
+ - [ ] Custom metadata used appropriately
77
+ - [ ] Access control configured
78
+
79
+ ### Edge Runtime
80
+ - [ ] No Node.js-specific APIs used
81
+ - [ ] Web APIs used (fetch, Request, Response)
82
+ - [ ] Memory limits considered (<128MB)
83
+ - [ ] CPU time limits considered (<30s)
84
+ - [ ] Subrequests limit considered (<50)
85
+
86
+ ### Deployment
87
+ - [ ] Environment-specific wrangler.toml sections
88
+ - [ ] Secrets set via wrangler secret put
89
+ - [ ] Preview deployments working
90
+ - [ ] Production deployment tested
91
+ - [ ] Rollback strategy in place
92
+
93
+ ---
94
+
95
+ ## General Checklist
96
+
97
+ ### Code Quality
98
+ - [ ] Single responsibility principle followed
99
+ - [ ] DRY - no unnecessary duplication
100
+ - [ ] Functions/methods are focused and small
101
+ - [ ] Clear naming conventions
102
+ - [ ] Comments explain "why", not "what"
103
+
104
+ ### Logic & Correctness
105
+ - [ ] Edge cases handled (empty, null, boundary values)
106
+ - [ ] Error handling comprehensive
107
+ - [ ] Race conditions considered
108
+ - [ ] Input validation present
109
+ - [ ] Return values checked
110
+
111
+ ### Security
112
+ - [ ] No hardcoded secrets
113
+ - [ ] User input sanitized
114
+ - [ ] SQL injection prevented (parameterized queries)
115
+ - [ ] XSS prevention measures
116
+ - [ ] Authentication/authorization proper
117
+
118
+ ### Performance
119
+ - [ ] Time complexity acceptable for scale
120
+ - [ ] Space complexity reasonable
121
+ - [ ] No unnecessary loops or iterations
122
+ - [ ] Database queries optimized
123
+ - [ ] Caching considered where appropriate
124
+
125
+ ### Maintainability
126
+ - [ ] Code is testable
127
+ - [ ] Dependencies minimal and justified
128
+ - [ ] Configuration externalized
129
+ - [ ] Logging present for debugging
130
+ - [ ] Error messages helpful
131
+
132
+ ### Documentation
133
+ - [ ] Public APIs documented
134
+ - [ ] Complex logic explained
135
+ - [ ] Setup instructions clear
136
+ - [ ] Environment variables documented