rails_claude_skills 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 (87) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.yml +134 -0
  3. data/.github/ISSUE_TEMPLATE/config.yml +11 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.yml +129 -0
  5. data/.github/ISSUE_TEMPLATE/question.yml +90 -0
  6. data/.github/dependabot.yml +19 -0
  7. data/.github/workflows/ci.yml +77 -0
  8. data/.github/workflows/release.yml +66 -0
  9. data/.rubocop.yml +52 -0
  10. data/CHANGELOG.md +94 -0
  11. data/CLAUDE.md +332 -0
  12. data/CODE_OF_CONDUCT.md +134 -0
  13. data/CONTRIBUTING.md +580 -0
  14. data/LICENSE.txt +21 -0
  15. data/README.md +544 -0
  16. data/Rakefile +8 -0
  17. data/lib/generators/claude/agent/agent_generator.rb +71 -0
  18. data/lib/generators/claude/agent/templates/agent.md.tt +62 -0
  19. data/lib/generators/claude/command/command_generator.rb +50 -0
  20. data/lib/generators/claude/command/templates/command.md.tt +28 -0
  21. data/lib/generators/claude/commands_library/create-pr.md +27 -0
  22. data/lib/generators/claude/commands_library/dbchange.md +19 -0
  23. data/lib/generators/claude/commands_library/quality.md +20 -0
  24. data/lib/generators/claude/commands_library/stimulus.md +19 -0
  25. data/lib/generators/claude/commands_library/turbo-feature.md +17 -0
  26. data/lib/generators/claude/install/install_generator.rb +211 -0
  27. data/lib/generators/claude/install/templates/README.md.tt +59 -0
  28. data/lib/generators/claude/install/templates/USAGE +28 -0
  29. data/lib/generators/claude/install/templates/agents/api-dev.md.tt +46 -0
  30. data/lib/generators/claude/install/templates/agents/fullstack-dev.md.tt +48 -0
  31. data/lib/generators/claude/install/templates/agents/rails-developer.md.tt +40 -0
  32. data/lib/generators/claude/install/templates/settings.local.json.tt +13 -0
  33. data/lib/generators/claude/rule/rule_generator.rb +175 -0
  34. data/lib/generators/claude/rule/templates/rule.md.tt +7 -0
  35. data/lib/generators/claude/rules_library/code-style.md +37 -0
  36. data/lib/generators/claude/rules_library/database.md +47 -0
  37. data/lib/generators/claude/rules_library/hotwire.md +56 -0
  38. data/lib/generators/claude/rules_library/security.md +54 -0
  39. data/lib/generators/claude/rules_library/testing.md +47 -0
  40. data/lib/generators/claude/skill/skill_generator.rb +196 -0
  41. data/lib/generators/claude/skill/templates/SKILL.md.tt +27 -0
  42. data/lib/generators/claude/skills_library/create-task-files/SKILL.md +311 -0
  43. data/lib/generators/claude/skills_library/create-task-files/templates/bug.md +60 -0
  44. data/lib/generators/claude/skills_library/create-task-files/templates/epic.md +47 -0
  45. data/lib/generators/claude/skills_library/create-task-files/templates/issue.md +45 -0
  46. data/lib/generators/claude/skills_library/create-task-files/templates/user-story.md +57 -0
  47. data/lib/generators/claude/skills_library/minitest-testing/SKILL.md +398 -0
  48. data/lib/generators/claude/skills_library/minitest-testing/references/examples.md +889 -0
  49. data/lib/generators/claude/skills_library/plan-feature/SKILL.md +253 -0
  50. data/lib/generators/claude/skills_library/rails-api-controllers/SKILL.md +1041 -0
  51. data/lib/generators/claude/skills_library/rails-api-controllers/references/api-documentation.md +422 -0
  52. data/lib/generators/claude/skills_library/rails-api-controllers/references/serialization.md +456 -0
  53. data/lib/generators/claude/skills_library/rails-auth-with-devise/SKILL.md +191 -0
  54. data/lib/generators/claude/skills_library/rails-auth-with-devise/references/advanced.md +331 -0
  55. data/lib/generators/claude/skills_library/rails-auth-with-devise/references/api-auth.md +266 -0
  56. data/lib/generators/claude/skills_library/rails-auth-with-devise/references/omniauth.md +194 -0
  57. data/lib/generators/claude/skills_library/rails-authorization-cancancan/SKILL.md +603 -0
  58. data/lib/generators/claude/skills_library/rails-authorization-cancancan/references/api-authorization.md +543 -0
  59. data/lib/generators/claude/skills_library/rails-authorization-cancancan/references/complex-permissions.md +572 -0
  60. data/lib/generators/claude/skills_library/rails-authorization-cancancan/references/multi-tenancy.md +373 -0
  61. data/lib/generators/claude/skills_library/rails-controllers/SKILL.md +514 -0
  62. data/lib/generators/claude/skills_library/rails-debugging/SKILL.md +260 -0
  63. data/lib/generators/claude/skills_library/rails-deployment/SKILL.md +437 -0
  64. data/lib/generators/claude/skills_library/rails-deployment/references/examples.md +901 -0
  65. data/lib/generators/claude/skills_library/rails-hotwire/SKILL.md +367 -0
  66. data/lib/generators/claude/skills_library/rails-jobs/MISSION_CONTROL_SETUP.md +639 -0
  67. data/lib/generators/claude/skills_library/rails-jobs/SKILL.md +704 -0
  68. data/lib/generators/claude/skills_library/rails-mailers/SKILL.md +549 -0
  69. data/lib/generators/claude/skills_library/rails-models/SKILL.md +379 -0
  70. data/lib/generators/claude/skills_library/rails-pagination-kaminari/SKILL.md +622 -0
  71. data/lib/generators/claude/skills_library/rails-pagination-kaminari/references/api-pagination.md +523 -0
  72. data/lib/generators/claude/skills_library/rails-pagination-kaminari/references/custom-themes.md +498 -0
  73. data/lib/generators/claude/skills_library/rails-pagination-kaminari/references/performance.md +478 -0
  74. data/lib/generators/claude/skills_library/rails-views/SKILL.md +508 -0
  75. data/lib/generators/claude/skills_library/refine-requirements/SKILL.md +226 -0
  76. data/lib/generators/claude/skills_library/refine-requirements/references/examples.md +344 -0
  77. data/lib/generators/claude/skills_library/refine-requirements/references/reference.md +298 -0
  78. data/lib/generators/claude/skills_library/rspec-testing/SKILL.md +572 -0
  79. data/lib/generators/claude/skills_library/rspec-testing/references/better_specs_guide.md +273 -0
  80. data/lib/generators/claude/skills_library/rspec-testing/references/thoughtbot_patterns.md +407 -0
  81. data/lib/generators/claude/skills_library/tailwindcss/SKILL.md +371 -0
  82. data/lib/generators/claude/views/views_generator.rb +113 -0
  83. data/lib/rails_claude_skills/railtie.rb +16 -0
  84. data/lib/rails_claude_skills/version.rb +5 -0
  85. data/lib/rails_claude_skills.rb +27 -0
  86. data/sig/rails_claude_skills.rbs +4 -0
  87. metadata +199 -0
data/README.md ADDED
@@ -0,0 +1,544 @@
1
+ # Rails Claude Skills
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/rails_claude_skills.svg)](https://badge.fury.io/rb/rails_claude_skills)
4
+ [![CI](https://github.com/shoebtamboli/rails_claude_skills/actions/workflows/ci.yml/badge.svg)](https://github.com/shoebtamboli/rails_claude_skills/actions/workflows/ci.yml)
5
+
6
+ A Rails generator gem that scaffolds Claude AI skills and agents for any Rails project, making AI-assisted development reusable and distributable.
7
+
8
+ ## What is This?
9
+
10
+ `rails_claude_skills` brings Rails generator conventions to Claude AI skills. This gem provides generators to scaffold AI context and knowledge for your Rails projects.
11
+
12
+ ### Why Use This Gem?
13
+
14
+ - **🔄 Reusability**: Share Claude skills across multiple Rails projects
15
+ - **👥 Team Collaboration**: Entire team gets consistent AI context
16
+ - **🔧 Maintainability**: Update skills in one place, distribute via gem updates
17
+ - **📝 Convention**: Follows Rails patterns developers already know
18
+ - **🔍 Discoverability**: Makes best practices easily accessible to AI assistants
19
+
20
+ ## Installation
21
+
22
+ Add this line to your application's Gemfile:
23
+
24
+ ```ruby
25
+ gem 'rails_claude_skills', group: :development
26
+ ```
27
+
28
+ Then execute:
29
+
30
+ ```bash
31
+ bundle install
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ### 1. Initialize Claude Skills in Your Project
37
+
38
+ ```bash
39
+ # Basic preset (models, controllers, views)
40
+ rails g claude:install
41
+
42
+ # Full-stack preset (includes Hotwire, TailwindCSS, RSpec)
43
+ rails g claude:install --preset=fullstack
44
+
45
+ # API preset (models, API controllers, serializers, authentication)
46
+ rails g claude:install --preset=api
47
+ ```
48
+
49
+ This creates a `.claude/` directory in your Rails project:
50
+
51
+ ```
52
+ your-rails-app/
53
+ ├── .claude/
54
+ │ ├── settings.local.json
55
+ │ ├── README.md
56
+ │ ├── skills/ # Reusable AI knowledge modules
57
+ │ │ ├── rails-models/
58
+ │ │ ├── rails-controllers/
59
+ │ │ └── rails-views/
60
+ │ ├── commands/ # Custom slash commands
61
+ │ │ └── dbchange.md
62
+ │ ├── rules/ # Project-specific guidelines
63
+ │ │ ├── code-style.md
64
+ │ │ ├── testing.md
65
+ │ │ └── database.md
66
+ │ └── agents/ # AI agent definitions
67
+ │ └── rails-developer.md
68
+ ```
69
+
70
+ ### 2. Use with Claude Code
71
+
72
+ When you use Claude Code in your project, it automatically loads:
73
+ - **Skills** - Reusable knowledge modules for Rails patterns and conventions
74
+ - **Commands** - Custom slash commands for common workflows (e.g., `/dbchange`, `/quality`)
75
+ - **Rules** - Project-specific guidelines Claude follows when writing code
76
+ - **Agents** - Pre-configured AI assistants for different tasks
77
+
78
+ Claude will have deep knowledge of your tech stack and follow your team's conventions!
79
+
80
+ ## Available Generators
81
+
82
+ ### Install Generator
83
+
84
+ Initialize Claude skills in your project:
85
+
86
+ ```bash
87
+ rails g claude:install [options]
88
+ ```
89
+
90
+ **Options:**
91
+ - `--preset=basic` - Basic Rails skills (default)
92
+ - `--preset=fullstack` - Full-stack with Hotwire and TailwindCSS
93
+ - `--preset=api` - API-only configuration
94
+ - `--skip-agents` - Don't create default agents
95
+ - `--skip-readme` - Don't create README
96
+
97
+ **Presets Include:**
98
+
99
+ | Preset | Skills | Commands | Rules | Agent |
100
+ |--------|--------|----------|-------|-------|
101
+ | **basic** | rails-models, rails-controllers, rails-views | dbchange | code-style, testing, database | rails-developer |
102
+ | **fullstack** | basic + rails-hotwire, tailwindcss, rspec-testing | basic + quality, turbo-feature, stimulus, create-pr | basic + hotwire, security | fullstack-dev |
103
+ | **api** | rails-models, rails-api-controllers, rails-serializers | dbchange, quality | code-style, testing, security, database | api-dev |
104
+
105
+ Each preset includes:
106
+ - ✅ **Skills** for Rails patterns and best practices
107
+ - ✅ **Commands** for common development workflows
108
+ - ✅ **Rules** for code quality and conventions
109
+ - ✅ **Agent** pre-configured for the stack
110
+
111
+ ### Skill Generator
112
+
113
+ Create a custom skill for your specific domain or patterns:
114
+
115
+ ```bash
116
+ rails g claude:skill NAME [options]
117
+ ```
118
+
119
+ **Options:**
120
+ - `--description=TEXT` - Skill description
121
+ - `--with-references` - Create references directory
122
+ - `--template=TYPE` - Use specific template (generic, model, controller, frontend)
123
+
124
+ **Examples:**
125
+
126
+ ```bash
127
+ # Create a custom blog publishing skill
128
+ rails g claude:skill blog-publishing \
129
+ --description="Blog-specific publishing patterns" \
130
+ --with-references
131
+
132
+ # Create a payment processing skill
133
+ rails g claude:skill payment-processing \
134
+ --template=model \
135
+ --description="Stripe payment integration patterns"
136
+ ```
137
+
138
+ ### Agent Generator
139
+
140
+ Create a custom agent that combines multiple skills:
141
+
142
+ ```bash
143
+ rails g claude:agent NAME [options]
144
+ ```
145
+
146
+ **Options:**
147
+ - `--skills=skill1,skill2` - Skills to auto-load
148
+ - `--model=MODEL` - Default model (sonnet, opus, haiku)
149
+ - `--description=TEXT` - Agent description
150
+ - `--color=COLOR` - Agent color for UI
151
+
152
+ **Examples:**
153
+
154
+ ```bash
155
+ # Create a backend development specialist
156
+ rails g claude:agent backend-dev \
157
+ --skills=rails-models,rails-jobs,rspec-testing \
158
+ --model=sonnet \
159
+ --description="Backend development specialist"
160
+
161
+ # Create a frontend specialist
162
+ rails g claude:agent frontend-dev \
163
+ --skills=rails-views,rails-hotwire,tailwindcss \
164
+ --model=sonnet \
165
+ --color=purple
166
+ ```
167
+
168
+ ### Command Generator
169
+
170
+ Create custom slash commands for common workflows:
171
+
172
+ ```bash
173
+ rails g claude:command NAME [options]
174
+ ```
175
+
176
+ **Options:**
177
+ - `--description=TEXT` - Command description
178
+ - `--argument-hint=HINT` - Argument usage hint
179
+ - `--allowed-tools=TOOLS` - Comma-separated list of allowed tools
180
+
181
+ **Examples:**
182
+
183
+ ```bash
184
+ # Create a deploy command
185
+ rails g claude:command deploy \
186
+ --description="Deploy to production" \
187
+ --argument-hint="[environment]" \
188
+ --allowed-tools="Bash, Read"
189
+
190
+ # Usage: /deploy staging
191
+ ```
192
+
193
+ ### Rule Generator
194
+
195
+ Create project-specific rules and guidelines:
196
+
197
+ ```bash
198
+ rails g claude:rule NAME [options]
199
+ ```
200
+
201
+ **Options:**
202
+ - `--paths=PATHS` - File paths where rule applies (comma-separated glob patterns)
203
+ - `--template=TYPE` - Template type (generic, testing, security, performance)
204
+
205
+ **Examples:**
206
+
207
+ ```bash
208
+ # Create API design rules
209
+ rails g claude:rule api-design \
210
+ --paths="app/controllers/api/**/*" \
211
+ --template=security
212
+
213
+ # Create performance rules
214
+ rails g claude:rule performance \
215
+ --template=performance
216
+ ```
217
+
218
+ ### Views Generator
219
+
220
+ Customize pre-built skills, commands, or rules by copying them to your project:
221
+
222
+ ```bash
223
+ rails g claude:views NAME [options]
224
+ ```
225
+
226
+ **Options:**
227
+ - `--type=TYPE` - Resource type: skill (default), command, rule
228
+
229
+ **Examples:**
230
+
231
+ ```bash
232
+ # Customize a skill
233
+ rails g claude:views rails-models
234
+
235
+ # Customize a command
236
+ rails g claude:views quality --type=command
237
+
238
+ # Customize a rule
239
+ rails g claude:views security --type=rule
240
+
241
+ # Your changes will override the gem's default version
242
+ ```
243
+
244
+ ## Pre-Built Resources
245
+
246
+ ### Skills
247
+
248
+ The gem includes 20+ pre-built skills organized by category:
249
+
250
+ **Rails Core**
251
+ - **rails-models** - ActiveRecord patterns, migrations, validations, callbacks, associations
252
+ - **rails-controllers** - Controller actions, routing, REST conventions, filters
253
+ - **rails-views** - ERB templates, helpers, layouts, partials
254
+ - **rails-hotwire** - Turbo Drive, Turbo Frames, Turbo Streams, Stimulus
255
+ - **rails-api-controllers** - RESTful API controllers, versioning, authentication, rate limiting
256
+
257
+ **Authentication & Authorization**
258
+ - **rails-auth-with-devise** - Complete authentication setup with Devise, including OmniAuth
259
+ - **rails-authorization-cancancan** - Authorization and permissions with CanCanCan
260
+
261
+ **Frontend**
262
+ - **tailwindcss** - TailwindCSS utility-first styling
263
+ - **rails-pagination-kaminari** - Pagination with Kaminari
264
+
265
+ **Background Jobs & Communication**
266
+ - **rails-jobs** - Background jobs with SolidQueue, SolidCache, SolidCable
267
+ - **rails-mailers** - ActionMailer for transactional and notification emails
268
+
269
+ **Testing**
270
+ - **rspec-testing** - RSpec testing patterns and best practices
271
+ - **minitest-testing** - Minitest tests for models, controllers, and system tests
272
+
273
+ **Utilities**
274
+ - **rails-debugging** - Rails-specific debugging tools
275
+ - **rails-deployment** - Deploy Rails apps (Kamal, Heroku, custom servers)
276
+
277
+ **Planning & Organization**
278
+ - **plan-feature** - Systematically gather requirements and create implementation plans
279
+ - **refine-requirements** - Clarify and improve feature requirements
280
+ - **create-task-files** - Export tasks to structured markdown files
281
+
282
+ ### Commands
283
+
284
+ Pre-built slash commands for common workflows:
285
+
286
+ - **/quality** - Run RuboCop, Brakeman, and security audits
287
+ - **/turbo-feature** - Build Hotwire-powered features following best practices
288
+ - **/dbchange** - Generate database migrations with safety checks
289
+ - **/stimulus** - Generate Stimulus controllers with proper setup
290
+ - **/create-pr** - Create branch, commit, and open pull request
291
+
292
+ ### Rules
293
+
294
+ Pre-built project guidelines:
295
+
296
+ - **code-style** - Ruby and Rails style conventions
297
+ - **testing** - Test structure and best practices
298
+ - **security** - Security guidelines and vulnerability prevention
299
+ - **database** - Database and ActiveRecord patterns
300
+ - **hotwire** - Turbo and Stimulus guidelines
301
+
302
+ ## Usage Examples
303
+
304
+ ### Example 1: New Rails Project Setup
305
+
306
+ ```bash
307
+ # Create new Rails app
308
+ rails new blog_app
309
+ cd blog_app
310
+
311
+ # Add Claude skills
312
+ echo "gem 'rails_claude_skills', group: :development" >> Gemfile
313
+ bundle install
314
+
315
+ # Initialize with fullstack preset
316
+ rails g claude:install --preset=fullstack
317
+
318
+ # Start coding with AI assistance!
319
+ # .claude/ now contains all Rails + Hotwire + Tailwind expertise
320
+ ```
321
+
322
+ ### Example 2: Team Customization
323
+
324
+ ```bash
325
+ # Lead developer sets up and customizes
326
+ rails g claude:install --preset=fullstack
327
+ rails g claude:views rails-models # Customize for team conventions
328
+
329
+ # Edit .claude/skills/rails-models/SKILL.md with team-specific patterns
330
+
331
+ # Commit .claude/ to git
332
+ git add .claude/
333
+ git commit -m "Add Claude skills with team conventions"
334
+
335
+ # Other team members pull
336
+ git pull
337
+
338
+ # Everyone now has consistent AI context!
339
+ ```
340
+
341
+ ### Example 3: Adding Additional Pre-Built Skills
342
+
343
+ ```bash
344
+ # After installing with a preset, add more skills as needed
345
+ rails g claude:install --preset=fullstack
346
+
347
+ # Add authentication with Devise
348
+ rails g claude:views rails-auth-with-devise
349
+
350
+ # Add authorization with CanCanCan
351
+ rails g claude:views rails-authorization-cancancan
352
+
353
+ # Add background job processing
354
+ rails g claude:views rails-jobs
355
+
356
+ # Add email functionality
357
+ rails g claude:views rails-mailers
358
+
359
+ # Add debugging tools
360
+ rails g claude:views rails-debugging
361
+
362
+ # Add API controller patterns (for building JSON APIs)
363
+ rails g claude:views rails-api-controllers
364
+
365
+ # Add pagination with Kaminari
366
+ rails g claude:views rails-pagination-kaminari
367
+ ```
368
+
369
+ ### Example 4: Custom Domain Skills
370
+
371
+ ```bash
372
+ # You have specific business logic patterns
373
+ rails g claude:skill subscription-billing \
374
+ --description="Stripe subscription and billing patterns" \
375
+ --with-references \
376
+ --template=model
377
+
378
+ # Edit the generated skill at:
379
+ # .claude/skills/subscription-billing/SKILL.md
380
+
381
+ # Add your domain-specific patterns, code examples, and best practices
382
+ ```
383
+
384
+ ## Configuration
385
+
386
+ ### Global Configuration
387
+
388
+ Create an initializer to configure the gem:
389
+
390
+ ```ruby
391
+ # config/initializers/rails_claude_skills.rb
392
+ RailsClaudeSkills.configure do |config|
393
+ # Directory paths
394
+ config.skills_path = ".claude/skills"
395
+ config.agents_path = ".claude/agents"
396
+
397
+ # Default model
398
+ config.default_model = "sonnet"
399
+ end
400
+ ```
401
+
402
+ ### Per-Project Settings
403
+
404
+ The install generator creates a `.claude/settings.local.json` file with configuration based on your chosen preset:
405
+
406
+ **Example for basic preset:**
407
+ ```json
408
+ {
409
+ "skills": {
410
+ "autoLoad": true,
411
+ "path": ".claude/skills"
412
+ },
413
+ "agents": {
414
+ "path": ".claude/agents",
415
+ "default": "rails-developer"
416
+ },
417
+ "model": "sonnet",
418
+ "project": "MyRailsApp",
419
+ "rails_version": "7.1.3"
420
+ }
421
+ ```
422
+
423
+ **Example for fullstack preset:**
424
+ ```json
425
+ {
426
+ "skills": {
427
+ "autoLoad": true,
428
+ "path": ".claude/skills"
429
+ },
430
+ "agents": {
431
+ "path": ".claude/agents",
432
+ "default": "fullstack-dev"
433
+ },
434
+ "model": "sonnet",
435
+ "project": "MyRailsApp",
436
+ "rails_version": "7.1.3"
437
+ }
438
+ ```
439
+
440
+ The `default` agent is automatically set based on your chosen preset (basic → rails-developer, fullstack → fullstack-dev, api → api-dev).
441
+
442
+ ## Directory Structure
443
+
444
+ After running `rails g claude:install`, your project will have:
445
+
446
+ ```
447
+ your-rails-app/
448
+ ├── .claude/
449
+ │ ├── settings.local.json # Claude configuration
450
+ │ ├── README.md # Usage instructions
451
+ │ ├── skills/ # Reusable knowledge modules
452
+ │ │ ├── rails-models/
453
+ │ │ │ ├── SKILL.md
454
+ │ │ │ └── references/ # Optional reference materials
455
+ │ │ ├── rails-controllers/
456
+ │ │ │ └── SKILL.md
457
+ │ │ └── rails-views/
458
+ │ │ └── SKILL.md
459
+ │ ├── commands/ # Custom slash commands
460
+ │ │ ├── dbchange.md # /dbchange command
461
+ │ │ ├── quality.md # /quality command
462
+ │ │ └── turbo-feature.md # /turbo-feature command
463
+ │ ├── rules/ # Project guidelines
464
+ │ │ ├── code-style.md # Ruby/Rails style rules
465
+ │ │ ├── testing.md # Testing standards
466
+ │ │ └── database.md # Database conventions
467
+ │ └── agents/ # AI agent definitions
468
+ │ └── fullstack-dev.md
469
+ ```
470
+
471
+ ## Development
472
+
473
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
474
+
475
+ To install this gem onto your local machine, run `bundle exec rake install`.
476
+
477
+ ## Contributing
478
+
479
+ Bug reports and pull requests are welcome on GitHub at https://github.com/shoebtamboli/rails_claude_skills. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/shoebtamboli/rails_claude_skills/blob/main/CODE_OF_CONDUCT.md).
480
+
481
+ ### How to Add New Skills
482
+
483
+ 1. Create skill directory in `lib/generators/claude/skills_library/`
484
+ 2. Write `SKILL.md` with proper frontmatter
485
+ 3. Add references if needed
486
+ 4. Test with generator
487
+ 5. Submit PR
488
+
489
+ ## Roadmap
490
+
491
+ ### Current: Preparing for Initial Release (v0.1.0) 🚀
492
+
493
+ **Core Features (Complete)**
494
+ - [x] Gem structure and configuration system
495
+ - [x] Install generator with 3 presets (basic, fullstack, api)
496
+ - [x] Skill generator for custom skills
497
+ - [x] Agent generator for custom agents
498
+ - [x] Command generator for slash commands
499
+ - [x] Rule generator for project guidelines
500
+ - [x] Views generator to customize resources
501
+
502
+ **Content Library (Complete)**
503
+ - [x] 18 pre-built skills covering Rails, testing, authentication, background jobs, and more
504
+ - [x] 5 pre-built commands (quality, turbo-feature, dbchange, stimulus, create-pr)
505
+ - [x] 5 pre-built rules (code-style, testing, security, database, hotwire)
506
+ - [x] 3 pre-configured agents (rails-developer, fullstack-dev, api-dev)
507
+
508
+ **Documentation & Community (Complete)**
509
+ - [x] Comprehensive README with examples
510
+ - [x] Contributing guidelines with detailed instructions
511
+ - [x] Issue templates (bug report, feature request, question)
512
+ - [x] Code of Conduct
513
+ - [x] CI/CD pipeline (GitHub Actions)
514
+ - [x] Automated release workflow
515
+
516
+ **Status**: Ready for publication to RubyGems.org
517
+
518
+ ### Future: Ecosystem Growth (v0.2.0+) 📋
519
+
520
+ **Planned Features**
521
+ - [ ] Serialization skill (rails-serializers for JSON:API, ActiveModel::Serializers)
522
+ - [ ] Additional popular gem integrations (Pundit, ActiveAdmin, Sidekiq, etc.)
523
+ - [ ] Skill dependency resolution and auto-installation
524
+ - [ ] Community skill repository and sharing
525
+ - [ ] Rails version detection and compatibility warnings
526
+ - [ ] Skill versioning and upgrade paths
527
+ - [ ] Interactive skill browser/explorer
528
+ - [ ] Skill testing framework
529
+ - [ ] Skill metrics and analytics
530
+
531
+ **Community Contributions Welcome**
532
+ We welcome contributions of new skills, commands, and rules! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
533
+
534
+ ## License
535
+
536
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
537
+
538
+ ## Code of Conduct
539
+
540
+ Everyone interacting in the RailsClaudeSkills project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/shoebtamboli/rails_claude_skills/blob/main/CODE_OF_CONDUCT.md).
541
+
542
+ ---
543
+
544
+ **Happy Coding with AI! 🚀**
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators"
4
+
5
+ module Claude
6
+ module Generators
7
+ class AgentGenerator < Rails::Generators::NamedBase
8
+ source_root File.expand_path("templates", __dir__)
9
+
10
+ class_option :skills, type: :array, default: [],
11
+ desc: "Skills to auto-load (comma-separated)"
12
+ class_option :model, type: :string, default: "sonnet",
13
+ desc: "Default model (sonnet, opus, haiku)"
14
+ class_option :description, type: :string, default: nil,
15
+ desc: "Agent description"
16
+ class_option :color, type: :string, default: "blue",
17
+ desc: "Agent color (for UI)"
18
+
19
+ def create_agents_directory
20
+ empty_directory ".claude/agents"
21
+ end
22
+
23
+ def create_agent_file
24
+ template "agent.md.tt", agent_path
25
+ end
26
+
27
+ def show_instructions
28
+ say "\nAgent '#{file_name}' created successfully!", :green
29
+ say "\nLocation: #{agent_path}", :blue
30
+ say "\nNext steps:", :yellow
31
+ say " 1. Edit #{agent_path} to customize the agent"
32
+ say " 2. Set as default in .claude/settings.local.json (optional)"
33
+ say " 3. Use this agent when working on specific tasks\n"
34
+ end
35
+
36
+ private
37
+
38
+ def agent_path
39
+ ".claude/agents/#{file_name}.md"
40
+ end
41
+
42
+ def agent_description
43
+ options[:description] || "Custom agent for #{file_name.titleize}"
44
+ end
45
+
46
+ def agent_skills
47
+ if options[:skills].any?
48
+ options[:skills]
49
+ else
50
+ %w[rails-models rails-controllers]
51
+ end
52
+ end
53
+
54
+ def agent_model
55
+ options[:model]
56
+ end
57
+
58
+ def agent_color
59
+ options[:color]
60
+ end
61
+
62
+ def skills_list
63
+ agent_skills.map { |skill| " - #{skill}" }.join("\n")
64
+ end
65
+
66
+ def skills_description
67
+ agent_skills.map { |skill| "**#{skill}**" }.join(", ")
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: <%= file_name %>
3
+ description: <%= agent_description %>
4
+ model: <%= agent_model %>
5
+ color: <%= agent_color %>
6
+ skills:
7
+ <% agent_skills.each do |skill| -%>
8
+ - <%= skill %>
9
+ <% end -%>
10
+ ---
11
+
12
+ # <%= file_name.titleize %>
13
+
14
+ You are an expert Rails developer assistant specializing in <%= file_name.titleize.downcase %> tasks.
15
+
16
+ ## Skills Integration
17
+
18
+ This agent auto-loads:
19
+ <% agent_skills.each do |skill| -%>
20
+ - **<%= skill %>** - <%= skill.titleize %> expertise
21
+ <% end -%>
22
+
23
+ ## Core Expertise
24
+
25
+ Add your core expertise areas here. What is this agent particularly good at?
26
+
27
+ Examples:
28
+ - Specific domain knowledge
29
+ - Particular architectural patterns
30
+ - Framework or library expertise
31
+ - Problem-solving approaches
32
+
33
+ ## Development Workflow
34
+
35
+ Define the step-by-step workflow this agent follows:
36
+
37
+ 1. **Understand** - Analyze the requirements and context
38
+ 2. **Plan** - Design the solution approach
39
+ 3. **Implement** - Write code following best practices
40
+ 4. **Test** - Ensure quality and correctness
41
+ 5. **Refactor** - Optimize and improve
42
+
43
+ ## Best Practices
44
+
45
+ List the key best practices this agent follows:
46
+
47
+ - Follow Rails conventions
48
+ - Write clean, readable code
49
+ - Use appropriate design patterns
50
+ - Consider performance and security
51
+ - Write tests for new functionality
52
+
53
+ ## Communication Style
54
+
55
+ - Clear and concise explanations
56
+ - Provide context and reasoning
57
+ - Suggest alternatives when appropriate
58
+ - Ask clarifying questions when needed
59
+
60
+ ---
61
+
62
+ *Generated with rails_claude_skills v<%= RailsClaudeSkills::VERSION %>*