@smicolon/ai-kit 0.1.0 → 0.2.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 (164) hide show
  1. package/.claude-plugin/CLAUDE.md +7 -0
  2. package/.claude-plugin/marketplace.json +373 -0
  3. package/README.md +26 -16
  4. package/dist/index.js +146 -38
  5. package/package.json +4 -3
  6. package/packs/architect/CHANGELOG.md +17 -0
  7. package/packs/architect/README.md +58 -0
  8. package/packs/architect/agents/system-architect.md +768 -0
  9. package/packs/architect/commands/diagram-create.md +300 -0
  10. package/packs/better-auth/.claude-plugin/plugin.json +14 -0
  11. package/packs/better-auth/.mcp.json +14 -0
  12. package/packs/better-auth/CHANGELOG.md +26 -0
  13. package/packs/better-auth/README.md +125 -0
  14. package/packs/better-auth/agents/auth-architect.md +278 -0
  15. package/packs/better-auth/commands/auth-provider-add.md +265 -0
  16. package/packs/better-auth/commands/auth-setup.md +298 -0
  17. package/packs/better-auth/skills/auth-security/SKILL.md +425 -0
  18. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +455 -0
  19. package/packs/dev-loop/.claude-plugin/plugin.json +10 -0
  20. package/packs/dev-loop/CHANGELOG.md +69 -0
  21. package/packs/dev-loop/README.md +155 -0
  22. package/packs/dev-loop/commands/cancel-dev.md +21 -0
  23. package/packs/dev-loop/commands/dev-loop.md +72 -0
  24. package/packs/dev-loop/commands/dev-plan.md +351 -0
  25. package/packs/dev-loop/hooks/hooks.json +15 -0
  26. package/packs/dev-loop/hooks/stop-hook.sh +178 -0
  27. package/packs/dev-loop/scripts/setup-dev-loop.sh +194 -0
  28. package/packs/dev-loop/skills/tdd-planner/SKILL.md +249 -0
  29. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +874 -0
  30. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +260 -0
  31. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +275 -0
  32. package/packs/django/CHANGELOG.md +39 -0
  33. package/packs/django/README.md +92 -0
  34. package/packs/django/agents/django-architect.md +182 -0
  35. package/packs/django/agents/django-builder.md +250 -0
  36. package/packs/django/agents/django-feature-based.md +420 -0
  37. package/packs/django/agents/django-reviewer.md +253 -0
  38. package/packs/django/agents/django-tester.md +230 -0
  39. package/packs/django/commands/api-endpoint.md +285 -0
  40. package/packs/django/commands/model-create.md +178 -0
  41. package/packs/django/commands/test-generate.md +325 -0
  42. package/packs/django/rules/migrations.md +138 -0
  43. package/packs/django/rules/models.md +167 -0
  44. package/packs/django/rules/serializers.md +126 -0
  45. package/packs/django/rules/services.md +131 -0
  46. package/packs/django/rules/tests.md +140 -0
  47. package/packs/django/rules/views.md +102 -0
  48. package/packs/django/skills/import-convention-enforcer/SKILL.md +226 -0
  49. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +343 -0
  50. package/packs/django/skills/migration-safety-checker/SKILL.md +375 -0
  51. package/packs/django/skills/model-entity-validator/SKILL.md +298 -0
  52. package/packs/django/skills/performance-optimizer/SKILL.md +447 -0
  53. package/packs/django/skills/red-phase-verifier/SKILL.md +180 -0
  54. package/packs/django/skills/security-first-validator/SKILL.md +435 -0
  55. package/packs/django/skills/test-coverage-advisor/SKILL.md +394 -0
  56. package/packs/django/skills/test-validity-checker/SKILL.md +194 -0
  57. package/packs/failure-log/.claude-plugin/plugin.json +14 -0
  58. package/packs/failure-log/CHANGELOG.md +20 -0
  59. package/packs/failure-log/README.md +168 -0
  60. package/packs/failure-log/commands/failure-add.md +106 -0
  61. package/packs/failure-log/commands/failure-list.md +89 -0
  62. package/packs/failure-log/hooks/hooks.json +16 -0
  63. package/packs/failure-log/hooks/scripts/inject-failures.sh +64 -0
  64. package/packs/failure-log/skills/failure-log-manager/SKILL.md +164 -0
  65. package/packs/flutter/.claude-plugin/plugin.json +10 -0
  66. package/packs/flutter/CHANGELOG.md +19 -0
  67. package/packs/flutter/README.md +170 -0
  68. package/packs/flutter/agents/flutter-architect.md +166 -0
  69. package/packs/flutter/agents/flutter-builder.md +303 -0
  70. package/packs/flutter/agents/release-manager.md +355 -0
  71. package/packs/flutter/commands/fastlane-setup.md +188 -0
  72. package/packs/flutter/commands/flutter-build.md +90 -0
  73. package/packs/flutter/commands/flutter-deploy.md +133 -0
  74. package/packs/flutter/commands/flutter-test.md +117 -0
  75. package/packs/flutter/commands/signing-setup.md +209 -0
  76. package/packs/flutter/hooks/hooks.json +17 -0
  77. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +193 -0
  78. package/packs/flutter/skills/flutter-architecture/SKILL.md +127 -0
  79. package/packs/flutter/skills/store-publishing/SKILL.md +163 -0
  80. package/packs/hono/.claude-plugin/plugin.json +19 -0
  81. package/packs/hono/CHANGELOG.md +19 -0
  82. package/packs/hono/README.md +143 -0
  83. package/packs/hono/agents/hono-architect.md +240 -0
  84. package/packs/hono/agents/hono-builder.md +285 -0
  85. package/packs/hono/agents/hono-reviewer.md +279 -0
  86. package/packs/hono/agents/hono-tester.md +346 -0
  87. package/packs/hono/commands/middleware-create.md +223 -0
  88. package/packs/hono/commands/project-init.md +306 -0
  89. package/packs/hono/commands/route-create.md +153 -0
  90. package/packs/hono/commands/rpc-client.md +263 -0
  91. package/packs/hono/hooks/hooks.json +4 -0
  92. package/packs/hono/skills/cloudflare-bindings/SKILL.md +408 -0
  93. package/packs/hono/skills/hono-patterns/SKILL.md +309 -0
  94. package/packs/hono/skills/rpc-typesafe/SKILL.md +388 -0
  95. package/packs/hono/skills/zod-validation/SKILL.md +332 -0
  96. package/packs/nestjs/CHANGELOG.md +29 -0
  97. package/packs/nestjs/README.md +75 -0
  98. package/packs/nestjs/agents/nestjs-architect.md +402 -0
  99. package/packs/nestjs/agents/nestjs-builder.md +301 -0
  100. package/packs/nestjs/agents/nestjs-tester.md +437 -0
  101. package/packs/nestjs/commands/module-create.md +369 -0
  102. package/packs/nestjs/rules/controllers.md +92 -0
  103. package/packs/nestjs/rules/dto.md +124 -0
  104. package/packs/nestjs/rules/entities.md +102 -0
  105. package/packs/nestjs/rules/services.md +106 -0
  106. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +389 -0
  107. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +365 -0
  108. package/packs/nextjs/CHANGELOG.md +36 -0
  109. package/packs/nextjs/README.md +76 -0
  110. package/packs/nextjs/agents/frontend-tester.md +680 -0
  111. package/packs/nextjs/agents/frontend-visual.md +820 -0
  112. package/packs/nextjs/agents/nextjs-architect.md +331 -0
  113. package/packs/nextjs/agents/nextjs-modular.md +433 -0
  114. package/packs/nextjs/commands/component-create.md +398 -0
  115. package/packs/nextjs/rules/api-routes.md +129 -0
  116. package/packs/nextjs/rules/components.md +106 -0
  117. package/packs/nextjs/rules/hooks.md +132 -0
  118. package/packs/nextjs/skills/accessibility-validator/SKILL.md +445 -0
  119. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +399 -0
  120. package/packs/nextjs/skills/react-form-validator/SKILL.md +569 -0
  121. package/packs/nuxtjs/CHANGELOG.md +30 -0
  122. package/packs/nuxtjs/README.md +56 -0
  123. package/packs/nuxtjs/agents/frontend-tester.md +680 -0
  124. package/packs/nuxtjs/agents/frontend-visual.md +820 -0
  125. package/packs/nuxtjs/agents/nuxtjs-architect.md +537 -0
  126. package/packs/nuxtjs/commands/component-create.md +223 -0
  127. package/packs/nuxtjs/rules/components.md +101 -0
  128. package/packs/nuxtjs/rules/composables.md +118 -0
  129. package/packs/nuxtjs/rules/server-routes.md +127 -0
  130. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +183 -0
  131. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +196 -0
  132. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +190 -0
  133. package/packs/onboard/CHANGELOG.md +22 -0
  134. package/packs/onboard/README.md +103 -0
  135. package/packs/onboard/agents/onboard-guide.md +118 -0
  136. package/packs/onboard/commands/onboard.md +313 -0
  137. package/packs/onboard/skills/onboard-context-provider/SKILL.md +98 -0
  138. package/packs/tanstack-router/.claude-plugin/plugin.json +14 -0
  139. package/packs/tanstack-router/CHANGELOG.md +30 -0
  140. package/packs/tanstack-router/README.md +113 -0
  141. package/packs/tanstack-router/agents/tanstack-architect.md +173 -0
  142. package/packs/tanstack-router/agents/tanstack-builder.md +360 -0
  143. package/packs/tanstack-router/agents/tanstack-tester.md +454 -0
  144. package/packs/tanstack-router/commands/form-create.md +313 -0
  145. package/packs/tanstack-router/commands/query-create.md +263 -0
  146. package/packs/tanstack-router/commands/route-create.md +190 -0
  147. package/packs/tanstack-router/commands/table-create.md +413 -0
  148. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +370 -0
  149. package/packs/tanstack-router/skills/db-patterns/SKILL.md +346 -0
  150. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +415 -0
  151. package/packs/tanstack-router/skills/form-patterns/SKILL.md +425 -0
  152. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +341 -0
  153. package/packs/tanstack-router/skills/query-patterns/SKILL.md +359 -0
  154. package/packs/tanstack-router/skills/router-patterns/SKILL.md +285 -0
  155. package/packs/tanstack-router/skills/store-patterns/SKILL.md +351 -0
  156. package/packs/tanstack-router/skills/table-patterns/SKILL.md +531 -0
  157. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +428 -0
  158. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +490 -0
  159. package/packs/worktree/.claude-plugin/plugin.json +19 -0
  160. package/packs/worktree/CHANGELOG.md +24 -0
  161. package/packs/worktree/README.md +110 -0
  162. package/packs/worktree/commands/wt.md +73 -0
  163. package/packs/worktree/scripts/wt.sh +396 -0
  164. package/packs/worktree/skills/worktree-manager/SKILL.md +68 -0
@@ -0,0 +1,399 @@
1
+ ---
2
+ name: nextjs-import-enforcer
3
+ description: Automatically enforce consistent import patterns using Next.js path aliases and proper organization. Use when writing imports, creating new files, or organizing code structure.
4
+ ---
5
+
6
+ # Import Convention Enforcer (Next.js/React)
7
+
8
+ Auto-enforces consistent import patterns using Next.js path aliases for clean, maintainable code.
9
+
10
+ ## Activation Triggers
11
+
12
+ This skill activates when:
13
+ - Writing or modifying TypeScript/JavaScript files
14
+ - Creating new components, hooks, utilities
15
+ - Importing from other files
16
+ - Organizing project structure
17
+ - Mentioning "import", "add", "create"
18
+
19
+ ## Required Import Pattern (MANDATORY)
20
+
21
+ Use path aliases for internal imports:
22
+
23
+ ```tsx
24
+ // ✅ CORRECT - Path aliases
25
+ import { Button } from '@/components/ui'
26
+ import { useAuth } from '@/hooks'
27
+ import { formatDate } from '@/lib/utils'
28
+ import { User } from '@/types'
29
+
30
+ // ❌ WRONG - Relative paths
31
+ import { Button } from '../../components/ui/Button'
32
+ import { useAuth } from '../../../hooks/useAuth'
33
+ ```
34
+
35
+ ## Path Alias Configuration
36
+
37
+ **tsconfig.json:**
38
+ ```json
39
+ {
40
+ "compilerOptions": {
41
+ "baseUrl": ".",
42
+ "paths": {
43
+ "@/*": ["./src/*"],
44
+ "@/components/*": ["./src/components/*"],
45
+ "@/lib/*": ["./src/lib/*"],
46
+ "@/hooks/*": ["./src/hooks/*"],
47
+ "@/types/*": ["./src/types/*"],
48
+ "@/app/*": ["./src/app/*"]
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## Auto-Fix Process
55
+
56
+ ### Step 1: Detect Relative Imports
57
+
58
+ ```tsx
59
+ // ❌ User writes
60
+ import { Button } from '../../../components/ui/Button'
61
+ import { Card } from '../../components/ui/Card'
62
+ import { useUser } from '../hooks/useUser'
63
+ ```
64
+
65
+ ### Step 2: Convert to Path Aliases
66
+
67
+ ```tsx
68
+ // ✅ Auto-fixed to
69
+ import { Button } from '@/components/ui'
70
+ import { Card } from '@/components/ui'
71
+ import { useUser } from '@/hooks'
72
+ ```
73
+
74
+ ### Step 3: Organize Imports
75
+
76
+ ```tsx
77
+ // ✅ Final organized imports
78
+ // 1. React/Next.js
79
+ import { useState } from 'react'
80
+ import Link from 'next/link'
81
+
82
+ // 2. Third-party libraries
83
+ import { z } from 'zod'
84
+ import { useForm } from 'react-hook-form'
85
+
86
+ // 3. Internal - path aliases
87
+ import { Button, Card } from '@/components/ui'
88
+ import { useUser } from '@/hooks'
89
+ import { formatDate } from '@/lib/utils'
90
+ import type { User } from '@/types'
91
+ ```
92
+
93
+ ## Import Organization Rules
94
+
95
+ ### 1. Import Order (Top to Bottom)
96
+
97
+ ```tsx
98
+ // 1. React/Next.js core
99
+ import { useState, useEffect } from 'react'
100
+ import Image from 'next/image'
101
+ import Link from 'next/link'
102
+
103
+ // 2. Third-party libraries
104
+ import { z } from 'zod'
105
+ import clsx from 'clsx'
106
+
107
+ // 3. Internal modules (using @/ aliases)
108
+ import { Button } from '@/components/ui'
109
+ import { useAuth } from '@/hooks'
110
+ import { api } from '@/lib/api'
111
+
112
+ // 4. Types (separate or with type keyword)
113
+ import type { User, Post } from '@/types'
114
+
115
+ // 5. Styles (if needed)
116
+ import styles from './Component.module.css'
117
+ ```
118
+
119
+ ### 2. Named Imports (Alphabetical)
120
+
121
+ ```tsx
122
+ // ✅ CORRECT - Alphabetical
123
+ import { Button, Card, Dialog, Input } from '@/components/ui'
124
+
125
+ // ❌ WRONG - Random order
126
+ import { Dialog, Input, Button, Card } from '@/components/ui'
127
+ ```
128
+
129
+ ### 3. Type-Only Imports
130
+
131
+ ```tsx
132
+ // ✅ CORRECT - Explicit type imports
133
+ import type { User } from '@/types'
134
+ import type { ButtonProps } from '@/components/ui'
135
+
136
+ // ✅ CORRECT - Inline type keyword
137
+ import { type User, type Post } from '@/types'
138
+ ```
139
+
140
+ ## Path Alias Patterns by Directory
141
+
142
+ ### Components
143
+
144
+ ```tsx
145
+ // UI components
146
+ import { Button, Card, Input } from '@/components/ui'
147
+
148
+ // Feature components
149
+ import { UserProfile } from '@/components/features'
150
+
151
+ // Layout components
152
+ import { Header, Footer } from '@/components/layout'
153
+ ```
154
+
155
+ ### Hooks
156
+
157
+ ```tsx
158
+ // Custom hooks
159
+ import { useAuth, useUser, useLocalStorage } from '@/hooks'
160
+
161
+ // Or specific hook files
162
+ import { useAuth } from '@/hooks/useAuth'
163
+ ```
164
+
165
+ ### Utilities/Lib
166
+
167
+ ```tsx
168
+ // Utilities
169
+ import { cn, formatDate, truncate } from '@/lib/utils'
170
+
171
+ // API client
172
+ import { api } from '@/lib/api'
173
+
174
+ // Constants
175
+ import { ROUTES, API_URL } from '@/lib/constants'
176
+ ```
177
+
178
+ ### Types
179
+
180
+ ```tsx
181
+ // All types from types directory
182
+ import type { User, Post, Comment } from '@/types'
183
+
184
+ // Or specific type files
185
+ import type { ApiResponse } from '@/types/api'
186
+ ```
187
+
188
+ ### App Router (Next.js 13+)
189
+
190
+ ```tsx
191
+ // Route components/utilities
192
+ import { generateMetadata } from '@/app/utils'
193
+ import { PageProps } from '@/app/types'
194
+ ```
195
+
196
+ ## Barrel Exports (index.ts)
197
+
198
+ Encourage barrel exports for cleaner imports:
199
+
200
+ ```tsx
201
+ // components/ui/index.ts
202
+ export { Button } from './Button'
203
+ export { Card } from './Card'
204
+ export { Input } from './Input'
205
+ export { Dialog } from './Dialog'
206
+
207
+ // Usage - clean!
208
+ import { Button, Card, Input } from '@/components/ui'
209
+ ```
210
+
211
+ ## Dynamic Imports
212
+
213
+ ```tsx
214
+ // ✅ CORRECT - Dynamic import with path alias
215
+ const Chart = dynamic(() => import('@/components/Chart'), {
216
+ loading: () => <Skeleton />,
217
+ ssr: false,
218
+ })
219
+
220
+ // ❌ WRONG - Relative path
221
+ const Chart = dynamic(() => import('../../components/Chart'))
222
+ ```
223
+
224
+ ## Server/Client Component Imports
225
+
226
+ ```tsx
227
+ // Server Component
228
+ import { db } from '@/lib/database' // Server-only
229
+ import { ServerComponent } from '@/components/server'
230
+
231
+ // Client Component
232
+ 'use client'
233
+ import { useState } from 'react'
234
+ import { Button } from '@/components/ui' // Client component
235
+ ```
236
+
237
+ ## CSS/Style Imports
238
+
239
+ ```tsx
240
+ // ✅ CORRECT - At the end
241
+ import { Button } from '@/components/ui'
242
+ import styles from './Component.module.css'
243
+
244
+ // ✅ CORRECT - Global styles in _app or layout
245
+ import '@/styles/globals.css'
246
+ ```
247
+
248
+ ## Image Imports
249
+
250
+ ```tsx
251
+ // ✅ CORRECT - Next.js Image with path alias
252
+ import Image from 'next/image'
253
+ import logo from '@/public/logo.png'
254
+
255
+ // ✅ CORRECT - Public path
256
+ <Image src="/logo.png" alt="Logo" width={200} height={50} />
257
+ ```
258
+
259
+ ## Common Violations
260
+
261
+ ### Violation 1: Deep Relative Paths
262
+
263
+ ```tsx
264
+ // ❌ WRONG
265
+ import { Button } from '../../../components/ui/Button'
266
+
267
+ // ✅ CORRECT
268
+ import { Button } from '@/components/ui'
269
+ ```
270
+
271
+ ### Violation 2: Missing Barrel Export
272
+
273
+ ```tsx
274
+ // ❌ WRONG - Importing from specific files
275
+ import { Button } from '@/components/ui/Button'
276
+ import { Card } from '@/components/ui/Card'
277
+
278
+ // ✅ CORRECT - Import from barrel
279
+ import { Button, Card } from '@/components/ui'
280
+ ```
281
+
282
+ ### Violation 3: Mixing Import Styles
283
+
284
+ ```tsx
285
+ // ❌ WRONG - Inconsistent
286
+ import { Button } from '@/components/ui'
287
+ import { useAuth } from '../../hooks/useAuth' // Relative!
288
+
289
+ // ✅ CORRECT - All use aliases
290
+ import { Button } from '@/components/ui'
291
+ import { useAuth } from '@/hooks'
292
+ ```
293
+
294
+ ### Violation 4: Type Import Without Keyword
295
+
296
+ ```tsx
297
+ // ❌ WRONG - Importing type as value
298
+ import { User } from '@/types' // Adds to bundle
299
+
300
+ // ✅ CORRECT - Explicit type import
301
+ import type { User } from '@/types' // No runtime cost
302
+ ```
303
+
304
+ ## Project Structure Best Practices
305
+
306
+ ```
307
+ src/
308
+ ├── app/ # Next.js App Router
309
+ │ ├── (auth)/
310
+ │ ├── (dashboard)/
311
+ │ └── api/
312
+ ├── components/
313
+ │ ├── ui/ # Shadcn components
314
+ │ │ ├── button.tsx
315
+ │ │ ├── card.tsx
316
+ │ │ └── index.ts # Barrel export
317
+ │ ├── features/ # Feature components
318
+ │ └── layout/ # Layout components
319
+ ├── hooks/
320
+ │ ├── useAuth.ts
321
+ │ ├── useUser.ts
322
+ │ └── index.ts # Barrel export
323
+ ├── lib/
324
+ │ ├── api.ts
325
+ │ ├── utils.ts
326
+ │ └── constants.ts
327
+ ├── types/
328
+ │ ├── api.ts
329
+ │ ├── models.ts
330
+ │ └── index.ts # Barrel export
331
+ └── styles/
332
+ └── globals.css
333
+ ```
334
+
335
+ ## ESLint Integration
336
+
337
+ Suggest ESLint rules:
338
+
339
+ ```json
340
+ {
341
+ "rules": {
342
+ "import/order": [
343
+ "error",
344
+ {
345
+ "groups": [
346
+ "builtin",
347
+ "external",
348
+ "internal",
349
+ "parent",
350
+ "sibling",
351
+ "index"
352
+ ],
353
+ "pathGroups": [
354
+ {
355
+ "pattern": "@/**",
356
+ "group": "internal",
357
+ "position": "after"
358
+ }
359
+ ],
360
+ "alphabetize": {
361
+ "order": "asc"
362
+ }
363
+ }
364
+ ],
365
+ "import/no-relative-packages": "error"
366
+ }
367
+ }
368
+ ```
369
+
370
+ ## Success Criteria
371
+
372
+ ✅ ALL internal imports use path aliases
373
+ ✅ NO deep relative paths (../..)
374
+ ✅ Barrel exports for component directories
375
+ ✅ Imports organized by category
376
+ ✅ Type imports use `type` keyword
377
+ ✅ Consistent import style across project
378
+
379
+ ## Behavior
380
+
381
+ **Proactive enforcement:**
382
+ - Detect relative imports automatically
383
+ - Convert to path aliases immediately
384
+ - Organize import order
385
+ - Suggest barrel exports
386
+ - Explain import patterns
387
+
388
+ **Never:**
389
+ - Require explicit "fix imports" request
390
+ - Allow deep relative paths
391
+ - Wait for linter errors
392
+
393
+ **Always:**
394
+ - Use `@/` path aliases
395
+ - Organize imports by category
396
+ - Add barrel exports where beneficial
397
+ - Add type keyword for type imports
398
+
399
+ This ensures clean, maintainable import structure from day one.