off-by-none

off-by-none is a skill for Claude Code, Codex from NTCHz/off-by-none. It costs 47 tokens per session (1,208 once invoked), scanned A, original, MIT.

A requirements-driven coding workflow that derives tests from a written specification before code is written.

In plain words
What is it for?
Use it for implementing or fixing code from specs, tickets, or requirements, especially when reviewing a quick or minimal change.
Why use it?
It helps catch incorrect interpretations by testing the specification itself, including values just below, at, and above each stated limit.

Skill for Claude CodeCodex

Part of the off-by-none plugin — 1 skill 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/ntchz/off-by-none/off-by-none
Any agent
npx skills add NTCHz/off-by-none --skill off-by-none
Clone the repo
git clone --depth 1 https://github.com/NTCHz/off-by-none

Made for: Claude Code, Codex.

Or install off-by-none, the plugin that ships this one along with the rest of its 1 skill.

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 off-by-none

README.md
[![agentmods](https://agentmods.dev/badge/skills/ntchz/off-by-none/off-by-none.svg)](https://agentmods.dev/skills/ntchz/off-by-none/off-by-none)
Your own site
<a href="https://agentmods.dev/skills/ntchz/off-by-none/off-by-none"><img src="https://agentmods.dev/badge/skills/ntchz/off-by-none/off-by-none.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,208 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.00047 $0.01208
Opus 5 $0.00023 $0.00604
Sonnet 5 $0.00009 $0.00242
Haiku 4.5 $0.00005 $0.00121

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

Security

Grade A, and why

off-by-none 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.

skills/off-by-none/SKILL.md · 65 lines

How it starts

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

Spec-Faithful Implementation with Independent Verification

Overview

Self-written tests inherit the same misreading as your implementation, so they pass while the code is wrong. This skill forces test cases to be derived from the spec's literal wording BEFORE implementing, with mandatory boundary-value coverage.

Core principle: a test derived from your implementation verifies nothing. Derive every test from the spec's exact words.

Workflow

  1. Requirements ledger. Number every clause of the spec, including sub-clauses hidden inside sentences ("then re-apply rule 6" is its own entry). One checklist item per clause.

  2. Derive tests from the spec text — before writing any implementation code.

    • For every clause, write at least one case using only the spec's wording, not your planned code.
    • Boundary rule (mandatory): every numeric limit or boundary word — "at", "at or before", "exceeds", "up to", "at least", "within" — gets three cases: exactly N-1, exactly N, exactly N+1. Compute the expected outputs by hand from the spec sentence, character by character if needed.
    • Boundary words bind to what they modify. "At or before max_len" about a position (a delimiter, a marker, a match) requires a test where that thing sits exactly AT position max_len — a test where only the total length is at the limit does not cover it. For each boundary phrase, name the noun it modifies (length? index? count? position?) and put the test exactly there.
    • For every "if/when/unless" clause, one case per branch.
  3. Implement.

  4. Run the tests. Paste actual output. "I verified" without shown output is not verification.

  5. Adversarial re-read. Go back to the spec, clause by clause, and for each ask: "is there an input where another literal reading of this sentence gives a different answer than my code?" Ambiguity between two readings = write a test for both readings and pick the one the spec's words actually say.

  6. Claim done only with evidence. The final report has three REQUIRED sections (write "none" explicitly when empty):

    • Verified: the ledger with every item checked + pasted test output.
    • Assumed: every spec reference you could not inspect — external systems, config values, "same as X", "matching the existing behavior of Y". One line each. An unverifiable reference makes the ship claim conditional: state what must be confirmed, never an unqualified "ready to ship".
    • Seen but not touched: anything broken or suspicious in the code you worked around, outside the requested change. Before writing this section, re-read every function in every file you edited, including the ones you didn't change. For each untouched function, state what it literally does to its input step by step (especially any transformation that happens before a check) — observations only. Never write a verdict like "works correctly" on code you did not spec-test; you have no evidence for it. Report; do not fix. "None" means "I read the surrounding code and found nothing", never "I didn't look". "Minimal change" limits the diff, not the report.

Read the full file on GitHub · 65 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 · 65 lines · 47 tokens per session scan A 7577cbf6d9bc

Subscribe to this mod's changes

off-by-none is a skill published in the GitHub repository NTCHz/off-by-none (4 stars, last pushed 23d ago), licensed MIT. It adds 47 tokens to every session and 1,208 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.