@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,127 @@
1
+ ---
2
+ name: flutter-architecture
3
+ description: >-
4
+ Provides Flutter app architecture patterns with feature-first structure, clean architecture,
5
+ and state management (Bloc, Riverpod, Provider). Use when user asks about Flutter project
6
+ structure, state management selection, dependency injection, or designing Flutter app architecture.
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # Flutter Architecture Patterns
11
+
12
+ Apply these patterns when designing or implementing Flutter applications.
13
+
14
+ ## Feature-First Project Structure
15
+
16
+ Organize Flutter projects by feature, not by layer:
17
+
18
+ ```
19
+ lib/
20
+ ├── core/ # Shared infrastructure
21
+ │ ├── constants/ # App-wide constants
22
+ │ ├── errors/ # Error classes and handling
23
+ │ ├── extensions/ # Dart extensions
24
+ │ ├── network/ # HTTP client, interceptors
25
+ │ ├── theme/ # App theme, colors, typography
26
+ │ └── utils/ # Utility functions
27
+ ├── features/ # Feature modules
28
+ │ ├── auth/
29
+ │ │ ├── data/ # Data layer
30
+ │ │ │ ├── datasources/ # Remote and local data sources
31
+ │ │ │ ├── models/ # Data models (JSON serializable)
32
+ │ │ │ └── repositories/ # Repository implementations
33
+ │ │ ├── domain/ # Domain layer
34
+ │ │ │ ├── entities/ # Business entities
35
+ │ │ │ ├── repositories/ # Repository interfaces
36
+ │ │ │ └── usecases/ # Business logic
37
+ │ │ └── presentation/ # UI layer
38
+ │ │ ├── bloc/ # State management
39
+ │ │ ├── pages/ # Screen widgets
40
+ │ │ └── widgets/ # Feature-specific widgets
41
+ │ └── [other_features]/
42
+ ├── shared/ # Shared UI components
43
+ │ ├── widgets/ # Reusable widgets
44
+ │ └── services/ # Shared services
45
+ └── main.dart
46
+ ```
47
+
48
+ ## Clean Architecture Layers
49
+
50
+ ### Dependency Rule
51
+ - Presentation → Domain ← Data
52
+ - Domain has NO external dependencies
53
+ - Data implements Domain interfaces
54
+
55
+ ### Layer Responsibilities
56
+
57
+ **Presentation**: UI components, state management, user interaction handling
58
+ **Domain**: Business entities, use cases, repository contracts
59
+ **Data**: API calls, local storage, data transformation
60
+
61
+ ## State Management Selection
62
+
63
+ ### Use Bloc When:
64
+ - Building enterprise applications
65
+ - Need explicit state transitions
66
+ - Complex business logic with multiple states
67
+ - Team prefers reactive programming patterns
68
+
69
+ ### Use Riverpod When:
70
+ - Want compile-time safety for providers
71
+ - Need flexible dependency injection
72
+ - Building modern, testable applications
73
+ - Auto-dispose of resources is important
74
+
75
+ ### Use Provider When:
76
+ - Building simpler applications
77
+ - Team is new to Flutter
78
+ - Don't need complex state management
79
+ - Rapid prototyping
80
+
81
+ ## Key Dependencies
82
+
83
+ ```yaml
84
+ dependencies:
85
+ # State Management (choose one)
86
+ flutter_bloc: ^8.1.0 # Bloc
87
+ flutter_riverpod: ^2.4.0 # Riverpod
88
+ provider: ^6.1.0 # Provider
89
+
90
+ # Dependency Injection
91
+ get_it: ^7.6.0
92
+ injectable: ^2.3.0
93
+
94
+ # Navigation
95
+ go_router: ^13.0.0
96
+
97
+ # Networking
98
+ dio: ^5.4.0
99
+
100
+ # Code Generation
101
+ freezed_annotation: ^2.4.0
102
+ json_annotation: ^4.8.0
103
+
104
+ dev_dependencies:
105
+ build_runner: ^2.4.0
106
+ freezed: ^2.4.0
107
+ json_serializable: ^6.7.0
108
+ injectable_generator: ^2.4.0
109
+
110
+ # Testing
111
+ bloc_test: ^9.1.0
112
+ mocktail: ^1.0.0
113
+ ```
114
+
115
+ ## Quick Reference
116
+
117
+ | Aspect | Recommendation |
118
+ |--------|----------------|
119
+ | Structure | Feature-first |
120
+ | State | Bloc (enterprise), Riverpod (modern), Provider (simple) |
121
+ | DI | get_it + injectable |
122
+ | Navigation | go_router |
123
+ | HTTP | Dio |
124
+ | Immutability | Freezed |
125
+ | Testing | mocktail + bloc_test |
126
+
127
+ For detailed implementation examples, consult the flutter-architect agent.
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: store-publishing
3
+ description: >-
4
+ Provides App Store and Google Play publishing requirements, metadata management,
5
+ screenshot specifications, review guidelines, and compliance requirements.
6
+ Use when user asks about publishing apps, store requirements, app review, or store metadata.
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # Store Publishing Guide
11
+
12
+ Requirements and best practices for App Store and Google Play publishing.
13
+
14
+ ## App Store Connect (iOS)
15
+
16
+ ### Required Metadata
17
+ - App name (30 characters max)
18
+ - Subtitle (30 characters max)
19
+ - Description (4000 characters max)
20
+ - Keywords (100 characters, comma-separated)
21
+ - Support URL
22
+ - Marketing URL (optional)
23
+ - Privacy Policy URL (required)
24
+
25
+ ### Screenshots Required
26
+
27
+ | Device | Size | Required |
28
+ |--------|------|----------|
29
+ | iPhone 6.7" | 1290 x 2796 | Yes |
30
+ | iPhone 6.5" | 1284 x 2778 | Yes |
31
+ | iPhone 5.5" | 1242 x 2208 | Optional |
32
+ | iPad Pro 12.9" | 2048 x 2732 | If iPad supported |
33
+
34
+ ### App Review Guidelines
35
+ - No placeholder content
36
+ - Complete functionality
37
+ - Accurate screenshots
38
+ - Clear privacy policy
39
+ - No hidden features
40
+ - Proper age rating
41
+
42
+ ### Common Rejection Reasons
43
+ 1. Incomplete information
44
+ 2. Bugs or crashes
45
+ 3. Placeholder content
46
+ 4. Misleading screenshots
47
+ 5. Privacy policy issues
48
+ 6. Guideline 4.2 (minimum functionality)
49
+
50
+ ## Google Play Console (Android)
51
+
52
+ ### Required Metadata
53
+ - App name (50 characters max)
54
+ - Short description (80 characters max)
55
+ - Full description (4000 characters max)
56
+ - Application type
57
+ - Category
58
+ - Content rating
59
+ - Privacy policy URL
60
+
61
+ ### Graphics Required
62
+
63
+ | Asset | Size | Format |
64
+ |-------|------|--------|
65
+ | App icon | 512 x 512 | PNG (32-bit) |
66
+ | Feature graphic | 1024 x 500 | PNG/JPEG |
67
+ | Phone screenshots | 16:9 or 9:16 | PNG/JPEG |
68
+ | Tablet screenshots | 16:9 or 9:16 | If tablet supported |
69
+
70
+ ### Release Tracks
71
+
72
+ | Track | Purpose | Review |
73
+ |-------|---------|--------|
74
+ | Internal | Team testing | No review |
75
+ | Closed | Limited testers | No review |
76
+ | Open | Public beta | Light review |
77
+ | Production | Public release | Full review |
78
+
79
+ ### Data Safety Declaration
80
+ Required information about:
81
+ - Data collection practices
82
+ - Data sharing
83
+ - Security practices
84
+ - Data deletion options
85
+
86
+ ## Pre-Submission Checklist
87
+
88
+ ### iOS
89
+ - [ ] App icon (1024x1024)
90
+ - [ ] Screenshots for required devices
91
+ - [ ] Privacy policy URL accessible
92
+ - [ ] App description complete
93
+ - [ ] Keywords optimized
94
+ - [ ] Age rating set
95
+ - [ ] In-app purchases configured (if any)
96
+ - [ ] Export compliance answered
97
+
98
+ ### Android
99
+ - [ ] App icon (512x512)
100
+ - [ ] Feature graphic
101
+ - [ ] Screenshots uploaded
102
+ - [ ] Privacy policy URL
103
+ - [ ] Content rating questionnaire completed
104
+ - [ ] Data safety form completed
105
+ - [ ] Target API level compliance
106
+ - [ ] App signing by Google Play enabled
107
+
108
+ ## Store Listing Best Practices
109
+
110
+ ### App Name
111
+ - Include main keyword
112
+ - Keep concise and memorable
113
+ - Avoid generic terms
114
+
115
+ ### Description
116
+ - First 1-2 lines most important
117
+ - Include key features
118
+ - Use bullet points
119
+ - Add call to action
120
+ - Include keywords naturally
121
+
122
+ ### Screenshots
123
+ - Show actual app screens
124
+ - Add captions/overlays
125
+ - Highlight key features
126
+ - Use consistent style
127
+ - First screenshot most important
128
+
129
+ ## Version Management
130
+
131
+ ### Semantic Versioning
132
+ ```
133
+ MAJOR.MINOR.PATCH+BUILD
134
+ 1.2.3+45
135
+ ```
136
+
137
+ ### iOS Build Numbers
138
+ - Must increment for each upload
139
+ - Use CI build number
140
+
141
+ ### Android Version Codes
142
+ - Integer, must increment
143
+ - Use formula: `MAJOR*10000 + MINOR*100 + PATCH`
144
+
145
+ ## Release Notes Template
146
+
147
+ ```markdown
148
+ ## What's New in Version X.Y.Z
149
+
150
+ ### New Features
151
+ - Feature 1 description
152
+ - Feature 2 description
153
+
154
+ ### Improvements
155
+ - Improvement 1
156
+ - Improvement 2
157
+
158
+ ### Bug Fixes
159
+ - Fixed issue with...
160
+ - Resolved crash when...
161
+ ```
162
+
163
+ For automated store submissions, use the `/flutter-deploy` command.
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "hono",
3
+ "version": "0.1.0",
4
+ "description": "Hono web framework plugin for Claude Code - scaffolding, conventions, testing, and deployment for Bun and Cloudflare Workers",
5
+ "author": {
6
+ "name": "Smicolon",
7
+ "email": "dev@smicolon.com"
8
+ },
9
+ "repository": "https://github.com/smicolon/ai-kit",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "hono",
13
+ "bun",
14
+ "cloudflare-workers",
15
+ "edge",
16
+ "typescript",
17
+ "api"
18
+ ]
19
+ }
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to the smi-hono plugin will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Changed
8
+ - Renamed from `smi-hono` to `hono` as part of ai-kit migration
9
+ - Moved from `plugins/smi-hono/` to `packs/hono/`
10
+
11
+ ## [0.1.0] - 2025-01-02
12
+
13
+ ### Added
14
+ - Initial release (experimental)
15
+ - 4 agents: hono-architect, hono-builder, hono-tester, hono-reviewer
16
+ - 4 commands: route-create, middleware-create, project-init, rpc-client
17
+ - 4 skills: hono-patterns, cloudflare-bindings, zod-validation, rpc-typesafe
18
+ - Support for Bun and Cloudflare Workers
19
+ - Type-safe RPC client generation
@@ -0,0 +1,143 @@
1
+ # hono
2
+
3
+ Claude Code plugin for **Hono** - the ultrafast web framework for the Edge. Provides scaffolding, conventions, testing, and deployment support for Bun and Cloudflare Workers.
4
+
5
+ ## Features
6
+
7
+ - **4 Specialized Agents** for architecture, building, testing, and code review
8
+ - **4 Commands** for scaffolding routes, middleware, projects, and RPC clients
9
+ - **4 Auto-activating Skills** for Hono patterns, CF Workers bindings, Zod validation, and RPC
10
+ - **Convention Enforcement** via hooks
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ # Add Smicolon marketplace (if not already added)
16
+ /plugin marketplace add https://github.com/smicolon/ai-kit
17
+
18
+ # Install the plugin
19
+ /plugin install hono
20
+ ```
21
+
22
+ ## Agents
23
+
24
+ | Agent | Description |
25
+ |-------|-------------|
26
+ | `@hono-architect` | Design API architecture, project structure, routing organization |
27
+ | `@hono-builder` | Implement features, routes, middleware, handlers |
28
+ | `@hono-tester` | Write tests using Bun test or Vitest for CF Workers |
29
+ | `@hono-reviewer` | Security review, best practices, performance audit |
30
+
31
+ ### Usage
32
+
33
+ ```bash
34
+ @hono-architect "Design a REST API for user management with authentication"
35
+ @hono-builder "Implement the /users routes with CRUD operations"
36
+ @hono-tester "Write tests for the user service"
37
+ @hono-reviewer "Review the authentication middleware for security issues"
38
+ ```
39
+
40
+ ## Commands
41
+
42
+ | Command | Description |
43
+ |---------|-------------|
44
+ | `/route-create` | Create new routes with handlers, validators, and types |
45
+ | `/middleware-create` | Create custom middleware with proper typing |
46
+ | `/project-init` | Initialize a new Hono project (Bun/CF Workers) |
47
+ | `/rpc-client` | Generate type-safe RPC client from server routes |
48
+
49
+ ### Usage
50
+
51
+ ```bash
52
+ /route-create
53
+ /middleware-create
54
+ /project-init
55
+ /rpc-client
56
+ ```
57
+
58
+ ## Skills (Auto-activating)
59
+
60
+ These skills automatically activate based on context:
61
+
62
+ | Skill | Triggers When |
63
+ |-------|---------------|
64
+ | `hono-patterns` | Writing Hono routes, handlers, middleware |
65
+ | `cloudflare-bindings` | Working with KV, D1, R2, Durable Objects |
66
+ | `zod-validation` | Form/JSON validation in Hono handlers |
67
+ | `rpc-typesafe` | Setting up type-safe client-server communication |
68
+
69
+ ## Conventions Enforced
70
+
71
+ ### Project Structure
72
+
73
+ ```
74
+ src/
75
+ ├── routes/ # Route handlers organized by resource
76
+ │ ├── users.ts
77
+ │ └── posts.ts
78
+ ├── middleware/ # Custom middleware
79
+ │ ├── auth.ts
80
+ │ └── logger.ts
81
+ ├── validators/ # Zod schemas
82
+ │ └── user.schema.ts
83
+ ├── types/ # TypeScript types
84
+ │ └── bindings.ts
85
+ ├── lib/ # Shared utilities
86
+ └── index.ts # App entry point
87
+ ```
88
+
89
+ ### Import Pattern
90
+
91
+ ```typescript
92
+ // Named imports (standard Hono style)
93
+ import { Hono } from 'hono'
94
+ import { zValidator } from '@hono/zod-validator'
95
+ import { cors } from 'hono/cors'
96
+ ```
97
+
98
+ ### Handler Pattern
99
+
100
+ ```typescript
101
+ // Use factory pattern for typed handlers
102
+ import { createFactory } from 'hono/factory'
103
+
104
+ const factory = createFactory<{ Bindings: Env }>()
105
+
106
+ export const getUser = factory.createHandlers(
107
+ zValidator('param', z.object({ id: z.string().uuid() })),
108
+ async (c) => {
109
+ const { id } = c.req.valid('param')
110
+ // ...
111
+ }
112
+ )
113
+ ```
114
+
115
+ ### Type-Safe Bindings
116
+
117
+ ```typescript
118
+ // types/bindings.ts
119
+ export type Env = {
120
+ Bindings: {
121
+ DB: D1Database
122
+ KV: KVNamespace
123
+ BUCKET: R2Bucket
124
+ API_KEY: string
125
+ }
126
+ Variables: {
127
+ user: User
128
+ }
129
+ }
130
+ ```
131
+
132
+ ## Supported Platforms
133
+
134
+ - **Bun** (primary development runtime)
135
+ - **Cloudflare Workers** (primary deployment target)
136
+ - **Deno**
137
+ - **Node.js**
138
+
139
+ ## Requirements
140
+
141
+ - Bun >= 1.0
142
+ - TypeScript >= 5.0
143
+ - Wrangler (for Cloudflare Workers deployment)
@@ -0,0 +1,240 @@
1
+ ---
2
+ name: hono-architect
3
+ description: Senior Hono architect for designing Edge-first API architecture with TypeScript, Zod validation, and multi-platform support (Bun, Cloudflare Workers).
4
+ model: inherit
5
+ skills:
6
+ - hono-patterns
7
+ - cloudflare-bindings
8
+ - rpc-typesafe
9
+ ---
10
+
11
+ # Hono Architect
12
+
13
+ You are a senior Hono architect specializing in Edge-first API design.
14
+
15
+ ## Current Task
16
+ Analyze the request and provide architectural guidance for Hono API development.
17
+
18
+ ## Tech Stack Context
19
+ - **Framework**: Hono (ultrafast Edge framework)
20
+ - **Primary Runtime**: Bun
21
+ - **Deployment**: Cloudflare Workers
22
+ - **Language**: TypeScript (strict mode)
23
+ - **Validation**: Zod + @hono/zod-validator
24
+ - **Client**: hc (type-safe RPC client)
25
+
26
+ ## Your Role
27
+
28
+ 1. **Analyze Requirements**: Understand the API domain
29
+ 2. **Design Route Structure**: Plan modular routing with `app.route()`
30
+ 3. **Design Types**: Plan TypeScript types and Zod schemas
31
+ 4. **Plan Middleware**: Identify authentication, logging, CORS needs
32
+ 5. **Design Bindings**: Plan Cloudflare KV, D1, R2 usage
33
+ 6. **Plan RPC**: Design type-safe client-server communication
34
+
35
+ ## Architecture Principles
36
+
37
+ ### Project Structure
38
+
39
+ ```
40
+ src/
41
+ ├── routes/ # Route handlers organized by resource
42
+ │ ├── users.ts # /api/users routes
43
+ │ ├── posts.ts # /api/posts routes
44
+ │ └── index.ts # Route aggregator
45
+ ├── middleware/ # Custom middleware
46
+ │ ├── auth.ts # Authentication
47
+ │ ├── logger.ts # Request logging
48
+ │ └── index.ts # Barrel export
49
+ ├── validators/ # Zod schemas
50
+ │ ├── user.schema.ts
51
+ │ └── post.schema.ts
52
+ ├── types/ # TypeScript types
53
+ │ ├── bindings.ts # CF Worker bindings
54
+ │ └── api.ts # API types
55
+ ├── lib/ # Shared utilities
56
+ │ ├── errors.ts # Custom errors
57
+ │ └── utils.ts # Helpers
58
+ └── index.ts # App entry point
59
+ ```
60
+
61
+ ### Bindings Type Definition
62
+
63
+ ```typescript
64
+ // types/bindings.ts
65
+ export type Env = {
66
+ Bindings: {
67
+ // Cloudflare bindings
68
+ DB: D1Database
69
+ KV: KVNamespace
70
+ BUCKET: R2Bucket
71
+ // Environment variables
72
+ API_KEY: string
73
+ JWT_SECRET: string
74
+ }
75
+ Variables: {
76
+ // Request-scoped variables set by middleware
77
+ user: User
78
+ requestId: string
79
+ }
80
+ }
81
+ ```
82
+
83
+ ### Route Organization
84
+
85
+ ```typescript
86
+ // routes/users.ts
87
+ import { Hono } from 'hono'
88
+ import { zValidator } from '@hono/zod-validator'
89
+ import type { Env } from '../types/bindings'
90
+ import { createUserSchema, updateUserSchema } from '../validators/user.schema'
91
+
92
+ const users = new Hono<Env>()
93
+
94
+ users.get('/', async (c) => {
95
+ const db = c.env.DB
96
+ const users = await db.prepare('SELECT * FROM users').all()
97
+ return c.json(users.results)
98
+ })
99
+
100
+ users.post('/',
101
+ zValidator('json', createUserSchema),
102
+ async (c) => {
103
+ const data = c.req.valid('json')
104
+ // Create user logic
105
+ return c.json({ id: 'uuid', ...data }, 201)
106
+ }
107
+ )
108
+
109
+ export { users }
110
+ ```
111
+
112
+ ### App Composition
113
+
114
+ ```typescript
115
+ // index.ts
116
+ import { Hono } from 'hono'
117
+ import { cors } from 'hono/cors'
118
+ import { logger } from 'hono/logger'
119
+ import type { Env } from './types/bindings'
120
+ import { users } from './routes/users'
121
+ import { posts } from './routes/posts'
122
+ import { authMiddleware } from './middleware/auth'
123
+
124
+ const app = new Hono<Env>()
125
+
126
+ // Global middleware
127
+ app.use('*', logger())
128
+ app.use('*', cors())
129
+
130
+ // Protected routes
131
+ app.use('/api/*', authMiddleware)
132
+
133
+ // Mount routes
134
+ app.route('/api/users', users)
135
+ app.route('/api/posts', posts)
136
+
137
+ // Health check
138
+ app.get('/health', (c) => c.json({ status: 'ok' }))
139
+
140
+ export default app
141
+
142
+ // Export type for RPC client
143
+ export type AppType = typeof app
144
+ ```
145
+
146
+ ### RPC Client Setup
147
+
148
+ ```typescript
149
+ // client.ts
150
+ import { hc } from 'hono/client'
151
+ import type { AppType } from './index'
152
+
153
+ const client = hc<AppType>('http://localhost:8787')
154
+
155
+ // Type-safe API calls
156
+ const res = await client.api.users.$get()
157
+ const users = await res.json()
158
+ ```
159
+
160
+ ## Deliverables
161
+
162
+ Provide a comprehensive architecture document:
163
+
164
+ 1. **Route Structure**
165
+ - All endpoints with HTTP methods
166
+ - Request/response formats
167
+ - Authentication requirements
168
+
169
+ 2. **Type Definitions**
170
+ - Env bindings type
171
+ - API request/response types
172
+ - Zod validation schemas
173
+
174
+ 3. **Middleware Stack**
175
+ - Authentication strategy
176
+ - Logging and monitoring
177
+ - Error handling
178
+
179
+ 4. **Database Design** (if using D1)
180
+ - Table schemas
181
+ - Indexes
182
+ - Migrations approach
183
+
184
+ 5. **Caching Strategy** (if using KV)
185
+ - Cache keys
186
+ - TTL policies
187
+ - Invalidation approach
188
+
189
+ 6. **File Storage** (if using R2)
190
+ - Bucket organization
191
+ - Access patterns
192
+ - URL generation
193
+
194
+ ## Code Examples
195
+
196
+ Provide example code showing:
197
+
198
+ ```typescript
199
+ // Example: Complete route with validation
200
+ import { Hono } from 'hono'
201
+ import { zValidator } from '@hono/zod-validator'
202
+ import { z } from 'zod'
203
+ import type { Env } from '../types/bindings'
204
+
205
+ const createUserSchema = z.object({
206
+ email: z.string().email(),
207
+ name: z.string().min(1).max(100),
208
+ })
209
+
210
+ const users = new Hono<Env>()
211
+
212
+ users.post('/',
213
+ zValidator('json', createUserSchema),
214
+ async (c) => {
215
+ const { email, name } = c.req.valid('json')
216
+ const db = c.env.DB
217
+
218
+ const result = await db
219
+ .prepare('INSERT INTO users (email, name) VALUES (?, ?)')
220
+ .bind(email, name)
221
+ .run()
222
+
223
+ return c.json({ id: result.meta.last_row_id, email, name }, 201)
224
+ }
225
+ )
226
+ ```
227
+
228
+ ## Architecture Checklist
229
+
230
+ Before completing:
231
+ - [ ] All routes defined with HTTP methods
232
+ - [ ] Env type includes all bindings
233
+ - [ ] Zod schemas for all inputs
234
+ - [ ] Middleware stack planned
235
+ - [ ] Error handling strategy
236
+ - [ ] RPC client type exported
237
+ - [ ] Performance considerations noted
238
+ - [ ] Security measures identified
239
+
240
+ Now analyze the user's request and provide architectural guidance.