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
@@ -0,0 +1,311 @@
1
+ ---
2
+ name: create-task-files
3
+ description: Export tasks from TodoWrite or feature plans into structured markdown files (epic, user-story, bug, issue) in a tasks/ directory. Use when the user wants to create task files, export tasks, track work in files, or mentions "create tasks", "export", "epic", "user story".
4
+ allowed-tools: Read, Write, Glob, AskUserQuestion, Bash
5
+ ---
6
+
7
+ # Create Task Files Skill
8
+
9
+ Export planning tasks into structured, trackable markdown files organized by type (epic, user-story, bug, issue) in a `tasks/` directory. Integrates with git-based workflows for team collaboration.
10
+
11
+ ## When to Use This Skill
12
+
13
+ Use this skill when:
14
+ - User wants to export TodoWrite tasks to files
15
+ - After completing `/plan-feature` and user wants task tracking
16
+ - User mentions "create tasks", "export tasks", "epic", "user story"
17
+ - Setting up project tracking in markdown files
18
+ - Need to track bugs or issues in files
19
+
20
+ ## Task Types
21
+
22
+ This skill supports four task types:
23
+
24
+ | Type | Purpose | Example |
25
+ |------|---------|---------|
26
+ | **epic** | Large feature or initiative spanning multiple stories | "User Authentication System" |
27
+ | **user-story** | Single deliverable piece of functionality | "User can login with email/password" |
28
+ | **bug** | Defect or issue to fix | "Login form doesn't validate email format" |
29
+ | **issue** | General task, chore, or technical debt | "Refactor authentication controller" |
30
+
31
+ ## Instructions
32
+
33
+ Follow these steps when creating task files:
34
+
35
+ ### Step 1: Determine Task Source
36
+
37
+ Check if there are active TodoWrite tasks:
38
+
39
+ 1. Ask the user: "I can create task files from your current todo list or from a feature description. Which would you prefer?"
40
+ 2. If using todo list, analyze the current tasks
41
+ 3. If using feature description, ask for the feature details
42
+
43
+ ### Step 2: Gather Task Configuration
44
+
45
+ Use AskUserQuestion to ask:
46
+
47
+ **Question 1: Task Types**
48
+ - Which task types to create?
49
+ - Options: "All types (epic + stories)", "User stories only", "Custom selection"
50
+
51
+ **Question 2: Grouping Strategy**
52
+ - How to group tasks?
53
+ - Options: "By implementation layer (DB, Logic, UI, Tests)", "By feature area", "Chronological order"
54
+
55
+ **Question 3: Metadata**
56
+ - What additional metadata?
57
+ - Options: "Priority + Labels", "Just basics", "Full metadata (assignee, estimates)"
58
+
59
+ ### Step 3: Create Tasks Directory
60
+
61
+ Create the directory structure:
62
+
63
+ ```bash
64
+ mkdir -p tasks
65
+ ```
66
+
67
+ Check if `tasks/README.md` exists. If not, create it with:
68
+
69
+ ```markdown
70
+ # Project Tasks
71
+
72
+ This directory contains structured task tracking files for features, bugs, and issues.
73
+
74
+ ## Task Types
75
+
76
+ - **epic-XXX**: Large features or initiatives
77
+ - **story-XXX**: User stories and deliverable functionality
78
+ - **bug-XXX**: Defects and issues to fix
79
+ - **issue-XXX**: General tasks, chores, technical debt
80
+
81
+ ## Workflow
82
+
83
+ 1. Tasks are created from feature planning
84
+ 2. Update task status as work progresses
85
+ 3. Check off acceptance criteria when complete
86
+ 4. Link related tasks using task IDs
87
+
88
+ ## Status Values
89
+
90
+ - `todo`: Not started
91
+ - `in-progress`: Currently being worked on
92
+ - `blocked`: Waiting on dependency
93
+ - `review`: Ready for review
94
+ - `done`: Completed
95
+
96
+ ## File Naming
97
+
98
+ Format: `{type}-{number}-{slug}.md`
99
+
100
+ Examples:
101
+ - `epic-001-user-authentication.md`
102
+ - `story-001-login-form.md`
103
+ - `bug-001-email-validation.md`
104
+ ```
105
+
106
+ ### Step 4: Analyze and Structure Tasks
107
+
108
+ Based on the source (TodoWrite or description):
109
+
110
+ 1. **Identify the Epic**: The main feature/initiative
111
+ 2. **Break into User Stories**: Discrete deliverable pieces
112
+ 3. **Identify Dependencies**: Which tasks block others
113
+ 4. **Assign Priorities**: Based on dependencies and importance
114
+
115
+ **Example breakdown:**
116
+ ```
117
+ Epic: Blog Post Commenting System
118
+ ├── Story 1: Comment model and database
119
+ ├── Story 2: Comment controller and routes
120
+ ├── Story 3: Comment form UI with Turbo
121
+ ├── Story 4: Comment listing with nested replies
122
+ └── Story 5: Email notifications for replies
123
+ ```
124
+
125
+ ### Step 5: Generate Task Files
126
+
127
+ Create files using the templates (see templates/ directory).
128
+
129
+ **Naming convention:** `{type}-{number}-{slug}.md`
130
+
131
+ **Numbering:**
132
+ - Check existing tasks: `ls tasks/{type}-* 2>/dev/null | wc -l`
133
+ - Increment from highest existing number
134
+ - Pad with zeros: `001`, `002`, etc.
135
+
136
+ **Slug generation:**
137
+ - Lowercase title
138
+ - Replace spaces with hyphens
139
+ - Remove special characters
140
+ - Max 50 characters
141
+
142
+ ### Step 6: Create Task Files
143
+
144
+ For each task, create a markdown file using the templates in the `templates/` directory.
145
+
146
+ **Available templates:**
147
+ - [templates/epic.md](templates/epic.md) - For large features/initiatives
148
+ - [templates/user-story.md](templates/user-story.md) - For deliverable functionality
149
+ - [templates/bug.md](templates/bug.md) - For defects and bugs
150
+ - [templates/issue.md](templates/issue.md) - For chores and technical debt
151
+
152
+ **Template usage:**
153
+ - Read the appropriate template file from `templates/` directory
154
+ - Replace placeholder values: `{number}`, `{Epic Title}`, `{YYYY-MM-DD}`, etc.
155
+ - Use Write tool to create the task file in `tasks/` directory
156
+
157
+ For full template details, see the files in `templates/` directory.
158
+
159
+ ### Step 7: Create Task Index
160
+
161
+ After creating all task files, update or create `tasks/INDEX.md`:
162
+
163
+ ```markdown
164
+ # Task Index
165
+
166
+ Generated: {YYYY-MM-DD HH:MM}
167
+
168
+ ## Epics
169
+
170
+ - [epic-001](epic-001-slug.md) - {Title} `[status]`
171
+
172
+ ## User Stories
173
+
174
+ - [story-001](story-001-slug.md) - {Title} `[status]` (epic-001)
175
+ - [story-002](story-002-slug.md) - {Title} `[status]` (epic-001)
176
+
177
+ ## Bugs
178
+
179
+ - [bug-001](bug-001-slug.md) - {Title} `[status]`
180
+
181
+ ## Issues
182
+
183
+ - [issue-001](issue-001-slug.md) - {Title} `[status]`
184
+
185
+ ## By Status
186
+
187
+ ### Todo
188
+ - story-001, bug-001
189
+
190
+ ### In Progress
191
+ - story-002
192
+
193
+ ### Done
194
+ - issue-001
195
+ ```
196
+
197
+ ### Step 8: Present Summary
198
+
199
+ Show the user what was created:
200
+
201
+ ```
202
+ ## Task Files Created
203
+
204
+ Created {N} task files in tasks/ directory:
205
+
206
+ ### Epic
207
+ - tasks/epic-001-feature-name.md
208
+
209
+ ### User Stories (5)
210
+ - tasks/story-001-database-setup.md
211
+ - tasks/story-002-business-logic.md
212
+ - tasks/story-003-ui-implementation.md
213
+ - tasks/story-004-testing.md
214
+ - tasks/story-005-polish.md
215
+
216
+ ### Structure
217
+ tasks/
218
+ ├── README.md
219
+ ├── INDEX.md
220
+ ├── epic-001-feature-name.md
221
+ └── story-001-database-setup.md
222
+
223
+ ### Next Steps
224
+ 1. Review task files and update priorities
225
+ 2. Assign tasks to team members (update frontmatter)
226
+ 3. Start with: tasks/story-001-database-setup.md
227
+ 4. Update status as work progresses
228
+ 5. Commit to git: git add tasks/ && git commit -m "Add tasks for {feature}"
229
+
230
+ Tasks are now tracked in markdown files and can be committed to version control.
231
+ ```
232
+
233
+ ## Best Practices
234
+
235
+ **Do:**
236
+ - ✅ Create one epic per feature/initiative
237
+ - ✅ Break epics into 3-7 user stories
238
+ - ✅ Use clear, actionable titles
239
+ - ✅ Include acceptance criteria
240
+ - ✅ Link related tasks with IDs
241
+ - ✅ Update task status as work progresses
242
+ - ✅ Commit task files to git
243
+
244
+ **Don't:**
245
+ - ❌ Create too many task types (keep it simple)
246
+ - ❌ Make user stories too large (split them)
247
+ - ❌ Skip acceptance criteria
248
+ - ❌ Forget to update task status
249
+ - ❌ Duplicate tasks between TodoWrite and files
250
+ - ❌ Create tasks without clear ownership
251
+
252
+ ## Integration
253
+
254
+ **With plan-feature skill:**
255
+ After `/plan-feature` completes, it will suggest running this skill to export tasks to files.
256
+
257
+ **With TodoWrite:**
258
+ Can read current TodoWrite tasks and convert them to structured files.
259
+
260
+ **With Git:**
261
+ Task files are designed to be committed to version control for team collaboration.
262
+
263
+ ## File Structure
264
+
265
+ ```
266
+ tasks/
267
+ ├── README.md # Overview of task system
268
+ ├── INDEX.md # Auto-generated index of all tasks
269
+ ├── epic-001-user-auth.md # Epic for authentication
270
+ ├── story-001-login-model.md # User story for login model
271
+ ├── story-002-login-controller.md # User story for login controller
272
+ ├── story-003-login-ui.md # User story for login UI
273
+ ├── bug-001-email-validation.md # Bug fix task
274
+ └── issue-001-refactor-auth.md # Technical debt task
275
+ ```
276
+
277
+ ## Example Usage
278
+
279
+ **Scenario 1: After planning**
280
+ ```bash
281
+ /plan-feature "Add user authentication"
282
+ # ... planning completes ...
283
+ /create-task-files
284
+ # Creates epic + 5 user stories in tasks/
285
+ ```
286
+
287
+ **Scenario 2: Standalone**
288
+ ```bash
289
+ /create-task-files
290
+ # Asks: "Create tasks from todo list or feature description?"
291
+ # Creates structured task files based on input
292
+ ```
293
+
294
+ **Scenario 3: Bug tracking**
295
+ ```bash
296
+ /create-task-files
297
+ # Select: "Bug only"
298
+ # Creates bug-001-description.md with proper template
299
+ ```
300
+
301
+ ## Output
302
+
303
+ Creates structured markdown files in `tasks/` directory with:
304
+ - Proper frontmatter (YAML)
305
+ - Consistent formatting
306
+ - Clear acceptance criteria
307
+ - Dependency tracking
308
+ - Status management
309
+ - Git-friendly format
310
+
311
+ This enables team collaboration, progress tracking, and version-controlled project management.
@@ -0,0 +1,60 @@
1
+ ---
2
+ type: bug
3
+ id: bug-{number}
4
+ title: {Bug Title}
5
+ status: todo
6
+ priority: high
7
+ severity: medium
8
+ created: {YYYY-MM-DD}
9
+ updated: {YYYY-MM-DD}
10
+ labels: [bug, {component}]
11
+ ---
12
+
13
+ # Bug: {Bug Title}
14
+
15
+ ## Description
16
+
17
+ {Clear description of the bug}
18
+
19
+ ## Steps to Reproduce
20
+
21
+ 1. Step 1
22
+ 2. Step 2
23
+ 3. Step 3
24
+
25
+ ## Expected Behavior
26
+
27
+ {What should happen}
28
+
29
+ ## Actual Behavior
30
+
31
+ {What actually happens}
32
+
33
+ ## Environment
34
+
35
+ - Rails version: {version}
36
+ - Ruby version: {version}
37
+ - Browser: {if applicable}
38
+
39
+ ## Root Cause
40
+
41
+ {Analysis of why the bug occurs - fill in during investigation}
42
+
43
+ ## Fix
44
+
45
+ **Files to Modify:**
46
+ - `path/to/file.rb`
47
+
48
+ **Approach:**
49
+ {How to fix the bug}
50
+
51
+ ## Testing
52
+
53
+ - [ ] Bug reproduced locally
54
+ - [ ] Fix implemented
55
+ - [ ] Test added to prevent regression
56
+ - [ ] Manual testing complete
57
+
58
+ ## Notes
59
+
60
+ {Any additional context or related issues}
@@ -0,0 +1,47 @@
1
+ ---
2
+ type: epic
3
+ id: epic-{number}
4
+ title: {Epic Title}
5
+ status: todo
6
+ priority: high
7
+ created: {YYYY-MM-DD}
8
+ updated: {YYYY-MM-DD}
9
+ ---
10
+
11
+ # Epic: {Epic Title}
12
+
13
+ ## Overview
14
+
15
+ {1-2 paragraph description of the epic and its business value}
16
+
17
+ ## Goals
18
+
19
+ - Goal 1
20
+ - Goal 2
21
+ - Goal 3
22
+
23
+ ## User Stories
24
+
25
+ - [ ] story-{number} - {Story title}
26
+ - [ ] story-{number} - {Story title}
27
+ - [ ] story-{number} - {Story title}
28
+
29
+ ## Success Criteria
30
+
31
+ - [ ] Criteria 1
32
+ - [ ] Criteria 2
33
+ - [ ] Criteria 3
34
+
35
+ ## Technical Considerations
36
+
37
+ - Consideration 1
38
+ - Consideration 2
39
+
40
+ ## Dependencies
41
+
42
+ - Depends on: {task-id or "None"}
43
+ - Blocks: {task-id or "None"}
44
+
45
+ ## Notes
46
+
47
+ {Any additional context, links, or references}
@@ -0,0 +1,45 @@
1
+ ---
2
+ type: issue
3
+ id: issue-{number}
4
+ title: {Issue Title}
5
+ status: todo
6
+ priority: low
7
+ category: chore
8
+ created: {YYYY-MM-DD}
9
+ updated: {YYYY-MM-DD}
10
+ labels: [refactor, tech-debt]
11
+ ---
12
+
13
+ # Issue: {Issue Title}
14
+
15
+ ## Description
16
+
17
+ {Clear description of the issue, chore, or tech debt}
18
+
19
+ ## Motivation
20
+
21
+ {Why this needs to be done}
22
+
23
+ ## Tasks
24
+
25
+ - [ ] Task 1
26
+ - [ ] Task 2
27
+ - [ ] Task 3
28
+
29
+ ## Acceptance Criteria
30
+
31
+ - [ ] Criterion 1
32
+ - [ ] Criterion 2
33
+
34
+ ## Technical Notes
35
+
36
+ {Any technical details, approaches, or considerations}
37
+
38
+ ## Dependencies
39
+
40
+ - Depends on: {task-id or "None"}
41
+ - Blocks: {task-id or "None"}
42
+
43
+ ## Notes
44
+
45
+ {Any additional context}
@@ -0,0 +1,57 @@
1
+ ---
2
+ type: user-story
3
+ id: story-{number}
4
+ epic: epic-{number}
5
+ title: {Story Title}
6
+ status: todo
7
+ priority: medium
8
+ created: {YYYY-MM-DD}
9
+ updated: {YYYY-MM-DD}
10
+ labels: [backend, database]
11
+ ---
12
+
13
+ # Story: {Story Title}
14
+
15
+ ## User Story
16
+
17
+ As a {user type}
18
+ I want {goal}
19
+ So that {benefit}
20
+
21
+ ## Description
22
+
23
+ {Detailed description of what needs to be implemented}
24
+
25
+ ## Acceptance Criteria
26
+
27
+ - [ ] Criterion 1
28
+ - [ ] Criterion 2
29
+ - [ ] Criterion 3
30
+ - [ ] Tests passing
31
+ - [ ] Code reviewed
32
+
33
+ ## Technical Implementation
34
+
35
+ **Files to Create/Modify:**
36
+ - `path/to/file.rb`
37
+ - `path/to/another/file.rb`
38
+
39
+ **Approach:**
40
+ {Brief technical approach}
41
+
42
+ ## Tasks
43
+
44
+ - [ ] Subtask 1
45
+ - [ ] Subtask 2
46
+ - [ ] Subtask 3
47
+ - [ ] Write tests
48
+ - [ ] Update documentation
49
+
50
+ ## Dependencies
51
+
52
+ - Depends on: {task-id or "None"}
53
+ - Blocks: {task-id or "None"}
54
+
55
+ ## Notes
56
+
57
+ {Any additional context, edge cases, or references}