@kood/claude-code 0.1.6 → 0.1.9

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 (107) hide show
  1. package/dist/index.js +109 -216
  2. package/package.json +8 -2
  3. package/templates/hono/CLAUDE.md +59 -328
  4. package/templates/hono/docs/architecture/architecture.md +93 -747
  5. package/templates/hono/docs/deployment/cloudflare.md +59 -513
  6. package/templates/hono/docs/deployment/docker.md +41 -356
  7. package/templates/hono/docs/deployment/index.md +54 -190
  8. package/templates/hono/docs/deployment/railway.md +36 -306
  9. package/templates/hono/docs/deployment/vercel.md +49 -434
  10. package/templates/hono/docs/library/ai-sdk/index.md +53 -290
  11. package/templates/hono/docs/library/ai-sdk/openrouter.md +19 -387
  12. package/templates/hono/docs/library/ai-sdk/providers.md +28 -394
  13. package/templates/hono/docs/library/ai-sdk/streaming.md +52 -353
  14. package/templates/hono/docs/library/ai-sdk/structured-output.md +63 -395
  15. package/templates/hono/docs/library/ai-sdk/tools.md +62 -431
  16. package/templates/hono/docs/library/hono/env-setup.md +24 -313
  17. package/templates/hono/docs/library/hono/error-handling.md +34 -295
  18. package/templates/hono/docs/library/hono/index.md +29 -121
  19. package/templates/hono/docs/library/hono/middleware.md +21 -188
  20. package/templates/hono/docs/library/hono/rpc.md +40 -341
  21. package/templates/hono/docs/library/hono/validation.md +35 -195
  22. package/templates/hono/docs/library/pino/index.md +42 -333
  23. package/templates/hono/docs/library/prisma/cloudflare-d1.md +64 -367
  24. package/templates/hono/docs/library/prisma/config.md +19 -260
  25. package/templates/hono/docs/library/prisma/index.md +67 -320
  26. package/templates/hono/docs/library/zod/index.md +53 -257
  27. package/templates/npx/CLAUDE.md +62 -274
  28. package/templates/npx/docs/references/patterns.md +160 -0
  29. package/templates/tanstack-start/CLAUDE.md +100 -256
  30. package/templates/tanstack-start/docs/architecture/architecture.md +44 -589
  31. package/templates/tanstack-start/docs/deployment/cloudflare.md +37 -424
  32. package/templates/tanstack-start/docs/deployment/index.md +57 -286
  33. package/templates/tanstack-start/docs/deployment/nitro.md +36 -318
  34. package/templates/tanstack-start/docs/deployment/railway.md +40 -409
  35. package/templates/tanstack-start/docs/deployment/vercel.md +43 -465
  36. package/templates/tanstack-start/docs/design/components.md +77 -311
  37. package/templates/tanstack-start/docs/design/index.md +113 -69
  38. package/templates/tanstack-start/docs/design/safe-area.md +51 -250
  39. package/templates/tanstack-start/docs/design/tailwind-setup.md +45 -359
  40. package/templates/tanstack-start/docs/guides/conventions.md +103 -0
  41. package/templates/tanstack-start/docs/guides/env-setup.md +34 -340
  42. package/templates/tanstack-start/docs/guides/getting-started.md +22 -209
  43. package/templates/tanstack-start/docs/guides/hooks.md +166 -0
  44. package/templates/tanstack-start/docs/guides/routes.md +166 -0
  45. package/templates/tanstack-start/docs/guides/services.md +143 -0
  46. package/templates/tanstack-start/docs/library/better-auth/2fa.md +27 -115
  47. package/templates/tanstack-start/docs/library/better-auth/advanced.md +22 -105
  48. package/templates/tanstack-start/docs/library/better-auth/index.md +17 -66
  49. package/templates/tanstack-start/docs/library/better-auth/plugins.md +11 -88
  50. package/templates/tanstack-start/docs/library/better-auth/session.md +12 -92
  51. package/templates/tanstack-start/docs/library/better-auth/setup.md +9 -91
  52. package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +30 -358
  53. package/templates/tanstack-start/docs/library/prisma/config.md +27 -327
  54. package/templates/tanstack-start/docs/library/prisma/crud.md +46 -174
  55. package/templates/tanstack-start/docs/library/prisma/index.md +23 -113
  56. package/templates/tanstack-start/docs/library/prisma/relations.md +31 -153
  57. package/templates/tanstack-start/docs/library/prisma/schema.md +40 -217
  58. package/templates/tanstack-start/docs/library/prisma/setup.md +12 -112
  59. package/templates/tanstack-start/docs/library/prisma/transactions.md +20 -110
  60. package/templates/tanstack-start/docs/library/tanstack-query/index.md +26 -97
  61. package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +28 -107
  62. package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +44 -146
  63. package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +33 -127
  64. package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +49 -149
  65. package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +19 -112
  66. package/templates/tanstack-start/docs/library/tanstack-start/index.md +33 -80
  67. package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +28 -106
  68. package/templates/tanstack-start/docs/library/tanstack-start/routing.md +21 -118
  69. package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +34 -246
  70. package/templates/tanstack-start/docs/library/tanstack-start/setup.md +6 -39
  71. package/templates/tanstack-start/docs/library/zod/complex-types.md +32 -156
  72. package/templates/tanstack-start/docs/library/zod/index.md +31 -144
  73. package/templates/tanstack-start/docs/library/zod/transforms.md +20 -129
  74. package/templates/tanstack-start/docs/library/zod/validation.md +39 -155
  75. package/templates/hono/docs/commands/git.md +0 -145
  76. package/templates/hono/docs/mcp/context7.md +0 -106
  77. package/templates/hono/docs/mcp/index.md +0 -176
  78. package/templates/hono/docs/mcp/sequential-thinking.md +0 -101
  79. package/templates/hono/docs/mcp/serena.md +0 -269
  80. package/templates/hono/docs/mcp/sgrep.md +0 -105
  81. package/templates/hono/docs/skills/gemini-review/SKILL.md +0 -220
  82. package/templates/hono/docs/skills/gemini-review/references/checklists.md +0 -136
  83. package/templates/hono/docs/skills/gemini-review/references/prompt-templates.md +0 -303
  84. package/templates/npx/docs/commands/git.md +0 -145
  85. package/templates/npx/docs/mcp/index.md +0 -60
  86. package/templates/npx/docs/skills/gemini-review/SKILL.md +0 -220
  87. package/templates/npx/docs/skills/gemini-review/references/checklists.md +0 -134
  88. package/templates/npx/docs/skills/gemini-review/references/prompt-templates.md +0 -301
  89. package/templates/tanstack-start/docs/commands/git.md +0 -145
  90. package/templates/tanstack-start/docs/design/accessibility.md +0 -433
  91. package/templates/tanstack-start/docs/design/color.md +0 -235
  92. package/templates/tanstack-start/docs/design/spacing.md +0 -341
  93. package/templates/tanstack-start/docs/design/typography.md +0 -324
  94. package/templates/tanstack-start/docs/guides/best-practices.md +0 -950
  95. package/templates/tanstack-start/docs/guides/husky-lint-staged.md +0 -303
  96. package/templates/tanstack-start/docs/guides/prettier.md +0 -189
  97. package/templates/tanstack-start/docs/guides/project-templates.md +0 -710
  98. package/templates/tanstack-start/docs/library/tanstack-query/setup.md +0 -107
  99. package/templates/tanstack-start/docs/library/zod/basic-types.md +0 -186
  100. package/templates/tanstack-start/docs/mcp/context7.md +0 -204
  101. package/templates/tanstack-start/docs/mcp/index.md +0 -177
  102. package/templates/tanstack-start/docs/mcp/sequential-thinking.md +0 -180
  103. package/templates/tanstack-start/docs/mcp/serena.md +0 -269
  104. package/templates/tanstack-start/docs/mcp/sgrep.md +0 -174
  105. package/templates/tanstack-start/docs/skills/gemini-review/SKILL.md +0 -220
  106. package/templates/tanstack-start/docs/skills/gemini-review/references/checklists.md +0 -144
  107. package/templates/tanstack-start/docs/skills/gemini-review/references/prompt-templates.md +0 -292
@@ -1,303 +0,0 @@
1
- # Husky + lint-staged
2
-
3
- > Git 커밋 시 자동 코드 검사 및 포맷팅
4
-
5
- ---
6
-
7
- ## 🚀 Quick Reference
8
-
9
- ### 설치 (복사용)
10
-
11
- ```bash
12
- # 패키지 설치
13
- yarn add -D husky lint-staged
14
-
15
- # Husky 초기화
16
- npx husky init
17
-
18
- # pre-commit 훅 설정
19
- echo "npx lint-staged" > .husky/pre-commit
20
- ```
21
-
22
- ---
23
-
24
- ## 설치 단계별 가이드
25
-
26
- ### 1. 패키지 설치
27
-
28
- ```bash
29
- yarn add -D husky lint-staged
30
- ```
31
-
32
- ### 2. Husky 초기화
33
-
34
- ```bash
35
- npx husky init
36
- ```
37
-
38
- 이 명령어는:
39
- - `.husky/` 디렉토리 생성
40
- - `package.json`에 `prepare` 스크립트 추가
41
- - 기본 `pre-commit` 훅 생성
42
-
43
- ### 3. pre-commit 훅 설정
44
-
45
- ```bash
46
- echo "npx lint-staged" > .husky/pre-commit
47
- ```
48
-
49
- ---
50
-
51
- ## 설정 파일
52
-
53
- ### package.json
54
-
55
- ```json
56
- {
57
- "scripts": {
58
- "prepare": "husky"
59
- },
60
- "lint-staged": {
61
- "*.{js,jsx,ts,tsx}": [
62
- "prettier --write"
63
- ],
64
- "*.{json,yml,yaml}": [
65
- "prettier --write"
66
- ],
67
- "*.{css,scss}": [
68
- "prettier --write"
69
- ]
70
- }
71
- }
72
- ```
73
-
74
- ### 또는 .lintstagedrc.json (별도 파일)
75
-
76
- ```json
77
- {
78
- "*.{js,jsx,ts,tsx}": [
79
- "prettier --write"
80
- ],
81
- "*.{json,yml,yaml}": [
82
- "prettier --write"
83
- ],
84
- "*.{css,scss}": [
85
- "prettier --write"
86
- ]
87
- }
88
- ```
89
-
90
- **주의**: `*.md` 파일은 lint-staged에서 제외 (Prettier가 테이블 등을 이상하게 변형함)
91
-
92
- ---
93
-
94
- ## 고급 설정
95
-
96
- ### TypeScript 타입 체크 포함
97
-
98
- ```json
99
- {
100
- "lint-staged": {
101
- "*.{ts,tsx}": [
102
- "prettier --write",
103
- "bash -c 'tsc --noEmit'"
104
- ],
105
- "*.{js,jsx}": [
106
- "prettier --write"
107
- ]
108
- }
109
- }
110
- ```
111
-
112
- ### ESLint 포함 (선택)
113
-
114
- ```json
115
- {
116
- "lint-staged": {
117
- "*.{js,jsx,ts,tsx}": [
118
- "eslint --fix",
119
- "prettier --write"
120
- ]
121
- }
122
- }
123
- ```
124
-
125
- ### 테스트 포함 (선택)
126
-
127
- ```json
128
- {
129
- "lint-staged": {
130
- "*.{ts,tsx}": [
131
- "prettier --write",
132
- "vitest related --run"
133
- ]
134
- }
135
- }
136
- ```
137
-
138
- ---
139
-
140
- ## 디렉토리 구조
141
-
142
- ```
143
- project/
144
- ├── .husky/
145
- │ ├── _/
146
- │ │ └── husky.sh
147
- │ └── pre-commit # 커밋 전 실행
148
- ├── package.json # lint-staged 설정
149
- └── .prettierrc # Prettier 설정
150
- ```
151
-
152
- ---
153
-
154
- ## .husky/pre-commit 예시
155
-
156
- ### 기본 (lint-staged만)
157
-
158
- ```bash
159
- npx lint-staged
160
- ```
161
-
162
- ### 추가 검사 포함
163
-
164
- ```bash
165
- #!/bin/sh
166
-
167
- # lint-staged 실행
168
- npx lint-staged
169
-
170
- # 타입 체크 (전체)
171
- echo "Running type check..."
172
- npx tsc --noEmit
173
- ```
174
-
175
- ---
176
-
177
- ## 작동 흐름
178
-
179
- ```
180
- git commit -m "feat: 새 기능"
181
-
182
- .husky/pre-commit 실행
183
-
184
- lint-staged 실행
185
-
186
- 스테이징된 파일만 처리:
187
- - *.ts, *.tsx → prettier --write
188
- - *.json, *.md → prettier --write
189
-
190
- 변경된 파일 자동 스테이징
191
-
192
- 커밋 완료
193
- ```
194
-
195
- ---
196
-
197
- ## 문제 해결
198
-
199
- ### 훅이 실행되지 않을 때
200
-
201
- ```bash
202
- # Husky 재설치
203
- rm -rf .husky
204
- npx husky init
205
- echo "npx lint-staged" > .husky/pre-commit
206
- ```
207
-
208
- ### 권한 문제
209
-
210
- ```bash
211
- chmod +x .husky/pre-commit
212
- ```
213
-
214
- ### lint-staged 캐시 문제
215
-
216
- ```bash
217
- # 캐시 삭제
218
- rm -rf node_modules/.cache/lint-staged
219
- ```
220
-
221
- ### 훅 우회 (긴급 시에만)
222
-
223
- ```bash
224
- git commit -m "fix: 긴급 수정" --no-verify
225
- ```
226
-
227
- **주의**: `--no-verify`는 정말 긴급한 상황에서만 사용
228
-
229
- ---
230
-
231
- ## 팀 설정
232
-
233
- ### 새 팀원 온보딩
234
-
235
- ```bash
236
- # 클론 후 실행
237
- yarn install # prepare 스크립트가 자동으로 husky 설정
238
- ```
239
-
240
- ### CI/CD에서 Husky 비활성화
241
-
242
- ```bash
243
- # CI 환경에서
244
- HUSKY=0 yarn install
245
- ```
246
-
247
- 또는 package.json:
248
-
249
- ```json
250
- {
251
- "scripts": {
252
- "prepare": "husky || true"
253
- }
254
- }
255
- ```
256
-
257
- ---
258
-
259
- ## 권장 설정 조합
260
-
261
- ### 최소 설정
262
-
263
- ```json
264
- {
265
- "lint-staged": {
266
- "*": ["prettier --write --ignore-unknown"]
267
- }
268
- }
269
- ```
270
-
271
- ### 표준 설정 (권장)
272
-
273
- ```json
274
- {
275
- "lint-staged": {
276
- "*.{js,jsx,ts,tsx}": ["prettier --write"],
277
- "*.{json,yml,yaml,css,scss}": ["prettier --write"]
278
- }
279
- }
280
- ```
281
-
282
- ### 엄격한 설정
283
-
284
- ```json
285
- {
286
- "lint-staged": {
287
- "*.{ts,tsx}": [
288
- "prettier --write",
289
- "bash -c 'tsc --noEmit'"
290
- ],
291
- "*.{js,jsx}": ["prettier --write"],
292
- "*.{json,yml,yaml,css,scss}": ["prettier --write"]
293
- }
294
- }
295
- ```
296
-
297
- ---
298
-
299
- ## 참고
300
-
301
- - [Husky 공식 문서](https://typicode.github.io/husky/)
302
- - [lint-staged 공식 문서](https://github.com/lint-staged/lint-staged)
303
- - [Prettier 설정](./prettier.md)
@@ -1,189 +0,0 @@
1
- # Prettier 설정
2
-
3
- > 코드 포맷팅 표준화
4
-
5
- ---
6
-
7
- ## 🚀 Quick Reference
8
-
9
- ### .prettierrc (복사용)
10
-
11
- ```json
12
- {
13
- "semi": true,
14
- "singleQuote": true,
15
- "jsxSingleQuote": true,
16
- "tabWidth": 2,
17
- "trailingComma": "all",
18
- "printWidth": 80,
19
- "arrowParens": "always",
20
- "endOfLine": "lf",
21
- "importOrder": [
22
- "^react$",
23
- "^react-dom$",
24
- "^@tanstack/(.*)$",
25
- "<THIRD_PARTY_MODULES>",
26
- "^@/(.*)$",
27
- "^[./]"
28
- ],
29
- "importOrderSeparation": true,
30
- "importOrderSortSpecifiers": true,
31
- "plugins": [
32
- "@trivago/prettier-plugin-sort-imports",
33
- "prettier-plugin-tailwindcss"
34
- ]
35
- }
36
- ```
37
-
38
- ---
39
-
40
- ## 설치
41
-
42
- ```bash
43
- yarn add -D prettier @trivago/prettier-plugin-sort-imports prettier-plugin-tailwindcss
44
- ```
45
-
46
- ---
47
-
48
- ## 설정 옵션 설명
49
-
50
- ### 기본 포맷팅
51
-
52
- | 옵션 | 값 | 설명 |
53
- |------|-----|------|
54
- | `semi` | `true` | 세미콜론 사용 |
55
- | `singleQuote` | `true` | 문자열에 작은따옴표 |
56
- | `jsxSingleQuote` | `true` | JSX에서도 작은따옴표 |
57
- | `tabWidth` | `2` | 들여쓰기 2칸 |
58
- | `trailingComma` | `"all"` | 모든 곳에 trailing comma |
59
- | `printWidth` | `80` | 줄 너비 80자 |
60
- | `arrowParens` | `"always"` | 화살표 함수 괄호 항상 사용 |
61
- | `endOfLine` | `"lf"` | Unix 줄바꿈 (LF) |
62
-
63
- ### Import 정렬
64
-
65
- | 옵션 | 설명 |
66
- |------|------|
67
- | `importOrder` | import 순서 규칙 |
68
- | `importOrderSeparation` | 그룹 간 빈 줄 추가 |
69
- | `importOrderSortSpecifiers` | import 내 알파벳 정렬 |
70
-
71
- ### Import 순서 규칙
72
-
73
- ```
74
- 1. react, react-dom
75
- 2. @tanstack/* (TanStack 라이브러리)
76
- 3. <THIRD_PARTY_MODULES> (기타 외부 모듈)
77
- 4. @/* (내부 모듈)
78
- 5. ./* (상대 경로)
79
- ```
80
-
81
- ---
82
-
83
- ## 플러그인
84
-
85
- ### @trivago/prettier-plugin-sort-imports
86
-
87
- import 문 자동 정렬
88
-
89
- ```typescript
90
- // Before
91
- import { useState } from 'react';
92
- import { Button } from '@/components/ui';
93
- import { useQuery } from '@tanstack/react-query';
94
- import axios from 'axios';
95
-
96
- // After
97
- import { useState } from 'react';
98
-
99
- import { useQuery } from '@tanstack/react-query';
100
-
101
- import axios from 'axios';
102
-
103
- import { Button } from '@/components/ui';
104
- ```
105
-
106
- ### prettier-plugin-tailwindcss
107
-
108
- Tailwind 클래스 자동 정렬
109
-
110
- ```tsx
111
- // Before
112
- <div className="p-4 flex text-white bg-blue-500 items-center">
113
-
114
- // After
115
- <div className="flex items-center bg-blue-500 p-4 text-white">
116
- ```
117
-
118
- ---
119
-
120
- ## 스크립트
121
-
122
- ### package.json
123
-
124
- ```json
125
- {
126
- "scripts": {
127
- "format": "prettier --write .",
128
- "format:check": "prettier --check ."
129
- }
130
- }
131
- ```
132
-
133
- ### 사용
134
-
135
- ```bash
136
- # 전체 포맷팅
137
- yarn format
138
-
139
- # 포맷팅 검사만
140
- yarn format:check
141
- ```
142
-
143
- ---
144
-
145
- ## .prettierignore
146
-
147
- ```
148
- node_modules/
149
- .output/
150
- dist/
151
- build/
152
- .next/
153
- coverage/
154
- *.min.js
155
- *.min.css
156
- *.md
157
- pnpm-lock.yaml
158
- yarn.lock
159
- package-lock.json
160
- generated/
161
- ```
162
-
163
- **주의**: `*.md` 파일은 Prettier 포맷팅에서 제외 (테이블 등이 이상하게 변형됨)
164
-
165
- ---
166
-
167
- ## VSCode 설정
168
-
169
- ### .vscode/settings.json
170
-
171
- ```json
172
- {
173
- "editor.defaultFormatter": "esbenp.prettier-vscode",
174
- "editor.formatOnSave": true,
175
- "editor.codeActionsOnSave": {
176
- "source.organizeImports": "never"
177
- }
178
- }
179
- ```
180
-
181
- **주의**: `source.organizeImports`는 `"never"`로 설정 (Prettier 플러그인과 충돌 방지)
182
-
183
- ---
184
-
185
- ## 참고
186
-
187
- - [Prettier 공식 문서](https://prettier.io/docs/en/index.html)
188
- - [@trivago/prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports)
189
- - [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)