opsx-diff

opsx-diff is a skill for Claude Code, Codex from fjpulidop/specrails-core. It costs 45 tokens per session (3,507 once invoked), scanned A, original, MIT.

A comparison tool for showing how an OpenSpec change alters a project's specifications, including added, removed, or modified requirements.

In plain words
What is it for?
Use it to inspect acceptance-criteria, workflow, and constraint changes for a named OpenSpec change, with either a Markdown or JSON result.
Why use it?
It makes behavioral changes easier to review than comparing specification files manually.

Skill for Claude CodeCodex

Part of the specrails plugin — 29 skills, 14 agents shipped together

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.

agentmods
npx agentmods add skills/fjpulidop/specrails-core/opsx-diff
Any agent
npx skills add fjpulidop/specrails-core --skill opsx-diff
Clone the repo
git clone --depth 1 https://github.com/fjpulidop/specrails-core

Made for: Claude Code, Codex.

Or install specrails, the plugin that ships this one along with the rest of its 29 skills, 14 agents.

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 opsx-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/fjpulidop/specrails-core/opsx-diff.svg)](https://agentmods.dev/skills/fjpulidop/specrails-core/opsx-diff)
Your own site
<a href="https://agentmods.dev/skills/fjpulidop/specrails-core/opsx-diff"><img src="https://agentmods.dev/badge/skills/fjpulidop/specrails-core/opsx-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00045 $0.03507
Opus 5 $0.00023 $0.01754
Sonnet 5 $0.00009 $0.00701
Haiku 4.5 $0.00005 $0.00351

Measured 3d ago against content hash a48c77f3d1e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opsx-diff 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 3d 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.

specrails-plugin/skills/opsx-diff/SKILL.md · 431 lines

How it starts

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

OpenSpec project root. The openspec/ directory lives in the REPO, not the workspace this skill is driven from. The repo root is ${SPECRAILS_REPO_DIR:-.} (a default-unset env var: when unset it resolves to ., i.e. the current directory, so a classic in-repo run is unchanged). Run EVERY openspec command against that root — wrap each invocation as (cd "${SPECRAILS_REPO_DIR:-.}" && openspec …). Treat ${SPECRAILS_REPO_DIR:-.} as the OpenSpec project root for any path the CLI prints or you read/write.

Visualize spec changes for this project (read name from CLAUDE.md or package.json): compare the current specs against a named OpenSpec change to show exactly what behavioral requirements are being added, modified, or removed.

Input: $ARGUMENTS — accepts:

  • <change-name> — the kebab-case name of the change to diff (required). If omitted, interactive selection is offered.
  • --format json — emit structured JSON instead of markdown (default: markdown).
  • --summary-only — skip inline line-level diff; show only the file-level and behavioral summary.

Phase 0: Argument Parsing

Parse $ARGUMENTS to set runtime variables.

Variables to set:

  • CHANGE_NAME — string. Required. If not provided, prompt the user.
  • FORMAT"markdown" or "json". Default: "markdown".
  • SUMMARY_ONLY — boolean. Default: false.

Parsing rules:

  1. Scan $ARGUMENTS for --format <value>. If found and value is json, set FORMAT="json". Any other value: print Error: unknown format "<value>". Valid: markdown, json and stop. Strip from arguments.
  2. Scan for --summary-only. If found, set SUMMARY_ONLY=true. Strip from arguments.
  3. Treat the remaining token (if any) as CHANGE_NAME. Strip leading/trailing whitespace.
  4. If CHANGE_NAME is empty after parsing:
    • Run:
      (cd "${SPECRAILS_REPO_DIR:-.}" && openspec list --json)
      
    • If the result shows available changes, use the AskUserQuestion tool (open-ended, show the list) to ask which change to diff.
    • If no changes exist, print:
      Error: no active changes found. Run /opsx:new or /opsx:ff to create one first.
      
      Stop.

Print active configuration:

Diffing change: <CHANGE_NAME>
Format: <markdown|json>
Summary only: <yes|no>

Read the full file on GitHub · 431 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. 3d ago First seen · 431 lines · 45 tokens per session scan A a48c77f3d1e7

Subscribe to this mod's changes

opsx-diff is a skill published in the GitHub repository fjpulidop/specrails-core (9 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 3,507 once invoked, about $0.0002 per session on Opus 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-08-31.

Related

Other skills, from other repositories

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

code-review

Use when code has been written and needs validation before committing, or when the user asks for a code review or security check.

darrenhinde/OpenAgentsControl · 28 tokens

test-generation

Use when the user asks for tests, mentions TDD, or when new code has been written and needs test coverage.

darrenhinde/OpenAgentsControl · 27 tokens

scientific-schematics

Create publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.1 Pro Preview for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways…

xintaofei/codeg · 68 tokens

statistical-power

Sample-size and statistical power calculations for planning studies. Use whenever someone asks "how many subjects/samples/replicates do I need", wants an a priori power analysis, a minimum detectable effect (MDE), a power curve, or needs to justify a sample size for a grant, IRB protocol, or pre-registration. Covers…

xintaofei/codeg · 190 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens