Repository navigation
Install matching rolemodel-skills from generators - #208
OutlawAndy wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A critical upstream dependency is missing, and skill refresh and download behavior need correction.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds automatic installation of matching rolemodel-skills from generators, with local archive-backed specs and documentation updates.
Changes:
- Adds shared tarball extraction to
GeneratorBase. - Integrates skills into five generators.
- Adds generator coverage and documents installed skills.
Review findings:
- Critical:
maindoes not yet containturbo-modalsandsoft-destroyable; merge #60 or use a suitable ref. - Moderate: Reruns can leave stale skill files.
- Moderate: Composite generators repeatedly download the full archive.
- Nit: Add the frozen-string-literal comment to the new spec.
| File | Summary |
|---|---|
spec/support/helpers/skills_repo_stub.rb |
Builds local skill archives for tests. |
spec/support/helpers.rb |
Configures archive stubbing. |
spec/generators/rolemodel/turbo/modals_generator_spec.rb |
Tests modal skill installation. |
spec/generators/rolemodel/turbo/form_generator_spec.rb |
Tests Turbo Fetch skill installation. |
spec/generators/rolemodel/testing/rspec_generator_spec.rb |
Tests TDD skill installation. |
spec/generators/rolemodel/soft_destroyable_generator_spec.rb |
Tests nested and missing skill behavior. |
README.md |
Documents installed agent skills. |
lib/rolemodel/generator_base.rb |
Implements shared skill archive extraction. |
lib/generators/rolemodel/turbo/modals/README.md |
Documents the modal skill. |
lib/generators/rolemodel/turbo/modals/modals_generator.rb |
Installs turbo-modals. |
lib/generators/rolemodel/turbo/form/README.md |
Documents the Turbo Fetch skill. |
lib/generators/rolemodel/turbo/form/form_generator.rb |
Installs turbo-fetch. |
lib/generators/rolemodel/testing/rspec/rspec_generator.rb |
Installs tdd. |
lib/generators/rolemodel/testing/rspec/README.md |
Documents the TDD skill. |
lib/generators/rolemodel/soft_destroyable/soft_destroyable_generator.rb |
Installs soft-destroyable. |
lib/generators/rolemodel/soft_destroyable/README.md |
Documents the soft-destroyable skill. |
lib/generators/rolemodel/optics/base/README.md |
Documents the optics skill. |
lib/generators/rolemodel/optics/base/base_generator.rb |
Installs optics-context. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ac73d1a to
eb28648
Compare
eb28648 to
443269b
Compare
8285651 to
b8bd5c3
Compare
Generators that leave conventions behind now hand the agent the matching skill. GeneratorBase#install_skill extracts skills/<name> from the rolemodel-skills tarball into .agents/skills, caching the archive for generators run together. Specs build a local tarball, so they make no network calls. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
443269b to
d2b4f15
Compare
| archive = cached_skills_archive | ||
|
|
||
| inside '.agents/skills' do | ||
| run "tar -xzf #{archive} --strip-components=2 rolemodel-skills-main/skills/#{name}" |
There was a problem hiding this comment.
Thoughts on using skills.sh CLI?
There was a problem hiding this comment.
I was thinking about that earlier today actually. That would provide an upgrade path as well..
Good call, I'll switch to npx skills


Why?
Several generators leave behind conventions that coding agents break by default. Examples: the modal pattern's 422 and no-
layoutrules, SoftDestroyable's ban on default scopes, and the rule that dynamic forms go through the turbo_form gem. The generators should hand the agent the matching skill along with the code. Fetching the skills at generate time means nothing gets copied into this gem, so nothing has to be kept in sync.What Changed
GeneratorBase#install_skill(name): extractsskills/<name>from the rolemodel-skillsmaintarball into.agents/skills. The tarball is downloaded to the app'stmp/rolemodel-skills.tar.gzand reused for 10 minutes, so generators run together (e.g.turbo:all, which runs each generator in its own process) download it once. A skill that's missing upstream shows a tar error but doesn't fail the generator.optics:base→optics-context,testing:rspec→tdd,turbo:modals→turbo-modals,turbo:form→dynamic-forms,soft_destroyable→soft-destroyableSKILLS_ARCHIVEat a local tarball built from a file list (spec/support/helpers/skills_repo_stub.rb), so the suite makes no network calls to GitHubsoft_destroyablegenerator spec covering installation of nested skill files, skill-directory scoping, and the missing-skill pathPre-merge checklist
turbo-fetchwithdynamic-forms. Until then,turbo:forminstalls nothing for its skill.turbo-modalsandsoft-destroyable. Itsturbo-fetchchanges are made moot by Grid utilities #63. Until it merges, those two generators install nothing for their skill.Notes
turbo:formto the turbo_form gem. This PR keeps the agent-skill installation, includingdynamic-formsforturbo:form..agents/skills. Re-running a generator overwrites the installed skill without prompting.optics-contextinstalled with itsassets/files, after the switch to the tarball. The affected generator specs pass locally. The full suite passes locally (111 examples).Screenshots
N/A — no UI changes
🤖 Generated with Claude Code