Agent skill

Rigor Add Reference

by rigortype in rigortype/rigor

Add or repair a read-only upstream submodule under references/.

MPL-2.0Auto-check passedDevelopment

Install Rigor Add Reference

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

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

GitHub CLI
$ gh skill install rigortype/rigor rigor-add-reference --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/.claude/skills/rigor-add-reference .claude/skills/rigor-add-reference && 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-add-reference
GitHub stars
106
Token cost
~2.1k tokens
SKILL.md length
867 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MPL-2.0

At a glance

Add or repair a read-only upstream submodule under references/.

  • Works in 5 steps: Decide the checkout strategy → Register the submodule → Update the Makefile → …
  • Adding a reference checkout
  • SKILL.md covers The catalog — what each tree…, Step 0 — Decide the checkout…, Step 1 — Register the submodule and Step 2 — Update the Makefile, plus 5 more sections
  • Calls git, make and rg; reaches github.com

What it does

Rigor Add Reference is an agent skill from rigortype/rigor. Add or repair a read-only upstream submodule under references/. Use when adding a reference checkout or diagnosing its clone, status, rename, or lifecycle failure; not for product code or ordinary dependency updates.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

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

When your agent uses it

  • Adding a reference checkout
  • Diagnosing its clone
  • Lifecycle failure
  • Not for product code

Example prompts

  • “/rigor-add-reference”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Decide the checkout strategy
  2. Register the submodule
  3. Update the Makefile
  4. Verify the staged set
  5. Commit

What it can do on your machine

Read from SKILL.md and the folder at commit c7b6b60. 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

    Shell commands in SKILL.md call:

    • git
    • make
    • rg
    • nix

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    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 Add Reference loads about 2.1k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 867 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

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 c7b6b60, republished under its MPL-2.0 licence (© rigortype). 867 words, ~2,125 tokens.

Download SKILL.mdSave it as .claude/skills/rigor-add-reference/SKILL.md (or your agent's skills folder).
name
rigor-add-reference
description
Add or repair a read-only upstream submodule under `references/`. Use when adding a reference checkout or diagnosing its clone, status, rename, or lifecycle failure; not for product code or ordinary dependency updates.
metadata.internal
true

Add a Reference Submodule

Use this skill when the user wants to add a new upstream repo under references/. The change always touches three things together: .gitmodules (via git submodule add), Makefile (REFERENCE_SUBMODULES list + init-submodules body), and the submodule pointer commit. They belong in a single commit.

The standing rule is in AGENTS.md: these submodules are read-only reference material, not Rigor code — never require, import, or copy upstream implementation into product code; read the behaviour, then implement the smallest Rigor-side equivalent. Update a submodule only when intentionally changing the referenced revision.

The catalog — what each tree is for

SubmoduleUpstreamUse
references/rbshttps://github.com/ruby/rbs.gitRBS syntax, stdlib signatures, test cases, implementation behaviour. The compatibility target for the RBS ecosystem.
references/python-typinghttps://github.com/python/typing.gitWritten-down Python typing concepts (gradual typing, generics, protocols, variance), borrowed by idea only. Not a syntax compatibility target.
references/rubyhttps://github.com/ruby/ruby.git (branch ruby_4_0)Ruby interpreter source. Parsed offline to derive the PHPStan-functionMap-style catalog of built-in methods: argument / return types plus per-method effect facets (pure, self-mutating, block-dependent). Never link Rigor runtime code against it.
references/typeprofhttps://github.com/ruby/typeprof.gitTypeProf source — the reference implementation of Ruby type inference. Read for ideas and behaviour comparisons; never import or require it.

The trees are large, so the root .ignore lists /references/ to keep rg out by default (git is unaffected). Search one intentionally, and scope the path so you do not pull in vendor/:

sh
rg PATTERN --no-ignore references/rbs

Step 0 — Decide the checkout strategy

Before running any command, ask (or infer from context) whether a sparse checkout is needed:

  • Full checkout (default): the whole repo is useful — use git submodule update --init --filter=blob:none.
  • Sparse checkout: the repo is large but only a subdirectory matters (e.g. references/phpstan needs only website/, references/TypeScript-Website needs only packages/documentation/copy/en). Use the sparse-checkout pattern from init-submodules in the Makefile.

When in doubt, full checkout is fine. Sparse is an optimisation, not a correctness requirement.

Step 1 — Register the submodule

sh
git submodule add <upstream-url> references/<name>

Use https:// URLs for read-only public repos (like sorbet). Use git@github.com: SSH URLs for repos where write access is possible or expected (like the existing ruby/typeprof). Match the convention of whichever group the new submodule belongs to.

This writes the .gitmodules entry and stages references/<name> automatically.

Step 2 — Update the Makefile

Edit Makefile in two places:

2a. REFERENCE_SUBMODULES list (used by make pull-submodules)

Append the new entry at the end of the list, continuing the \-continuation style:

makefile
REFERENCE_SUBMODULES := \
	references/rbs \
	... \
	references/typeprof \
	references/<name>      # ← add here
2b. init-submodules target body

Full checkout — add one line after the last simple git submodule update line (before the @if sparse-checkout blocks):

makefile
	git submodule update --init --filter=blob:none references/<name>

Sparse checkout — add an @if block modelled on the existing phpstan or TypeScript-Website blocks. The structure is:

makefile
	@if [ ! -e references/<name>/.git ]; then \
		url="$$(git config -f .gitmodules submodule.references/<name>.url)"; \
		sha="$$(git rev-parse HEAD:references/<name>)"; \
		echo "Initializing references/<name> sparsely (<which-subdirectory>)"; \
		git clone --no-checkout --filter=blob:none "$$url" references/<name>; \
		git -C references/<name> fetch origin "$$sha"; \
		git -C references/<name> sparse-checkout init --cone; \
		git -C references/<name> sparse-checkout set <subdirectory>; \
		git -C references/<name> checkout --detach "$$sha"; \
		git submodule absorbgitdirs references/<name>; \
	else \
		git submodule update --init --filter=blob:none references/<name>; \
	fi

The absorbgitdirs call is required for sparse-checkout blocks because git clone puts the .git directory inside the worktree rather than under .git/modules/.

Step 3 — Verify the staged set

sh
git status

Expected staged files:

  • modified: .gitmodules
  • modified: Makefile
  • new file: references/<name> (the submodule pointer)

No other files should be staged. If references/<name>/ appears as untracked content rather than a submodule pointer, the git submodule add in Step 1 didn't complete cleanly — re-run it.

Step 4 — Commit

Commit all three together. Subject line format (plain imperative, no prefix):

Add references/<name> submodule

Body (optional, include if the purpose isn't obvious from the name):

Wire <name> into REFERENCE_SUBMODULES and init-submodules so
make pull-submodules and make init-submodules keep it in sync
automatically.
Show full SKILL.md (345 more words)Show less

Quick checklist

  • git submodule add ran successfully and references/<name> is initialised.
  • REFERENCE_SUBMODULES in Makefile includes references/<name>.
  • init-submodules in Makefile has the correct block for the chosen checkout strategy.
  • git status shows exactly the three expected staged entries.
  • Commit contains .gitmodules, Makefile, and references/<name> — nothing else.

Submodule hygiene

Drive the lifecycle through the Make targets: make init-submodules, make pull-submodules. Avoid raw git submodule update --recursive against the whole tree — it bypasses the sparse-checkout setup init-submodules bakes in for references/phpstan and references/TypeScript-Website. If a submodule is empty after cloning, run nix develop --command make init-submodules.

Never hand-edit .gitmodules or .git/config for a rename. Use git mv old/path new/path, then git submodule sync so .git/config follows .gitmodules. Hand edits leave stale submodule.<name>.* sections and orphan .git/modules/<old>/ directories, which can crash later parent operations with a submodule.c BUG assertion.

make setup runs make init-git-config, which is idempotent and writes only to this clone's .git/config. What it sets and why:

  • submodule.recurse = false — parent operations (reset, checkout, pull) do not recurse, so one broken submodule cannot abort a parent-side git reset --hard.
  • fetch.recurseSubmodules = on-demand — git fetch pulls submodule objects only when parent commits need them.
  • status.submoduleSummary = true, diff.submodule = log — pointer changes show up instead of being silent.
  • push.recurseSubmodules = check — git push refuses if a referenced submodule commit is not pushed upstream.

Recovery cookbook

Run make doctor-submodules first when anything looks off (git status failing, parent operations exploding on a submodule). It detects stale .git/config sections with no .gitmodules entry, dangling .git pointers in submodule worktrees, orphaned .git/modules/<name>/ directories, and incomplete gitdirs (missing HEAD or objects). It reports and suggests; it changes nothing itself.

Then, after a backup if anything looks valuable:

BreakageFix
Stale .git/config section (renamed away in .gitmodules)git config --remove-section submodule.<old/name>
Orphaned .git/modules/<name>/ (no longer in .gitmodules)rm -rf .git/modules/<name> after confirming nothing references it
Submodule worktree .git points at a missing / incomplete gitdirgit submodule deinit -f <path>, then make init-submodules to re-clone
Parent git reset aborts on submodule recursionShould not happen once make init-git-config has run; escape hatch is git -c submodule.recurse=false reset --hard <ref>

© 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

Just SKILL.md in .claude/skills/rigor-add-reference of rigortype/rigor.

Open the folder on GitHubat commit c7b6b60

Compare with similar skills

Rigor Add Reference 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 Add Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rigor Add Reference this skillrigortype/rigor106—~2.1kAutomated safety check: PassMPL-2.0
Breaking Change Analysisruby-git/ruby-git1.8k—~1.7kAutomated safety check: PassMIT
Gem Dependency Managementruby-git/ruby-git1.8k—~806Automated safety check: PassMIT
Ghostty Submodule and GhosttyKit Workflowmanaflow-ai/cmux28k1 repos~580Automated safety check: PassCustom licence
GitVersion .NET DevelopmentGitTools/GitVersion3.1k—~1.7kAutomated safety check: PassMIT
OBS Plugin Dependency Upgradesorayuki/obs-multi-rtmp5.1k—~609Automated safety check: PassGPL-2.0

Similar skills

  • Breaking Change Analysis

    ruby-git/ruby-git

    Assesses what an API change would break before it is made, finds every usage, documents the impact and plans a deprecation or migration path.

    1.8k GitHub stars~1.7k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Gem Dependency Management

    ruby-git/ruby-git

    Workflow for updating gem dependencies and fixing CVEs in the ruby-git project: assess with bundle outdated and audit, edit the gemspec, test, then commit with conventional messages.

    1.8k GitHub stars~806 tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Workflow rules for the Ghostty submodule in cmux: rebuilding GhosttyKit.xcframework, pushing fork changes and updating the parent submodule pointer safely.

    28k GitHub starsUsed in 1 repo~580 tokens
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • OBS Plugin Dependency Upgrade

    sorayuki/obs-multi-rtmp

    Updates the obs-multi-rtmp plugin repo to the latest upstream plugin template and OBS Studio version, including dependency metadata, then rebuilds it with CMake.

    5.1k GitHub stars~609 tokensUpdated 5 days ago
    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

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 5 days ago
    Auto-check passed
  • Adjudicate a rigor unused report safely before proposing dead-code removal.

    106 GitHub stars~1.1k tokensUpdated 5 days ago
    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 5 days ago
    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 5 days ago
    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 5 days ago
    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 5 days ago
    Auto-check passed

Works with

Categories

Questions about Rigor Add Reference

What does Rigor Add Reference do?

Add or repair a read-only upstream submodule under references/. Rigor Add Reference is an agent skill from rigortype/rigor. Add or repair a read-only upstream submodule under references/.

When should I use Rigor Add Reference?

Rigor Add Reference fits situations like: adding a reference checkout; diagnosing its clone; lifecycle failure; not for product code.

How do I install Rigor Add Reference in Claude Code?

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

How do I install Rigor Add Reference in Codex?

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

Can I use Rigor Add Reference 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-add-reference -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-add-reference, .gemini/skills/rigor-add-reference, .github/skills/rigor-add-reference and .opencode/skills/rigor-add-reference in your project.

What does Rigor Add Reference need to run?

Going by SKILL.md and its folder, Rigor Add Reference needs the command-line tools its instructions call (git, make, rg and nix). Our summary lists: Python 3.

Does Rigor Add Reference access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Rigor Add Reference 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 Add Reference use?

Rigor Add Reference is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rigor Add Reference use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rigor Add Reference?

Skills that share tags, products or a category with Rigor Add Reference: Breaking Change Analysis (ruby-git/ruby-git, 1.8k stars), Gem Dependency Management (ruby-git/ruby-git, 1.8k stars), Ghostty Submodule and GhosttyKit Workflow (manaflow-ai/cmux, 28k stars) and GitVersion .NET Development (GitTools/GitVersion, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rigor Add Reference?

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 2, 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.