rigor-rbs-contract

rigor-rbs-contract is a skill for Claude Code, Codex from rigortype/rigor. It costs 95 tokens per session (2,291 once invoked), scanned A, original, MPL-2.0.

A method for checking Ruby RBS declarations against Ruby code and documented behaviour. RBS files describe the types and guarantees that Ruby code exposes to callers.

In plain words
What is it for?
Use it to audit, repair, or extend RBS files in Ruby gems, applications, and shared type collections.
Why use it?
It finds declarations that promise too much, too little, or something different from what the code supports, and provides evidence for changing them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit, repair, or extend RBS files in Ruby gems, applications, and shared type collections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rigortype/rigor/rigor-rbs-contract
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rigortype/rigor --skill rigor-rbs-contract
Clone the repo
git clone --depth 1 https://github.com/rigortype/rigor

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rigor-rbs-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/rigortype/rigor/rigor-rbs-contract/github.svg)](https://agentmods.dev/skills/rigortype/rigor/rigor-rbs-contract)
Your own site
<a href="https://agentmods.dev/skills/rigortype/rigor/rigor-rbs-contract"><img src="https://agentmods.dev/badge/skills/rigortype/rigor/rigor-rbs-contract/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rigor-rbs-contract

Your own site · 80×15
<a href="https://agentmods.dev/skills/rigortype/rigor/rigor-rbs-contract"><img src="https://agentmods.dev/badge/skills/rigortype/rigor/rigor-rbs-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.02291
Opus 5.5 $0.00038 $0.00916
Sonnet 5.5 $0.00019 $0.00458
Haiku 4.5 $0.00010 $0.00229

Measured 19d ago against content hash 4a3e4419ee6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rigor-rbs-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (evals/fixtures/courier.rb), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/rigor-rbs-contract/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rigor RBS Contract

An RBS declaration is not a record of what a method happens to return. It is a promise about what callers may rely on. Ruby returns every method's last expression, so inference always finds some type; whether callers may depend on it is a choice only a declaration makes. This skill turns that into a repeatable loop: find where declarations and code disagree, decide which side is wrong on cited evidence, change the declaration, prove the change, and explain it so a reviewer can re-check it.

First: load the version-current copy

Commands, flags, rule ids and skip-reason ids drift between Rigor releases, so follow the copy that ships with the installed Rigor rather than a vendored or frozen copy of this file:

rigor skill --full rigor-rbs-contract   # this body + all its references/, inline

If you already loaded it via rigor skill, proceed. If rigor is not on PATH, run rigor-next-steps first.

When to use

  • A gem author wants their shipped sig/ checked, corrected or extended.
  • An application's quality owner wants the RBS their rigor check relies on — the project's sig/, or a dependency's community RBS — audited, or a wrong dependency signature fixed.
  • Someone is contributing to ruby/gem_rbs_collection: adding methods, fixing a declaration, or acting on a discrepancy Rigor surfaced.
  • A diagnostic or a review comment says "the RBS says X but the code does Y", and the task is to settle which one is right.

When NOT to use

  • Writing one type in the middle of another task → rigor-type-oracle. It owns where a single type comes from; this skill owns what a set of declarations should promise.
  • Raising rigor coverage --protection numbers on the project's own code → rigor-protection-uplift.
  • Installing community RBS that exists but is not set up → rigor-rbs-setup.
  • A Rigor diagnostic you believe is wrong about correct code → rigor-ask; that is an engine question, not a contract one.

Read the full file on GitHub · 148 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 148 lines · 95 tokens per session scan A 4a3e4419ee6d

Subscribe to this mod's changes

rigor-rbs-contract is a skill published in the GitHub repository rigortype/rigor (108 stars, last pushed today), licensed MPL-2.0. It adds 95 tokens to every session and 2,291 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.

Related

rigor-rbs-contract compared with skills from other repositories

rigor-rbs-contract next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rigor-rbs-contractrigortype/rigorSkill108todayMPL-2.0A95Claude Code, Codex
simplifymaquina-app/rails-claude-codeSkill488d agoMITA123Claude Code
gem-docs-reviewVSN2015/concerns_on_railsSkill273d agoMITA152Claude Code
sgcop-setupSonicGarden/sgcopSkill23todayMITA169Claude Code
gemtrackerspaquet/gemtrackerSkill22todayMITA49Claude Code, Codex
review-ruby-codeel-feo/ai-contextSkill129d agoMITA128Claude Code
rubocopel-feo/ai-contextSkill129d agoMITA37Claude Code