@smicolon/ai-kit 0.3.1 → 0.4.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 (156) hide show
  1. package/README.md +73 -40
  2. package/dist/index.js +260 -126
  3. package/package.json +5 -5
  4. package/.claude-plugin/marketplace.json +0 -373
  5. package/packs/architect/CHANGELOG.md +0 -17
  6. package/packs/architect/README.md +0 -58
  7. package/packs/architect/agents/system-architect.md +0 -768
  8. package/packs/architect/commands/diagram-create.md +0 -300
  9. package/packs/better-auth/.mcp.json +0 -14
  10. package/packs/better-auth/CHANGELOG.md +0 -26
  11. package/packs/better-auth/README.md +0 -125
  12. package/packs/better-auth/agents/auth-architect.md +0 -278
  13. package/packs/better-auth/commands/auth-provider-add.md +0 -265
  14. package/packs/better-auth/commands/auth-setup.md +0 -298
  15. package/packs/better-auth/skills/auth-security/SKILL.md +0 -425
  16. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +0 -455
  17. package/packs/dev-loop/CHANGELOG.md +0 -69
  18. package/packs/dev-loop/README.md +0 -155
  19. package/packs/dev-loop/commands/cancel-dev.md +0 -21
  20. package/packs/dev-loop/commands/dev-loop.md +0 -72
  21. package/packs/dev-loop/commands/dev-plan.md +0 -351
  22. package/packs/dev-loop/hooks/hooks.json +0 -15
  23. package/packs/dev-loop/hooks/stop-hook.sh +0 -178
  24. package/packs/dev-loop/scripts/setup-dev-loop.sh +0 -194
  25. package/packs/dev-loop/skills/tdd-planner/SKILL.md +0 -249
  26. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +0 -874
  27. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +0 -260
  28. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +0 -275
  29. package/packs/django/CHANGELOG.md +0 -39
  30. package/packs/django/README.md +0 -92
  31. package/packs/django/agents/django-architect.md +0 -182
  32. package/packs/django/agents/django-builder.md +0 -250
  33. package/packs/django/agents/django-feature-based.md +0 -420
  34. package/packs/django/agents/django-reviewer.md +0 -253
  35. package/packs/django/agents/django-tester.md +0 -230
  36. package/packs/django/commands/api-endpoint.md +0 -285
  37. package/packs/django/commands/model-create.md +0 -178
  38. package/packs/django/commands/test-generate.md +0 -325
  39. package/packs/django/rules/migrations.md +0 -138
  40. package/packs/django/rules/models.md +0 -167
  41. package/packs/django/rules/serializers.md +0 -126
  42. package/packs/django/rules/services.md +0 -131
  43. package/packs/django/rules/tests.md +0 -140
  44. package/packs/django/rules/views.md +0 -102
  45. package/packs/django/skills/import-convention-enforcer/SKILL.md +0 -226
  46. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +0 -343
  47. package/packs/django/skills/migration-safety-checker/SKILL.md +0 -375
  48. package/packs/django/skills/model-entity-validator/SKILL.md +0 -298
  49. package/packs/django/skills/performance-optimizer/SKILL.md +0 -447
  50. package/packs/django/skills/red-phase-verifier/SKILL.md +0 -180
  51. package/packs/django/skills/security-first-validator/SKILL.md +0 -435
  52. package/packs/django/skills/test-coverage-advisor/SKILL.md +0 -394
  53. package/packs/django/skills/test-validity-checker/SKILL.md +0 -194
  54. package/packs/failure-log/CHANGELOG.md +0 -20
  55. package/packs/failure-log/README.md +0 -168
  56. package/packs/failure-log/commands/failure-add.md +0 -106
  57. package/packs/failure-log/commands/failure-list.md +0 -89
  58. package/packs/failure-log/hooks/hooks.json +0 -16
  59. package/packs/failure-log/hooks/scripts/inject-failures.sh +0 -64
  60. package/packs/failure-log/skills/failure-log-manager/SKILL.md +0 -164
  61. package/packs/flutter/CHANGELOG.md +0 -19
  62. package/packs/flutter/README.md +0 -170
  63. package/packs/flutter/agents/flutter-architect.md +0 -166
  64. package/packs/flutter/agents/flutter-builder.md +0 -303
  65. package/packs/flutter/agents/release-manager.md +0 -355
  66. package/packs/flutter/commands/fastlane-setup.md +0 -188
  67. package/packs/flutter/commands/flutter-build.md +0 -90
  68. package/packs/flutter/commands/flutter-deploy.md +0 -133
  69. package/packs/flutter/commands/flutter-test.md +0 -117
  70. package/packs/flutter/commands/signing-setup.md +0 -209
  71. package/packs/flutter/hooks/hooks.json +0 -17
  72. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +0 -193
  73. package/packs/flutter/skills/flutter-architecture/SKILL.md +0 -127
  74. package/packs/flutter/skills/store-publishing/SKILL.md +0 -163
  75. package/packs/hono/CHANGELOG.md +0 -19
  76. package/packs/hono/README.md +0 -143
  77. package/packs/hono/agents/hono-architect.md +0 -240
  78. package/packs/hono/agents/hono-builder.md +0 -285
  79. package/packs/hono/agents/hono-reviewer.md +0 -279
  80. package/packs/hono/agents/hono-tester.md +0 -346
  81. package/packs/hono/commands/middleware-create.md +0 -223
  82. package/packs/hono/commands/project-init.md +0 -306
  83. package/packs/hono/commands/route-create.md +0 -153
  84. package/packs/hono/commands/rpc-client.md +0 -263
  85. package/packs/hono/hooks/hooks.json +0 -4
  86. package/packs/hono/skills/cloudflare-bindings/SKILL.md +0 -408
  87. package/packs/hono/skills/hono-patterns/SKILL.md +0 -309
  88. package/packs/hono/skills/rpc-typesafe/SKILL.md +0 -388
  89. package/packs/hono/skills/zod-validation/SKILL.md +0 -332
  90. package/packs/nestjs/CHANGELOG.md +0 -29
  91. package/packs/nestjs/README.md +0 -75
  92. package/packs/nestjs/agents/nestjs-architect.md +0 -402
  93. package/packs/nestjs/agents/nestjs-builder.md +0 -301
  94. package/packs/nestjs/agents/nestjs-tester.md +0 -437
  95. package/packs/nestjs/commands/module-create.md +0 -369
  96. package/packs/nestjs/rules/controllers.md +0 -92
  97. package/packs/nestjs/rules/dto.md +0 -124
  98. package/packs/nestjs/rules/entities.md +0 -102
  99. package/packs/nestjs/rules/services.md +0 -106
  100. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +0 -389
  101. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +0 -365
  102. package/packs/nextjs/CHANGELOG.md +0 -36
  103. package/packs/nextjs/README.md +0 -76
  104. package/packs/nextjs/agents/frontend-tester.md +0 -680
  105. package/packs/nextjs/agents/frontend-visual.md +0 -820
  106. package/packs/nextjs/agents/nextjs-architect.md +0 -331
  107. package/packs/nextjs/agents/nextjs-modular.md +0 -433
  108. package/packs/nextjs/commands/component-create.md +0 -398
  109. package/packs/nextjs/rules/api-routes.md +0 -129
  110. package/packs/nextjs/rules/components.md +0 -106
  111. package/packs/nextjs/rules/hooks.md +0 -132
  112. package/packs/nextjs/skills/accessibility-validator/SKILL.md +0 -445
  113. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +0 -399
  114. package/packs/nextjs/skills/react-form-validator/SKILL.md +0 -569
  115. package/packs/nuxtjs/CHANGELOG.md +0 -30
  116. package/packs/nuxtjs/README.md +0 -56
  117. package/packs/nuxtjs/agents/frontend-tester.md +0 -680
  118. package/packs/nuxtjs/agents/frontend-visual.md +0 -820
  119. package/packs/nuxtjs/agents/nuxtjs-architect.md +0 -537
  120. package/packs/nuxtjs/commands/component-create.md +0 -223
  121. package/packs/nuxtjs/rules/components.md +0 -101
  122. package/packs/nuxtjs/rules/composables.md +0 -118
  123. package/packs/nuxtjs/rules/server-routes.md +0 -127
  124. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +0 -183
  125. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +0 -196
  126. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +0 -190
  127. package/packs/onboard/CHANGELOG.md +0 -22
  128. package/packs/onboard/README.md +0 -103
  129. package/packs/onboard/agents/onboard-guide.md +0 -118
  130. package/packs/onboard/commands/onboard.md +0 -313
  131. package/packs/onboard/skills/onboard-context-provider/SKILL.md +0 -98
  132. package/packs/tanstack-router/CHANGELOG.md +0 -30
  133. package/packs/tanstack-router/README.md +0 -113
  134. package/packs/tanstack-router/agents/tanstack-architect.md +0 -173
  135. package/packs/tanstack-router/agents/tanstack-builder.md +0 -360
  136. package/packs/tanstack-router/agents/tanstack-tester.md +0 -454
  137. package/packs/tanstack-router/commands/form-create.md +0 -313
  138. package/packs/tanstack-router/commands/query-create.md +0 -263
  139. package/packs/tanstack-router/commands/route-create.md +0 -190
  140. package/packs/tanstack-router/commands/table-create.md +0 -413
  141. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +0 -370
  142. package/packs/tanstack-router/skills/db-patterns/SKILL.md +0 -346
  143. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +0 -415
  144. package/packs/tanstack-router/skills/form-patterns/SKILL.md +0 -425
  145. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +0 -341
  146. package/packs/tanstack-router/skills/query-patterns/SKILL.md +0 -359
  147. package/packs/tanstack-router/skills/router-patterns/SKILL.md +0 -285
  148. package/packs/tanstack-router/skills/store-patterns/SKILL.md +0 -351
  149. package/packs/tanstack-router/skills/table-patterns/SKILL.md +0 -531
  150. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +0 -428
  151. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +0 -490
  152. package/packs/worktree/CHANGELOG.md +0 -45
  153. package/packs/worktree/README.md +0 -219
  154. package/packs/worktree/commands/wt.md +0 -93
  155. package/packs/worktree/scripts/wt.sh +0 -957
  156. package/packs/worktree/skills/worktree-manager/SKILL.md +0 -113
@@ -1,415 +0,0 @@
1
- ---
2
- name: TanStack DevTools Patterns
3
- description: >-
4
- TanStack DevTools patterns for debugging and development. Activates when
5
- setting up development tools, debugging queries, or configuring developer
6
- experience in React applications.
7
- version: 1.0.0
8
- ---
9
-
10
- # TanStack DevTools Patterns
11
-
12
- This skill covers TanStack DevTools setup and usage for debugging React applications.
13
-
14
- ## React Query DevTools
15
-
16
- ### Installation
17
- ```bash
18
- bun add -D @tanstack/react-query-devtools
19
- ```
20
-
21
- ### Basic Setup
22
- ```typescript
23
- // main.tsx
24
- import { QueryClientProvider } from '@tanstack/react-query'
25
- import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
26
- import { createQueryClient } from '@/lib/query-client'
27
-
28
- const queryClient = createQueryClient()
29
-
30
- function App() {
31
- return (
32
- <QueryClientProvider client={queryClient}>
33
- <RouterProvider router={router} />
34
- <ReactQueryDevtools initialIsOpen={false} />
35
- </QueryClientProvider>
36
- )
37
- }
38
- ```
39
-
40
- ### Production Lazy Loading
41
- ```typescript
42
- // Only load devtools in development
43
- import { lazy, Suspense } from 'react'
44
-
45
- const ReactQueryDevtools = lazy(() =>
46
- import('@tanstack/react-query-devtools').then((d) => ({
47
- default: d.ReactQueryDevtools,
48
- }))
49
- )
50
-
51
- function App() {
52
- return (
53
- <QueryClientProvider client={queryClient}>
54
- <RouterProvider router={router} />
55
- {import.meta.env.DEV && (
56
- <Suspense fallback={null}>
57
- <ReactQueryDevtools />
58
- </Suspense>
59
- )}
60
- </QueryClientProvider>
61
- )
62
- }
63
- ```
64
-
65
- ### DevTools Configuration
66
- ```typescript
67
- <ReactQueryDevtools
68
- initialIsOpen={false}
69
- position="bottom-right"
70
- buttonPosition="bottom-right"
71
- toggleButtonProps={{
72
- style: {
73
- marginBottom: '4rem', // Avoid overlapping with other UI
74
- },
75
- }}
76
- />
77
- ```
78
-
79
- ### Embedded DevTools
80
- ```typescript
81
- import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
82
-
83
- function AdminDashboard() {
84
- const [isOpen, setIsOpen] = useState(false)
85
-
86
- return (
87
- <div>
88
- <button onClick={() => setIsOpen(!isOpen)}>
89
- Toggle Query Inspector
90
- </button>
91
- {isOpen && (
92
- <div className="devtools-panel">
93
- <ReactQueryDevtoolsPanel />
94
- </div>
95
- )}
96
- </div>
97
- )
98
- }
99
- ```
100
-
101
- ## Router DevTools
102
-
103
- ### Installation
104
- ```bash
105
- bun add -D @tanstack/router-devtools
106
- ```
107
-
108
- ### Setup
109
- ```typescript
110
- // routes/__root.tsx
111
- import { TanStackRouterDevtools } from '@tanstack/router-devtools'
112
-
113
- export const Route = createRootRouteWithContext<RouterContext>()({
114
- component: () => (
115
- <>
116
- <Outlet />
117
- {import.meta.env.DEV && <TanStackRouterDevtools position="bottom-left" />}
118
- </>
119
- ),
120
- })
121
- ```
122
-
123
- ### Lazy Loading Router DevTools
124
- ```typescript
125
- import { lazy, Suspense } from 'react'
126
-
127
- const TanStackRouterDevtools = import.meta.env.DEV
128
- ? lazy(() =>
129
- import('@tanstack/router-devtools').then((d) => ({
130
- default: d.TanStackRouterDevtools,
131
- }))
132
- )
133
- : () => null
134
-
135
- export const Route = createRootRouteWithContext<RouterContext>()({
136
- component: () => (
137
- <>
138
- <Outlet />
139
- <Suspense fallback={null}>
140
- <TanStackRouterDevtools />
141
- </Suspense>
142
- </>
143
- ),
144
- })
145
- ```
146
-
147
- ## Combined DevTools Layout
148
-
149
- ```typescript
150
- // routes/__root.tsx
151
- import { lazy, Suspense } from 'react'
152
-
153
- const ReactQueryDevtools = lazy(() =>
154
- import('@tanstack/react-query-devtools').then((d) => ({
155
- default: d.ReactQueryDevtools,
156
- }))
157
- )
158
-
159
- const TanStackRouterDevtools = lazy(() =>
160
- import('@tanstack/router-devtools').then((d) => ({
161
- default: d.TanStackRouterDevtools,
162
- }))
163
- )
164
-
165
- export const Route = createRootRouteWithContext<RouterContext>()({
166
- component: () => (
167
- <>
168
- <Outlet />
169
- {import.meta.env.DEV && (
170
- <Suspense fallback={null}>
171
- <ReactQueryDevtools position="bottom-right" />
172
- <TanStackRouterDevtools position="bottom-left" />
173
- </Suspense>
174
- )}
175
- </>
176
- ),
177
- })
178
- ```
179
-
180
- ## Query Logging
181
-
182
- ### Development Logger
183
- ```typescript
184
- // lib/query-client.ts
185
- import { QueryClient } from '@tanstack/react-query'
186
-
187
- export function createQueryClient() {
188
- return new QueryClient({
189
- defaultOptions: {
190
- queries: {
191
- // ... other options
192
- },
193
- },
194
- ...(import.meta.env.DEV && {
195
- logger: {
196
- log: console.log,
197
- warn: console.warn,
198
- error: console.error,
199
- },
200
- }),
201
- })
202
- }
203
- ```
204
-
205
- ### Custom Query Logger
206
- ```typescript
207
- const queryClient = new QueryClient({
208
- queryCache: new QueryCache({
209
- onError: (error, query) => {
210
- if (import.meta.env.DEV) {
211
- console.error(`Query Error [${query.queryKey}]:`, error)
212
- }
213
- },
214
- onSuccess: (data, query) => {
215
- if (import.meta.env.DEV) {
216
- console.log(`Query Success [${query.queryKey}]:`, data)
217
- }
218
- },
219
- }),
220
- mutationCache: new MutationCache({
221
- onError: (error, variables, context, mutation) => {
222
- if (import.meta.env.DEV) {
223
- console.error(`Mutation Error:`, error, variables)
224
- }
225
- },
226
- }),
227
- })
228
- ```
229
-
230
- ## Performance Monitoring
231
-
232
- ### Query Timing
233
- ```typescript
234
- const queryClient = new QueryClient({
235
- queryCache: new QueryCache({
236
- onSuccess: (data, query) => {
237
- if (import.meta.env.DEV) {
238
- const timing = query.state.dataUpdatedAt - query.state.fetchFailureCount
239
- console.log(`[${query.queryKey}] fetched in ${timing}ms`)
240
- }
241
- },
242
- }),
243
- })
244
- ```
245
-
246
- ### React Profiler Integration
247
- ```typescript
248
- import { Profiler } from 'react'
249
-
250
- function App() {
251
- const onRender = (
252
- id: string,
253
- phase: 'mount' | 'update',
254
- actualDuration: number
255
- ) => {
256
- if (import.meta.env.DEV && actualDuration > 16) {
257
- console.warn(`Slow render: ${id} (${phase}) - ${actualDuration.toFixed(2)}ms`)
258
- }
259
- }
260
-
261
- return (
262
- <Profiler id="App" onRender={onRender}>
263
- <QueryClientProvider client={queryClient}>
264
- <RouterProvider router={router} />
265
- </QueryClientProvider>
266
- </Profiler>
267
- )
268
- }
269
- ```
270
-
271
- ## Debug Utilities
272
-
273
- ### Query State Inspector Hook
274
- ```typescript
275
- import { useQueryClient } from '@tanstack/react-query'
276
-
277
- function useQueryInspector() {
278
- const queryClient = useQueryClient()
279
-
280
- return {
281
- getQueryState: (queryKey: unknown[]) =>
282
- queryClient.getQueryState(queryKey),
283
-
284
- getQueriesData: () =>
285
- queryClient.getQueriesData({ type: 'all' }),
286
-
287
- invalidateAll: () =>
288
- queryClient.invalidateQueries(),
289
-
290
- clearAll: () =>
291
- queryClient.clear(),
292
- }
293
- }
294
-
295
- // Usage in development
296
- function DevPanel() {
297
- const inspector = useQueryInspector()
298
-
299
- return (
300
- <div>
301
- <button onClick={() => console.log(inspector.getQueriesData())}>
302
- Log All Queries
303
- </button>
304
- <button onClick={inspector.invalidateAll}>
305
- Invalidate All
306
- </button>
307
- <button onClick={inspector.clearAll}>
308
- Clear Cache
309
- </button>
310
- </div>
311
- )
312
- }
313
- ```
314
-
315
- ### Route State Inspector
316
- ```typescript
317
- import { useRouter, useMatches } from '@tanstack/react-router'
318
-
319
- function RouteInspector() {
320
- const router = useRouter()
321
- const matches = useMatches()
322
-
323
- if (!import.meta.env.DEV) return null
324
-
325
- return (
326
- <div className="fixed bottom-20 left-4 bg-black/90 text-white p-4 rounded text-xs">
327
- <pre>
328
- {JSON.stringify(
329
- {
330
- pathname: router.state.location.pathname,
331
- search: router.state.location.search,
332
- matches: matches.map((m) => m.routeId),
333
- },
334
- null,
335
- 2
336
- )}
337
- </pre>
338
- </div>
339
- )
340
- }
341
- ```
342
-
343
- ## Vite Configuration
344
-
345
- ```typescript
346
- // vite.config.ts
347
- import { defineConfig } from 'vite'
348
-
349
- export default defineConfig({
350
- define: {
351
- // Strip devtools from production
352
- 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
353
- },
354
- build: {
355
- rollupOptions: {
356
- // Exclude devtools from production bundle
357
- external: import.meta.env.PROD
358
- ? ['@tanstack/react-query-devtools', '@tanstack/router-devtools']
359
- : [],
360
- },
361
- },
362
- })
363
- ```
364
-
365
- ## Conventions
366
-
367
- 1. **Lazy load devtools** - Always lazy load to reduce bundle size
368
- 2. **Environment check** - Only render in development
369
- 3. **Position wisely** - Avoid overlapping with app UI
370
- 4. **Production strip** - Ensure devtools are excluded from prod
371
- 5. **Custom logging** - Add meaningful logging in development
372
-
373
- ## Anti-Patterns
374
-
375
- ```typescript
376
- // ❌ WRONG: DevTools in production bundle
377
- import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
378
-
379
- function App() {
380
- return (
381
- <>
382
- <Main />
383
- <ReactQueryDevtools /> {/* Always included! */}
384
- </>
385
- )
386
- }
387
-
388
- // ✅ CORRECT: Conditional and lazy loaded
389
- const ReactQueryDevtools = lazy(() =>
390
- import('@tanstack/react-query-devtools').then((d) => ({
391
- default: d.ReactQueryDevtools,
392
- }))
393
- )
394
-
395
- function App() {
396
- return (
397
- <>
398
- <Main />
399
- {import.meta.env.DEV && (
400
- <Suspense fallback={null}>
401
- <ReactQueryDevtools />
402
- </Suspense>
403
- )}
404
- </>
405
- )
406
- }
407
-
408
- // ❌ WRONG: No position configuration (overlapping)
409
- <ReactQueryDevtools />
410
- <TanStackRouterDevtools />
411
-
412
- // ✅ CORRECT: Different positions
413
- <ReactQueryDevtools position="bottom-right" />
414
- <TanStackRouterDevtools position="bottom-left" />
415
- ```