Install matching rolemodel-skills from generators - #208
Open
OutlawAndy wants to merge 5 commits into
Open
OutlawAndy wants to merge 5 commits into
OutlawAndy wants to merge 5 commits into
Conversation
4 tasks done
OutlawAndy
requested review from
Jeremy-Walton,
mark-kraemer and
wesrich
and
a lite review from Copilot
September 24, 2026 21:18
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.
Generators that leave behind conventions an agent must follow now install the matching skill from RoleModel/rolemodel-skills into .claude/skills. GeneratorBase#install_skill lists the skill's files with the GitHub trees API and downloads each with Thor's `get`, so skills are fetched fresh from `main` and there is nothing to sync into this gem. A skill missing upstream is reported rather than failing the generator. - optics:base -> optics-context - testing:rspec -> tdd - turbo:modals -> turbo-modals - turbo:form -> turbo-fetch - soft_destroyable -> soft-destroyable Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the GitHub trees API lookup plus per-file `get` with one `curl | tar` that extracts the skill directory from the rolemodel-skills tarball. No JSON parsing, no API rate limit, and nested files come along for free. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dynamic forms now go through the turbo_form gem instead of the hand-wired turbo-form Stimulus controller, which rolemodel-skills marks superseded. The generator adds the gem, runs its installer, and installs the dynamic-forms skill that replaces turbo-fetch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bundle_command already runs in Bundler.with_original_env. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Generators invoked by an umbrella generator each run in their own process, so each one downloaded the whole rolemodel-skills tarball. The archive now lives in the app's tmp/ and is reused for ten minutes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
OutlawAndy
force-pushed
the
install-agent-skills
branch
from
September 29, 2026 16:31
ac73d1a to
eb28648
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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 GitHubturbo:formnow installs the turbo_form gem and runsturbo_form:install, replacing the supersededturbo-formStimulus controller, its@rails/request.jsdependency, and theexpect_turbo_form_requestspec helper.turbo_formjoins the root Gemfile's test-app gems so the installer can boot in the generator specs.soft_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
.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