Agent skill

Rigor Type Oracle

by rigortype in rigortype/rigor

Obtain a Ruby type from Rigor before writing or asserting it, using type-of, annotate, or sig-gen as appropriate.

MPL-2.0Auto-check passedDevelopment

Install Rigor Type Oracle

skills CLI
$ npx skills add rigortype/rigor --skill rigor-type-oracle -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rigortype/rigor rigor-type-oracle --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rigortype/rigor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rigor-type-oracle .claude/skills/rigor-type-oracle && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rigor-type-oracle
GitHub stars
106
Token cost
~2.6k tokens
SKILL.md length
1,297 words
Files
6 (incl. references)
Skills in repo
36
Repo updated
First seen
Licence
MPL-2.0

At a glance

Obtain a Ruby type from Rigor before writing or asserting it, using type-of, annotate, or sig-gen as appropriate.

  • Works in 3 steps: Report it. Give the exact command and… → Find out why, when it matters: rigor… → Route it. A project-side gap has a…
  • Inline annotations
  • SKILL.md covers First: load the…, When to use, When NOT to use and The three allowed sources, plus 6 more sections
  • Runs Ruby scripts from its folder

What it does

Rigor Type Oracle is an agent skill from rigortype/rigor. Obtain a Ruby type from Rigor before writing or asserting it, using type-of, annotate, or sig-gen as appropriate. Use when adding RBS, inline annotations, Sorbet/YARD types, type-shaped docs, or type-justified guards; not for Rigor setup or baseline reduction.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `evals/evals.json`, `references/01-oracle-commands.md` and `references/02-agents-md-fragment.md`).

It sits in Development. It works with Ruby. The repository describes itself as: Inference-first static analysis for Ruby. The licence is MPL-2.0.

When your agent uses it

  • Inline annotations
  • Sorbet/YARD types
  • Type-shaped docs
  • Type-justified guards

Example prompts

  • “/rigor-type-oracle”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Report it. Give the exact command and its exact output.
  2. Find out why, when it matters: rigor trace --format=json --line=N FILE
  3. Route it. A project-side gap has a sibling skill that closes it

What it can do on your machine

Read from SKILL.md and the folder at commit 57a67cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Ruby), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rigor Type Oracle loads about 2.6k tokens when it runs, and up to ~7.7k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 1,297 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rigortype/rigor at commit 57a67cf, republished under its MPL-2.0 licence (© rigortype). 1,297 words, ~2,575 tokens.

Download SKILL.mdSave it as .claude/skills/rigor-type-oracle/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
rigor-type-oracle
description
Obtain a Ruby type from Rigor before writing or asserting it, using `type-of`, `annotate`, or `sig-gen` as appropriate. Use when adding RBS, inline annotations, Sorbet/YARD types, type-shaped docs, or type-justified guards; not for Rigor setup or baseline reduction.
license
MPL-2.0
metadata.version
0.1.0
metadata.homepage
https://github.com/rigortype/rigor

Rigor Type Oracle

You are about to write a type. Stop and ask Rigor first.

This project has a deterministic type oracle installed. Reading the source and concluding "currency is a String, pattern is a Regexp" is plausible-guess behaviour: it is right often enough to feel safe and wrong often enough to poison a signature file, a doc comment, or a reviewer's mental model. Rigor already knows the answer — for every expression, at every line, from the same engine that will check the code tomorrow. Asking it costs one command.

The rule: a type you did not obtain from Rigor is a guess, and a guessed type is never written anywhere. Not in sig/, not in an inline annotation (#:, # @rbs), not in a Sorbet sig, not in a YARD tag, not in a doc sentence, not in a review comment, and not as the stated reason for a nil check or an is_a? guard.

First: load the version-current copy

This skill's exact commands, flags, output spellings, and skip-reason ids 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 in one call:

sh
rigor skill --full rigor-type-oracle   # this body + all its references/, inline

If you already loaded this skill via rigor skill you have the current copy — just proceed (read any references/NN-*.md from the directory the header names). If rigor is not on PATH, this task needs it: run rigor-next-steps to install Rigor first, then come back.

When to use

Trigger on the act, not on the user saying the word "type". You are in scope the moment you are about to write or assert one:

  • Writing or editing RBS under sig/.
  • Writing an inline annotation — rbs-inline #:, # @rbs, a %a{rigor:v1:…} override.
  • Writing a Sorbet sig do … end, or any other type DSL.
  • Writing a YARD / RDoc @param / @return / @raise, or any doc sentence that names a type ("returns an Array of entries").
  • Stating a type in a review comment, a PR description, or a chat answer.
  • Justifying a nil check, an is_a? / respond_to? guard, or a defensive to_s with "this should be an X".
  • Being asked "what type is this?", "what does this method return?", "add types to this class", "document this file".

When NOT to use

  • Setting Rigor up on a project that has none → rigor-next-steps (which routes to rigor-project-init). You cannot ask an oracle that is not installed.
  • Working an existing .rigor-baseline.yml down → rigor-baseline-reduce. That is fixing diagnostics, not sourcing a type.
  • Raising type protection from a coverage --protection list → rigor-protection-uplift. It owns the "where should a type go, and how do I verify it" loop; this skill owns "where does the type itself come from".

The three allowed sources

Every type you write comes from exactly one of these. There is no fourth.

What you needAsk Rigor withWhat you write
The type of an expression at a pointrigor type-of FILE:LINE:COL — or rigor annotate FILE for every line at oncethe type: it prints, verbatim
The signature of a methodrigor sig-gen --print FILEthe RBS it prints, verbatim — never what you expected it to print
A parameter's intended typerigor sig-gen --observe PATH --params=observed (call-site derivation)the observed type, reviewed and widened, kept only while rigor check stays green

The parameter row is the one genuine gap. Inference reads a method body, and a body does not state what its callers are allowed to pass — so Rigor spells parameters untyped by design (ADR-5: strict on returns, lenient on parameters). --params=observed derives them from the call sites instead, which is evidence rather than invention — but it is narrow evidence (it can emit literal types such as ("JPY")), so it is the one place you review and widen before adopting, under the gate that rigor check gains no new diagnostic.

Exact command forms, flags, position syntax, JSON shapes, and how to read each output: references/01-oracle-commands.md.

The gap protocol — a gap is a finding, not a blank to fill

Dynamic[top], untyped, and a sig.skipped.* classification are answers. They mean "Rigor cannot prove a type here", which is information about the project or about the engine. Filling that hole with your own reading converts a known unknown into a confident falsehood, and it does so in a file the next reader will trust.

So when the oracle comes back empty:

  1. Report it. Give the exact command and its exact output.
  2. Find out why, when it matters: rigor trace --format=json --line=N FILE replays how the type was built; rigor explain <rule> documents a diagnostic that fired nearby.
  3. Route it. A project-side gap has a sibling skill that closes it (missing gem RBS → rigor-rbs-setup; an unconfigured framework → rigor-plugin-tune; the project's own monkey-patches → rigor-monkeypatch-resolve; a project DSL → rigor-plugin-author). An engine-side gap is a Rigor issue.

Which output means which gap, the full routing table, and how to word the issue: references/03-gap-protocol.md.

Show full SKILL.md (486 more words)Show less

Provenance — every type you state carries its command

When you tell a human a type, tell them how to re-derive it. One line is enough:

entries_matching returns Array[untyped] | [] (rigor sig-gen --print lib/demo/budget_ledger.rb).

This is not ceremony. It is the difference between an assertion the reader must trust and a claim they can re-run in three seconds — and it is what makes a wrong answer findable instead of permanent.

With the MCP server connected, use the tools

If the Rigor MCP server is wired up (rigor-mcp-setup), rigor_type_of, rigor_annotate, rigor_sig_gen, rigor_check, and rigor_explain are the same oracle as tool calls — prefer them over shelling out, and treat their results exactly as this skill treats CLI output. Argument shapes: references/01-oracle-commands.md § "The MCP tools".

Worked example

Asked to document Demo::BudgetLedger, the guessing path writes @param currency [String], @return [Numeric], @param pattern [Regexp]. Here is the oracle path.

sh
rigor annotate lib/demo/budget_ledger.rb
ruby
    def initialize(currency, opening_balance: 0)   #=> Dynamic[top]
      @currency = currency                         #=> Dynamic[top]
      @entries = []                                #=> []
    def balance(as_of: nil)                        #=> Dynamic[top]
    def entries_matching(pattern)                  #=> Array[Dynamic[top]] | []
sh
rigor sig-gen --print lib/demo/budget_ledger.rb
rigor sig-gen: skipped 2 method(s) it could not type or would not overwrite
(sig.skipped.untyped-return: 2). Run with --format=json to see each one with
its skip_reason.
class Demo::BudgetLedger
  def initialize: (untyped, ?opening_balance: untyped) -> void
  def record: (untyped, ?memo: untyped, ?at: untyped) -> Demo::BudgetLedger
  def entries_matching: (untyped) -> (Array[untyped] | [])
end

What you now know, and may write: record returns Demo::BudgetLedger; entries_matching returns Array[untyped] | []. What you must report rather than write: balance and overdrawn? were skipped as sig.skipped.untyped-return — @opening_balance is Dynamic[top], so the arithmetic proves nothing. currency is not String on any evidence Rigor has; it is untyped, and the YARD tag is @param currency — the ledger's currency with no type at all.

Call-site derivation closes the parameter half where specs exist:

sh
rigor sig-gen --print --params=observed --observe spec lib/demo/budget_ledger.rb
#   def initialize: ("JPY", ?opening_balance: 100) -> void
#   def entries_matching: (Regexp) -> (Array[untyped] | [])

entries_matching: (Regexp) is now derived, and adoptable. The ("JPY") / 100 literals are the narrowness warned about above — widen them to String / Integer before adopting, and keep the change only while rigor check stays green.

When the user insists on a hand-written type anyway

They may. It is their code, and a human can know an intended contract that no static reading can prove. Do not argue past one exchange:

  1. Say once what Rigor actually reports for that site, with the command.
  2. Write what they asked for.
  3. Run rigor check on the touched paths and report the result.
  4. Say which lines the check covers. A green rigor check proves that the annotation contradicts nothing Rigor can currently see — it does not prove the contract. Where the surrounding types are untyped, there is nothing to contradict, and you must say so rather than let a green run read as confirmation.

If the check does go red, the annotation modeled the wrong contract: report it and revert, never suppress the diagnostic.

The same holds for an inline annotation a human wrote as documentation — #: void, #: :asc | :desc, a parameter contract. It is their intent, checked by rigor check, not a guess for you to "correct" to what inference shows. Leave it; if the check finds a contradiction, report that.

Installing the rule in the project

An agent that never loads this skill still guesses. The durable fix is one paragraph in the project's AGENTS.md / CLAUDE.md, so the rule is in context every session rather than only when a skill happens to trigger. The text to paste: references/02-agents-md-fragment.md. rigor-project-init installs it during onboarding.

© rigortype, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/rigor-type-oracle of rigortype/rigor.

  • SKILL.md
  • evals/evals.json
  • evals/fixtures/budget_ledger.rb
  • references/01-oracle-commands.md
  • references/02-agents-md-fragment.md
  • references/03-gap-protocol.md

Open the folder on GitHubat commit 57a67cf

Compare with similar skills

Rigor Type Oracle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rigor Type Oracle compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rigor Type Oracle this skillrigortype/rigor106—~2.6kAutomated safety check: PassMPL-2.0
Gumroad Prod Consoleantiwork/gumroad9.8k—~2.9kAutomated safety check: NotesMIT
Fastlane Pull Request Reviewfastlane/fastlane42k—~550Automated safety check: PassMIT
Dependency UpdaterAsvarox/allkaraoke2614 repos~3.5kAutomated safety check: PassMIT
Wise APIlineofflight/frankfurter2k—~1.1kAutomated safety check: PassMIT
Write RbsDataDog/dd-trace-rb417—~805Automated safety check: PassCustom licence

Similar skills

  • Gumroad Prod Console

    antiwork/gumroad

    Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.

    9.8k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Reviews a fastlane pull request against its linked issue and the project guides, separating blocking from non-blocking findings and handling vulnerabilities privately.

    42k GitHub stars~550 tokensUpdated today
    DevelopmentAuto-check passed
  • Dependency Updater

    Asvarox/allkaraoke

    Smart dependency management for any language. An agent skill from Asvarox/allkaraoke.

    261 GitHub starsUsed in 4 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Wise API

    lineofflight/frankfurter

    A skill your agent uses when querying Wise for exchange rates (real-time or historical), validating Frankfurter rates against Wise mid-market, debugging rate discrepancies, or when the user mentions…

    2k GitHub stars~1.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Write Rbs

    DataDog/dd-trace-rb

    Official

    A skill your agent uses when writing, reviewing, or modifying RBS type signatures (sig//.rbs, vendor/rbs//.rbs, or inline : annotations) or running Steep – e.g.

    417 GitHub stars~805 tokensUpdated today
    DevelopmentAuto-check passed
  • Addresses unresolved pull request review threads and suppressed (low-confidence) Copilot review comments on the current branch, folds each fix into the…

    1.8k GitHub stars~657 tokensUpdated 7 days ago
    DevelopmentAuto-check passed

More from rigortype/rigor

All 36 skills in this repo
  • Rigor Regression Sweep

    rigortype/rigor

    Measure Rigor's baseline drift across the tagged history of a real OSS Ruby project.

    106 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Adjudicate a rigor unused report safely before proposing dead-code removal.

    106 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Rigor Baseline Reduce

    rigortype/rigor

    Reduce an existing .rigor-baseline.yml rule by rule by triaging sites, fixing or intentionally suppressing them, and regenerating the baseline.

    106 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Rigor Doctor

    rigortype/rigor

    Validate that a project's Rigor configuration, plugins, paths, and baseline are actually healthy.

    106 GitHub stars~767 tokensUpdated yesterday
    Auto-check passed
  • Rigor Plugin Author

    rigortype/rigor

    Author a new Rigor plugin, choosing plugins/ for production support or examples/ for a contract walkthrough.

    106 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check: notes
  • Rigor Plugin Author

    rigortype/rigor

    Author a Rigor plugin in an adopting project or standalone rigor- gem for a DSL, framework, or metaprogramming pattern.

    106 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Rigor Type Oracle

What does Rigor Type Oracle do?

Obtain a Ruby type from Rigor before writing or asserting it, using type-of, annotate, or sig-gen as appropriate. Rigor Type Oracle is an agent skill from rigortype/rigor. Obtain a Ruby type from Rigor before writing or asserting it, using type-of, annotate, or sig-gen as appropriate.

When should I use Rigor Type Oracle?

Rigor Type Oracle fits situations like: inline annotations; sorbet/YARD types; type-shaped docs; type-justified guards.

How do I install Rigor Type Oracle in Claude Code?

Run `npx skills add rigortype/rigor --skill rigor-type-oracle -a claude-code`. Or copy the skill folder (skills/rigor-type-oracle in rigortype/rigor) into .claude/skills/rigor-type-oracle in your project. Claude Code loads it when a task matches its description.

How do I install Rigor Type Oracle in Codex?

Run `npx skills add rigortype/rigor --skill rigor-type-oracle -a codex`. Or copy the skill folder (skills/rigor-type-oracle in rigortype/rigor) into .agents/skills/rigor-type-oracle in your project. Codex loads it when a task matches its description.

Can I use Rigor Type Oracle in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rigortype/rigor --skill rigor-type-oracle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rigor-type-oracle, .gemini/skills/rigor-type-oracle, .github/skills/rigor-type-oracle and .opencode/skills/rigor-type-oracle in your project.

What does Rigor Type Oracle need to run?

Going by SKILL.md and its folder, Rigor Type Oracle needs Ruby for the scripts in its folder.

Does Rigor Type Oracle access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rigor Type Oracle safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rigor Type Oracle use?

Rigor Type Oracle is published under the MPL-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rigor Type Oracle use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.1k tokens, read only when the agent opens those files.

What are the alternatives to Rigor Type Oracle?

Skills that share tags, products or a category with Rigor Type Oracle: Gumroad Prod Console (antiwork/gumroad, 9.8k stars), Fastlane Pull Request Review (fastlane/fastlane, 42k stars), Dependency Updater (Asvarox/allkaraoke, 261 stars) and Wise API (lineofflight/frankfurter, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rigor Type Oracle?

rigortype (a GitHub organization) maintains it in rigortype/rigor, which has 106 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on October 8, 2026.

Source: rigortype/rigor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.