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.
- checksums.yaml +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.yml +134 -0
- data/.github/ISSUE_TEMPLATE/config.yml +11 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yml +129 -0
- data/.github/ISSUE_TEMPLATE/question.yml +90 -0
- data/.github/dependabot.yml +19 -0
- data/.github/workflows/ci.yml +77 -0
- data/.github/workflows/release.yml +66 -0
- data/.rubocop.yml +52 -0
- data/CHANGELOG.md +94 -0
- data/CLAUDE.md +332 -0
- data/CODE_OF_CONDUCT.md +134 -0
- data/CONTRIBUTING.md +580 -0
- data/LICENSE.txt +21 -0
- data/README.md +544 -0
- data/Rakefile +8 -0
- data/lib/generators/claude/agent/agent_generator.rb +71 -0
- data/lib/generators/claude/agent/templates/agent.md.tt +62 -0
- data/lib/generators/claude/command/command_generator.rb +50 -0
- data/lib/generators/claude/command/templates/command.md.tt +28 -0
- data/lib/generators/claude/commands_library/create-pr.md +27 -0
- data/lib/generators/claude/commands_library/dbchange.md +19 -0
- data/lib/generators/claude/commands_library/quality.md +20 -0
- data/lib/generators/claude/commands_library/stimulus.md +19 -0
- data/lib/generators/claude/commands_library/turbo-feature.md +17 -0
- data/lib/generators/claude/install/install_generator.rb +211 -0
- data/lib/generators/claude/install/templates/README.md.tt +59 -0
- data/lib/generators/claude/install/templates/USAGE +28 -0
- data/lib/generators/claude/install/templates/agents/api-dev.md.tt +46 -0
- data/lib/generators/claude/install/templates/agents/fullstack-dev.md.tt +48 -0
- data/lib/generators/claude/install/templates/agents/rails-developer.md.tt +40 -0
- data/lib/generators/claude/install/templates/settings.local.json.tt +13 -0
- data/lib/generators/claude/rule/rule_generator.rb +175 -0
- data/lib/generators/claude/rule/templates/rule.md.tt +7 -0
- data/lib/generators/claude/rules_library/code-style.md +37 -0
- data/lib/generators/claude/rules_library/database.md +47 -0
- data/lib/generators/claude/rules_library/hotwire.md +56 -0
- data/lib/generators/claude/rules_library/security.md +54 -0
- data/lib/generators/claude/rules_library/testing.md +47 -0
- data/lib/generators/claude/skill/skill_generator.rb +196 -0
- data/lib/generators/claude/skill/templates/SKILL.md.tt +27 -0
- data/lib/generators/claude/skills_library/create-task-files/SKILL.md +311 -0
- data/lib/generators/claude/skills_library/create-task-files/templates/bug.md +60 -0
- data/lib/generators/claude/skills_library/create-task-files/templates/epic.md +47 -0
- data/lib/generators/claude/skills_library/create-task-files/templates/issue.md +45 -0
- data/lib/generators/claude/skills_library/create-task-files/templates/user-story.md +57 -0
- data/lib/generators/claude/skills_library/minitest-testing/SKILL.md +398 -0
- data/lib/generators/claude/skills_library/minitest-testing/references/examples.md +889 -0
- data/lib/generators/claude/skills_library/plan-feature/SKILL.md +253 -0
- data/lib/generators/claude/skills_library/rails-api-controllers/SKILL.md +1041 -0
- data/lib/generators/claude/skills_library/rails-api-controllers/references/api-documentation.md +422 -0
- data/lib/generators/claude/skills_library/rails-api-controllers/references/serialization.md +456 -0
- data/lib/generators/claude/skills_library/rails-auth-with-devise/SKILL.md +191 -0
- data/lib/generators/claude/skills_library/rails-auth-with-devise/references/advanced.md +331 -0
- data/lib/generators/claude/skills_library/rails-auth-with-devise/references/api-auth.md +266 -0
- data/lib/generators/claude/skills_library/rails-auth-with-devise/references/omniauth.md +194 -0
- data/lib/generators/claude/skills_library/rails-authorization-cancancan/SKILL.md +603 -0
- data/lib/generators/claude/skills_library/rails-authorization-cancancan/references/api-authorization.md +543 -0
- data/lib/generators/claude/skills_library/rails-authorization-cancancan/references/complex-permissions.md +572 -0
- data/lib/generators/claude/skills_library/rails-authorization-cancancan/references/multi-tenancy.md +373 -0
- data/lib/generators/claude/skills_library/rails-controllers/SKILL.md +514 -0
- data/lib/generators/claude/skills_library/rails-debugging/SKILL.md +260 -0
- data/lib/generators/claude/skills_library/rails-deployment/SKILL.md +437 -0
- data/lib/generators/claude/skills_library/rails-deployment/references/examples.md +901 -0
- data/lib/generators/claude/skills_library/rails-hotwire/SKILL.md +367 -0
- data/lib/generators/claude/skills_library/rails-jobs/MISSION_CONTROL_SETUP.md +639 -0
- data/lib/generators/claude/skills_library/rails-jobs/SKILL.md +704 -0
- data/lib/generators/claude/skills_library/rails-mailers/SKILL.md +549 -0
- data/lib/generators/claude/skills_library/rails-models/SKILL.md +379 -0
- data/lib/generators/claude/skills_library/rails-pagination-kaminari/SKILL.md +622 -0
- data/lib/generators/claude/skills_library/rails-pagination-kaminari/references/api-pagination.md +523 -0
- data/lib/generators/claude/skills_library/rails-pagination-kaminari/references/custom-themes.md +498 -0
- data/lib/generators/claude/skills_library/rails-pagination-kaminari/references/performance.md +478 -0
- data/lib/generators/claude/skills_library/rails-views/SKILL.md +508 -0
- data/lib/generators/claude/skills_library/refine-requirements/SKILL.md +226 -0
- data/lib/generators/claude/skills_library/refine-requirements/references/examples.md +344 -0
- data/lib/generators/claude/skills_library/refine-requirements/references/reference.md +298 -0
- data/lib/generators/claude/skills_library/rspec-testing/SKILL.md +572 -0
- data/lib/generators/claude/skills_library/rspec-testing/references/better_specs_guide.md +273 -0
- data/lib/generators/claude/skills_library/rspec-testing/references/thoughtbot_patterns.md +407 -0
- data/lib/generators/claude/skills_library/tailwindcss/SKILL.md +371 -0
- data/lib/generators/claude/views/views_generator.rb +113 -0
- data/lib/rails_claude_skills/railtie.rb +16 -0
- data/lib/rails_claude_skills/version.rb +5 -0
- data/lib/rails_claude_skills.rb +27 -0
- data/sig/rails_claude_skills.rbs +4 -0
- metadata +199 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-feature
|
|
3
|
+
description: Gather requirements, analyze codebase, and create structured task lists before starting Rails feature development. Use when planning new features, starting development work, breaking down requirements, or when the user mentions "plan", "requirements", "tasks", or "kickoff".
|
|
4
|
+
allowed-tools: Read, Grep, Glob, AskUserQuestion, TodoWrite
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan Feature Skill
|
|
8
|
+
|
|
9
|
+
Systematically gather requirements and create implementation plans before starting Rails feature development. Ensures thorough planning, proper task breakdown, and alignment with project conventions.
|
|
10
|
+
|
|
11
|
+
## When to Use This Skill
|
|
12
|
+
|
|
13
|
+
Use this skill when:
|
|
14
|
+
- User mentions planning a new feature
|
|
15
|
+
- Starting development on a new capability
|
|
16
|
+
- Breaking down complex requirements
|
|
17
|
+
- User says "plan", "requirements", "tasks", "kickoff"
|
|
18
|
+
- Beginning work on authentication, CRUD, dashboards, or APIs
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
Follow these steps systematically when planning a feature:
|
|
23
|
+
|
|
24
|
+
### Step 1: Understand the Feature Request
|
|
25
|
+
|
|
26
|
+
Acknowledge the feature request and restate it to confirm understanding:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
I'll help you plan the implementation of [feature name]. Let me gather requirements and analyze the codebase to create a structured plan.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Step 2: Gather Requirements
|
|
33
|
+
|
|
34
|
+
Use the AskUserQuestion tool to ask 2-4 focused questions tailored to the feature type.
|
|
35
|
+
|
|
36
|
+
**For Authentication/Authorization:**
|
|
37
|
+
- Authentication method (email/password, OAuth, magic links)
|
|
38
|
+
- Session management and duration
|
|
39
|
+
- Password requirements and reset flow
|
|
40
|
+
- Multi-factor authentication needed?
|
|
41
|
+
- Role-based access control requirements
|
|
42
|
+
|
|
43
|
+
**For CRUD Features (Posts, Comments, etc.):**
|
|
44
|
+
- Required fields and validations
|
|
45
|
+
- Relationships to existing models
|
|
46
|
+
- Permission levels (who can create/edit/delete)
|
|
47
|
+
- UI requirements (forms, listings, filters)
|
|
48
|
+
- Real-time updates needed?
|
|
49
|
+
|
|
50
|
+
**For Dashboard/Admin Features:**
|
|
51
|
+
- Metrics and data to display
|
|
52
|
+
- Filters and search requirements
|
|
53
|
+
- Export capabilities
|
|
54
|
+
- Access restrictions
|
|
55
|
+
- Update frequency (real-time vs static)
|
|
56
|
+
|
|
57
|
+
**General Questions (always relevant):**
|
|
58
|
+
- Target users (all users, admins, specific roles)
|
|
59
|
+
- Mobile responsiveness requirements
|
|
60
|
+
- Performance considerations
|
|
61
|
+
- Integration with existing features
|
|
62
|
+
|
|
63
|
+
### Step 3: Analyze Codebase
|
|
64
|
+
|
|
65
|
+
Use Read, Grep, and Glob tools to understand current state:
|
|
66
|
+
|
|
67
|
+
```ruby
|
|
68
|
+
# Check existing models
|
|
69
|
+
Glob: "app/models/**/*.rb"
|
|
70
|
+
|
|
71
|
+
# Find similar features
|
|
72
|
+
Grep: Search for related functionality
|
|
73
|
+
|
|
74
|
+
# Review routes
|
|
75
|
+
Read: "config/routes.rb"
|
|
76
|
+
|
|
77
|
+
# Check migrations
|
|
78
|
+
Glob: "db/migrate/**/*.rb"
|
|
79
|
+
|
|
80
|
+
# Review test structure
|
|
81
|
+
Glob: "test/**/*_test.rb"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Look for:**
|
|
85
|
+
- Existing models that need relationships
|
|
86
|
+
- Similar features to follow as patterns
|
|
87
|
+
- Naming conventions in use
|
|
88
|
+
- Testing patterns being followed
|
|
89
|
+
- Authentication/authorization setup
|
|
90
|
+
|
|
91
|
+
### Step 4: Create Implementation Plan
|
|
92
|
+
|
|
93
|
+
Design a comprehensive plan covering:
|
|
94
|
+
|
|
95
|
+
**Database Layer:**
|
|
96
|
+
- New migrations needed
|
|
97
|
+
- Model changes or new models
|
|
98
|
+
- Associations to add
|
|
99
|
+
- Indexes required for performance
|
|
100
|
+
|
|
101
|
+
**Business Logic:**
|
|
102
|
+
- Model validations
|
|
103
|
+
- Callbacks (use sparingly)
|
|
104
|
+
- Scopes for reusable queries
|
|
105
|
+
- Service objects for complex logic
|
|
106
|
+
|
|
107
|
+
**Controllers & Routes:**
|
|
108
|
+
- New controllers or actions needed
|
|
109
|
+
- RESTful routes to add
|
|
110
|
+
- Nested resources
|
|
111
|
+
- API endpoints if applicable
|
|
112
|
+
|
|
113
|
+
**Views & Frontend:**
|
|
114
|
+
- New views or partials
|
|
115
|
+
- Forms with proper helpers
|
|
116
|
+
- Turbo Frames/Streams for interactivity
|
|
117
|
+
- Stimulus controllers for JavaScript
|
|
118
|
+
- TailwindCSS styling approach
|
|
119
|
+
|
|
120
|
+
**Testing:**
|
|
121
|
+
- Model tests (validations, associations)
|
|
122
|
+
- Controller tests (actions, responses)
|
|
123
|
+
- System tests (user workflows)
|
|
124
|
+
- Fixtures or factories needed
|
|
125
|
+
|
|
126
|
+
**Security & Performance:**
|
|
127
|
+
- Authorization checks required
|
|
128
|
+
- Input sanitization points
|
|
129
|
+
- N+1 query prevention
|
|
130
|
+
- Caching opportunities
|
|
131
|
+
|
|
132
|
+
### Step 5: Create Task List
|
|
133
|
+
|
|
134
|
+
Use TodoWrite tool to create actionable tasks in logical order:
|
|
135
|
+
|
|
136
|
+
1. **Database setup** - Migrations, models, associations
|
|
137
|
+
2. **Business logic** - Validations, scopes, methods
|
|
138
|
+
3. **Controllers & routes** - RESTful actions, authorization
|
|
139
|
+
4. **Views & frontend** - Forms, Turbo Frames, TailwindCSS
|
|
140
|
+
5. **Testing** - Model, controller, system tests
|
|
141
|
+
6. **Review & polish** - Linters, security scan, browser testing
|
|
142
|
+
|
|
143
|
+
Each task should:
|
|
144
|
+
- Be specific and actionable
|
|
145
|
+
- Include both imperative and active forms
|
|
146
|
+
- Follow logical dependencies
|
|
147
|
+
- Include testing and review steps
|
|
148
|
+
|
|
149
|
+
### Step 6: Identify Dependencies & Risks
|
|
150
|
+
|
|
151
|
+
Call out potential issues:
|
|
152
|
+
- **Dependencies**: Gems to install, external services
|
|
153
|
+
- **Breaking changes**: Migrations affecting existing data
|
|
154
|
+
- **Risks**: Complex logic, performance concerns, security
|
|
155
|
+
- **Open questions**: Decisions needed before proceeding
|
|
156
|
+
|
|
157
|
+
### Step 7: Present Plan Summary
|
|
158
|
+
|
|
159
|
+
Provide a clear summary:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
## Feature: [Name]
|
|
163
|
+
|
|
164
|
+
### Overview
|
|
165
|
+
[1-2 sentence description]
|
|
166
|
+
|
|
167
|
+
### Key Requirements
|
|
168
|
+
- Requirement 1
|
|
169
|
+
- Requirement 2
|
|
170
|
+
- Requirement 3
|
|
171
|
+
|
|
172
|
+
### Technical Approach
|
|
173
|
+
- Database: [brief description]
|
|
174
|
+
- Backend: [brief description]
|
|
175
|
+
- Frontend: [brief description]
|
|
176
|
+
- Testing: [brief description]
|
|
177
|
+
|
|
178
|
+
### Files to Create/Modify
|
|
179
|
+
- db/migrate/xxx_create_table.rb
|
|
180
|
+
- app/models/model.rb
|
|
181
|
+
- app/controllers/controller.rb
|
|
182
|
+
- app/views/resource/
|
|
183
|
+
- test/models/model_test.rb
|
|
184
|
+
|
|
185
|
+
### Tasks Created
|
|
186
|
+
[X tasks tracked in todo list]
|
|
187
|
+
|
|
188
|
+
### Next Steps
|
|
189
|
+
1. Review and confirm approach
|
|
190
|
+
2. (Optional) Run /refine-requirements to clarify details with follow-up questions
|
|
191
|
+
3. (Optional) Run /create-task-files to export tasks to markdown files
|
|
192
|
+
4. Start with: [first task]
|
|
193
|
+
5. Proceed sequentially through tasks
|
|
194
|
+
|
|
195
|
+
Ready to start implementation?
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Note:** After planning, you can:
|
|
199
|
+
- Run `/refine-requirements` to ask follow-up questions and clarify ambiguous requirements
|
|
200
|
+
- Run `/create-task-files` to export tasks into structured markdown files (epic, user-story, bug, issue) in a `tasks/` directory for git-based tracking
|
|
201
|
+
|
|
202
|
+
## Best Practices
|
|
203
|
+
|
|
204
|
+
**Do:**
|
|
205
|
+
- ✅ Ask focused, specific questions
|
|
206
|
+
- ✅ Search codebase before suggesting new patterns
|
|
207
|
+
- ✅ Follow existing project conventions
|
|
208
|
+
- ✅ Break features into small, manageable tasks
|
|
209
|
+
- ✅ Consider testing from the start
|
|
210
|
+
- ✅ Reference `.claude/rules/*.md` for implementation patterns
|
|
211
|
+
|
|
212
|
+
**Don't:**
|
|
213
|
+
- ❌ Make assumptions - ask when unclear
|
|
214
|
+
- ❌ Create vague or ambiguous tasks
|
|
215
|
+
- ❌ Ignore existing similar features
|
|
216
|
+
- ❌ Skip security considerations
|
|
217
|
+
- ❌ Forget mobile responsiveness
|
|
218
|
+
- ❌ Plan without understanding current state
|
|
219
|
+
|
|
220
|
+
## Integration with Project
|
|
221
|
+
|
|
222
|
+
This skill works within the Rails blog app structure:
|
|
223
|
+
|
|
224
|
+
- **Follows**: `.claude/CLAUDE.md` for project-specific setup
|
|
225
|
+
- **Applies**: `.claude/rules/*.md` for implementation guidelines
|
|
226
|
+
- **Uses**: Minitest (not RSpec) for testing
|
|
227
|
+
- **Leverages**: Hotwire, TailwindCSS, Solid trilogy
|
|
228
|
+
- **Respects**: Rails Omakase philosophy
|
|
229
|
+
|
|
230
|
+
## Example Usage
|
|
231
|
+
|
|
232
|
+
**User request:**
|
|
233
|
+
```
|
|
234
|
+
Plan a blog post commenting system
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Skill workflow:**
|
|
238
|
+
1. Asks: Comment nesting? Moderation? Real-time updates? Email notifications?
|
|
239
|
+
2. Analyzes: Checks for Post model, User model, existing auth patterns
|
|
240
|
+
3. Plans: Comment model with polymorphic associations, controller, Turbo Streams
|
|
241
|
+
4. Creates: 12 tasks from migration → tests → polish
|
|
242
|
+
5. Presents: Summary with technical approach and file list
|
|
243
|
+
6. Awaits: User confirmation to begin
|
|
244
|
+
|
|
245
|
+
## Output
|
|
246
|
+
|
|
247
|
+
Always use TodoWrite to create trackable tasks with:
|
|
248
|
+
- Clear descriptions (imperative: "Create migration", active: "Creating migration")
|
|
249
|
+
- Logical ordering (database → logic → UI → tests)
|
|
250
|
+
- Testing tasks included
|
|
251
|
+
- Review/polish tasks at end
|
|
252
|
+
|
|
253
|
+
This ensures thorough planning, reduces rework, and aligns with Rails best practices before writing code.
|