rigor: Skill for Claude Code

.claude/skills/rigor-ffi-plugin-author/SKILL.md

rigor-ffi-plugin-author is a skill for Claude Code from rigortype/rigor. It costs 59 tokens per session (4,004 once invoked), scanned A, original, MPL-2.0.

A workflow for assessing and, when needed, creating a Rigor add-on for Ruby gems that use FFI, a way for Ruby code to call libraries written in other languages. It first checks whether Rigor already supports the gem.

In plain words
What is it for?
Use it to assess a Ruby FFI gem, decide whether a separate add-on is needed, and author that add-on when the wrapper has one of the documented binding problems.
Why use it?
It prevents unnecessary add-ons when existing support is enough and focuses work on FFI wrappers that remain untyped or uncertain.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is rigortype/rigor's own configuration. It tells Claude Code how to work on rigor itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rigor configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rigortype/rigor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rigortype/rigor/master/.claude/skills/rigor-ffi-plugin-author/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/rigortype/rigor

Made for: Claude Code.

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-ffi-plugin-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/rigortype/rigor/rigor-ffi-plugin-author/github.svg)](https://agentmods.dev/skills/rigortype/rigor/rigor-ffi-plugin-author)
Your own site
<a href="https://agentmods.dev/skills/rigortype/rigor/rigor-ffi-plugin-author"><img src="https://agentmods.dev/badge/skills/rigortype/rigor/rigor-ffi-plugin-author/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-ffi-plugin-author

Your own site · 80×15
<a href="https://agentmods.dev/skills/rigortype/rigor/rigor-ffi-plugin-author"><img src="https://agentmods.dev/badge/skills/rigortype/rigor/rigor-ffi-plugin-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,004 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.00059 $0.04004
Opus 5.5 $0.00024 $0.01602
Sonnet 5.5 $0.00012 $0.00801
Haiku 4.5 $0.00006 $0.00400

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

Security

Grade A, and why

rigor-ffi-plugin-author 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 11d ago.

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.

.claude/skills/rigor-ffi-plugin-author/SKILL.md · 334 lines

How it starts

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

Rigor FFI Plugin Author

Sub-plugin for FFI-binding gems. Starts with an assessment phase that will talk you out of authoring a plugin if core rigor-ffi already covers the gem — that's the point. Plugins only exist where the four binding-recovery hazards documented in ADR-30 appear.

Phase 0 — When to trigger this SKILL

Trigger when the user wants to type FFI bindings on a gem that isn't already one of the four bundled consumers (rigor-rbnacl, rigor-ethon, rigor-ffi-rzmq, rigor-sassc). Typical asks:

  • "Our internal libacme Ruby gem wraps libacme via FFI; the wrapper class methods all type as Dynamic[Top]."
  • "Add a Rigor plugin for OSS gem X that uses the ffi gem."
  • "The ffx translator complains about our binding file — can Rigor catch this statically?"

Do NOT trigger for:

  • Edits to an existing bundled rigor-rbnacl / rigor-ethon / rigor-ffi-rzmq / rigor-sassc — use the general rigor-plugin-author SKILL or treat as ordinary edit work.
  • Core rigor-ffi engine changes (the BindingRecognizer extension point, the typedef-nominal heuristic, the ffx.unsupported-* diagnostic family) — those are core development under lib/rigor/, not plugin authoring.
  • Hand-written C extensions (rb_define_method in ext/*.c) — no Ruby-side static handle; out of scope per ADR-30 WD8.
  • Fiddle-based bindings — separate rigor-fiddle SKILL / plugin family (sibling, not in scope here).

Phase 1 — Coverage assessment (decide if a plugin is even needed)

Check the gem against this table. If every row is "core suffices", the SKILL terminates with "declare the dependency and stop — no plugin needed." This is the most common outcome; resist the pull to author a plugin pre-emptively.

Question about the wrapped gem's source Answer Verdict
Does the binding file use literal attach_function :name, [args], ret calls (no wrapping DSL like sodium_function)? yes core suffices
no (custom DSL) needs plugin — BindingRecognizer registration (ADR-30 WD2)
Are the bindings in this gem's lib/, or in a sibling gem (like ffi-rzmq-core for ffi-rzmq)? this gem core suffices
sibling gem needs plugin — either ADR-25 bundled RBS or wait on ADR-10 progress
Are method names generated dynamically from an option catalog (define_method over iterate option_table)? no core suffices
yes (ethon-style) needs plugin — ADR-16 Tier B/C
Does the high-level wrapper class layer add semantics richer than what the FFI primitive return type captures (e.g. "this :pointer is always a 32-byte signing-key buffer")? no — wrapper is a thin pass-through core suffices
yes — wrapper carries domain invariants the FFI types don't plugin recommended for RBS refinement (the wrapper still types correctly without the plugin, just less precisely)
Does the gem use typedef :pointer, :handle_name aliases for opaque pointers? yes — names follow _ptr / _handle / Ptr / Handle core suffices (heuristic per ADR-30 WD4)
yes — a name matches the pattern but should stay a plain :pointer core suffices; add the alias to the rigor-ffi plugin's exceptions: config in .rigor.yml

Read the full file on GitHub · 334 lines

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. 11d ago First seen · 334 lines · 59 tokens per session scan A fdabff733eea

Subscribe to this mod's changes

rigor-ffi-plugin-author is a skill published in the GitHub repository rigortype/rigor (107 stars, last pushed today), licensed MPL-2.0. It adds 59 tokens to every session and 4,004 once invoked, about $0.0002 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-10-26.

Related

rigor-ffi-plugin-author compared with skills from other repositories

rigor-ffi-plugin-author next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rigor-ffi-plugin-authorrigortype/rigorSkill107todayMPL-2.0A59Claude Code
newclacky-ai/openclackySkill1.2kyesterdayMITA10Claude Code
rspec-conventionsrootstrap/rails_api_baseSkill6342d agoMITA82Claude Code
dhh-rails-styledavekilleen/DexSkill5128d agoMITA115Claude Code
ruby-patternssoftspark/ai-toolkitSkill17910d agoApache-2.0A60Claude Code
ruby-idiomsirahardianto/awesome-agvSkill15823d agoMITA61Claude Code, Codex
ruby-rulessoftspark/ai-toolkitSkill17910d agoApache-2.0A48Claude Code