rigortype/rigor/rigor-project-init
Claude Code and agent skill by rigortype/rigor
- community
Checking that the SKILL.md file is still in the repository.
Onboard a project to Rigor from scratch by detecting the stack, selecting plugins and an adoption mode, and writing the initial config and baseline or strict gate. Use for first-time Rigor setup; not for an existing baseline or plugin authoring.
Install
npx vskill@latest install rigortype/rigor/rigor-project-initSKILL.md
Rigor Project Init
End-to-end onboarding for a project that has never run Rigor. The output is a committed .rigor.dist.yml, an explicit adoption mode, and — if the project chooses it — a .rigor-baseline.yml snapshot.
This skill is for users adopting Rigor on their own project. It uses the published rigor executable, installed standalone — Rigor is a tool, not a library, so it does not go in the project's Gemfile. For the install channels (mise recommended) see the manual's Installing Rigor chapter — rigor docs manual/01-installation once any rigor is on PATH, or (pre-install) <https://github.com/rigortype/rigor/blob/master/docs/manual/01-installation.md>. This skill references only public CLI flags and config keys — the same surface rigor --help documents.
First: load the version-current copy
This skill's step detail lives in its references/ files, and its exact commands, flags, and config keys drift between Rigor releases — so follow the copy that ships with the installed Rigor rather than any vendored or frozen copy of this file. Get the complete current procedure (body + all references, inline) in one call:
If you already loaded this skill via rigor skill you have the current copy — just proceed. If rigor is not on PATH, this task needs it: run `rigor-next-steps` to install Rigor first, then come back.
Phase 0 — When to use this skill
Trigger when the user says "set up Rigor here", "configure rigor for this app", "add type checking", or runs rigor check in a project that has no .rigor.yml / .rigor.dist.yml.
Do NOT trigger for:
- An existing baseline the user wants to shrink — that is the
rigor-baseline-reduce skill.
- Writing a Rigor plugin for the project's own DSL /
metaprogramming — that is the rigor-plugin-author skill. (This skill points at plugin authoring as an escalation in Phase 8; it does not do it.)
- Tweaking an already-configured project — ordinary edits to an
existing .rigor.yml; no onboarding pipeline needed.
Note — plugin installation
All rigor-* plugins ship bundled inside the `rigortype` gem. No separate installation is needed. Listing a plugin under plugins: in .rigor.dist.yml is sufficient to activate it. The project's Gemfile is untouched by this workflow. See `references/02-configure.md` § "No separate installation needed" for detail.
The central decision — adoption mode
A mature Ruby codebase routinely reports hundreds to thousands of diagnostics the first time rigor check runs. Most are not fresh bugs: some are real-but-empirically-safe (T | nil that production always initialises), some are project style, a minority are genuine latent bugs. Forcing every site to zero before adoption blocks adoption entirely.
So before writing any config, present the user with two modes and let them choose. The mode drives the severity profile, whether a baseline is generated, and how Phase 8 frames the leftover diagnostics.
| Acknowledge mode (baseline adoption) | Strict mode (no compromise) | |||
|---|---|---|---|---|
| Goal | Adopt Rigor now; make sure ordinary coding does not increase the diagnostic count. | Drive the project to zero outstanding diagnostics and keep it there. | ||
| Today's diagnostics | Snapshotted into .rigor-baseline.yml; suppressed as long as the count does not grow. | All surfaced; every one is fixed or consciously suppressed. | ||
| Hard-to-fix diagnostics | Left in the baseline. The project trusts its test / spec suite to cover runtime correctness for those sites — the static `T | nil` reading is worst-case-sound, the suite proves the worst case is not hit. | Fixed, or annotated # rigor:disable <rule> with an author-intent reason at the specific line. No blanket suppression. | |
severity_profile | lenient (or balanced for a small project). | strict. | ||
| Best for | Every project by default — mature or brand-new, large or small. | Users fluent in both type theory and RBS who opt in and will resolve Rigor's inference gaps themselves. | ||
| New diagnostics later | Surface immediately — anything beyond the baseline envelope is a regression. | Surface immediately — there is no envelope; every diagnostic is live. |
Both modes give the same core guarantee: a change that introduces a new diagnostic is caught. They differ only in what happens to the diagnostics that exist today. Acknowledge mode parenthesises them behind a baseline and leans on the test suite; strict mode refuses to parenthesise anything.
Recommend acknowledge mode for every project, including new and small ones. Rigor's inference still has gaps, so even a fresh project meets diagnostics on correct code. Under strict mode each one needs a sig/ fix, an RBS workaround, or a reasoned # rigor:disable — work that takes type theory and RBS. Without that knowledge, users rewrite correct code for the tool or scatter suppressions. Acknowledge mode keeps the same regression guard with an exit: a new diagnostic still fails the check, and once it is confirmed as an inference gap, the baseline can absorb it (report the false positive upstream). rigor baseline regenerate rewrites the baseline from every live diagnostic, so run it only when a whole-project rigor check (no path arguments) shows nothing but confirmed false positives; otherwise it silences a real bug alongside them.
Present strict mode as an opt-in for users who know type theory and RBS, want the zero-diagnostic gate, and accept resolving inference gaps themselves — never as the recommendation, and never because the project is new, small, or a library. If the user picks it, tell them how to move to acknowledge mode later: optionally relax severity_profile, re-run triage, then run Phase 7 (generate a baseline and wire baseline:). The profile change comes first because it changes which rules fire.
For a large first run (more than ~100 errors), acknowledge mode also suggests severity_profile: lenient; see Phase 4.
Note the ordering: the error count that feeds the severity_profile choice in Phase 4 is only measured in Phase 6's triage run. Any profile written in Phase 4 is therefore provisional — Phase 6 revisits it against the measured count (see `references/02-configure.md` § "Severity profile").
Non-interactive / agent-driven runs
This skill has several ask-the-user points (the mode choice, the RBS collection install, the final gitignore-and-commit confirmation). A delegation is the user asking, before the run, for the onboarding to proceed without these questions ("set it up, don't ask me"). An ordinary request to set Rigor up is not one: ask as usual. Under a delegation those points resolve without blocking:
- The mode the user pre-declared is settled; record it and skip the
Phase 2 presentation. If the delegation names no mode, choose acknowledge mode and say so in the report — never strict.
- Low-risk, reversible, in-repo confirmations (`rbs collection
install, the .gitignore` addition) are covered by the delegation — act, and note each self-answer in your report.
- Never commit or push under a general delegation. Run the Final
step's file inventory as a report (what was created, what to commit) instead of a question, and leave the commits to the user.
Phase outline
| Phase | What | Reference | |
|---|---|---|---|
| 1 | Detect the project shape (Gemfile / Gemfile.lock walk). | `references/01-detect.md` | |
| 2 | Present the two adoption modes; record the user's choice. | (this file — § "The central decision") | |
| 3 | Select the plugin set matching the detected stack. | `references/01-detect.md` | |
| 4 | Write .rigor.dist.yml — severity profile follows the mode. Verify activation with rigor plugins. | `references/02-configure.md` | |
| 5 | Generate initial RBS sigs; uplift attr_reader precision with --params=observed. | `references/04-sig-uplift.md` | |
| 6 | Run rigor triage --format json to diagnose the diagnostic stream. | `references/03-baseline-and-bugs.md` | |
| 6a | Pre-baseline cleanup — apply quick fixes that triage diagnosed (pre_eval: for monkey-patch hints, rbs collection install if still needed). Re-run triage; repeat until the count is stable. | `references/03-baseline-and-bugs.md` § "Phase 6a" | |
| 7 | Acknowledge mode only — generate the baseline and wire baseline:. | `references/03-baseline-and-bugs.md` | |
| 8 | Surface likely real bugs; distinguish sig quality FPs from real bugs; offer escalation paths. | `references/03-baseline-and-bugs.md` | |
| 8a | Install the agent type-contract into AGENTS.md / CLAUDE.md, so an AI contributor sources types from Rigor instead of guessing them. | `references/06-agent-contract.md` | |
| 9 | Confirm the generated files with the user — what each is, and whether to commit it. | (this file — § "Final step") |
Load each reference when you reach its phase. Phases run in order; the only branch is Phase 7 (acknowledge mode runs it, strict mode skips it). Phase 5 is also optional if the project already has a committed sig/ directory.
Reading order — modules
| Module | Read | Covers | |
|---|---|---|---|
| 1 | `references/01-detect.md` | Phases 1 + 3. Gemfile / Gemfile.lock walk → framework family. The plugin-recommendation table (Rails / dry-rb / Sinatra / RSpec / plain Ruby). RBS-collection presence check. | |
| 2 | `references/02-configure.md` | Phase 4. Severity-profile choice tied to the mode. The .rigor.dist.yml template and every key it uses. The .rigor.dist.yml vs .rigor.yml convention. | |
| 3 | `references/04-sig-uplift.md` | Phase 5. rigor sig-gen --write baseline. rigor sig-gen --params=observed --write attr_reader precision uplift. Handling residual untyped methods. Committing sig/. | |
| 4 | `references/03-baseline-and-bugs.md` | Phases 6–8. rigor triage as the diagnosis layer. Phase 6a pre-baseline cleanup loop (pre_eval: for monkey-patch hints, rbs collection install). rigor baseline generate + wiring baseline:. Surfacing likely real bugs; sig quality FP recognition (Struct call.wrong-arity, -> bot return-type-mismatch, regex-capture $1 FPs). The two escalation paths — write a project plugin, or open a Rigor issue. | |
| 5 | `references/06-agent-contract.md` | Phase 8a. The one paragraph the project's AGENTS.md / CLAUDE.md keeps so every agent session sources types from Rigor rather than guessing them. Where to append it, when to create the file, and what never to overwrite. | |
| — (optional) | `references/05-jit-performance.md` | Operational, not a phase. Run speed via a Ruby JIT: Rigor auto-enables YJIT for long runs (~5 s break-even), how to detect JIT support in your install, the override env vars, and why YJIT beats ZJIT for Rigor on Ruby 4.0. Read only when a large project's rigor check wall time matters. |
Escalation paths (Phase 8 preview)
Some diagnostic clusters are neither a quick fix nor honest baseline material. Two of them have a dedicated answer this skill hands off to:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/rigor-project-init/SKILL.md
Popularity
- Repository stars
- 107
- Repository forks
- 2
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rigortype/rigor/rigor-project-init)