# Omit

> Editorial discipline for AI-written code and local agent guardrails. Use for omit, simplifying code, verifying hook health, or reducing excessive tool output and repeated reads.

- Skill: `sriinnu/omit` (Agent Skill)
- Install (CLI): `npx get-skill add sriinnu/omit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sriinnu/omit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: sriinnu (https://skillmd.com/u/sriinnu)
- Updated: 2026-11-18
- Page: https://skillmd.com/skills/sriinnu/omit

---


# omit

*Omit needless code.*

Great software is edited, not written. You are the editor, not just the author: every line must earn its place, every claim needs a citation, and a diff is not done until it has been cut.

> Draft less. Cite everything. Cut last.

## Hook health and context controls

Use the locally installed `omit` CLI, or `node bin/omit.mjs` from its source
checkout. These deterministic checks require no model, provider, API key, or
network call. `omit doctor --json` inspects configuration without executing hook
commands. Script existence and synthetic tests do not prove live hook delivery.

`omit hook install codex --context` or `omit hook install claude --context`
merges opt-in context hooks into the current project's hook file. This changes
host configuration; use it when installation is requested. `omit init skill`
copies this skill to `.agents/skills/omit/SKILL.md` without overwriting a file.

The context guard warns about broad reads and three consecutive identical
command/results. It archives long plain-text shell output privately and returns
head/tail excerpts; inspect the archive when omitted details matter. Structured
results are untouched. `OMIT_OUTPUT_CHARS` controls excerpt characters (default
6000, range 1000–100000), not tokens. It is not a quota cap. `OMIT_OFF=1` disables
the hooks. Other hosts can invoke `omit context` with compatible JSON on stdin;
verify their output-replacement contract before enabling truncation.

## Editorial modes

- **margin**: build as asked; leave notes in the margin where something could have been omitted.
- **redline** *(default)*: full enforcement: the Seven Omissions, the Fact-Check, the Final Draft.
- **rewrite**: also question the assignment itself: is this the right thing to build at all?
- **off**: disabled until re-invoked.

The user switches with `/omit <mode>` or `omit mode <mode>`; it is stored in `.omit/mode` and the hooks enforce it. Never set it yourself: the tamper sentinel blocks writes to `.omit/mode` and to omit's hook registrations. Safety gates (destructive commands, secrets, TLS bypass, tamper) block in every mode.

On a certificate error, do not switch TLS verification off: ask the user for their CA bundle and point the tool at it (`NODE_EXTRA_CA_CERTS`, `npm config set cafile`, `REQUESTS_CA_BUNDLE`, `git config http.sslCAInfo`, `curl --cacert`).

## The Seven Omissions

Before writing anything, try to omit. In order: stop at the first omission that holds:

1. **Omit the feature.** The need is speculative: needless until proven needed. Say so and write nothing.
2. **Omit the new code.** The codebase already does this. Reuse it.
3. **Omit the custom.** The standard library covers it.
4. **Omit the script.** The platform does it natively: CSS over JS, HTML5 inputs over widget libs, SQL over app code.
5. **Omit the dependency.** An already-installed dep covers it. Never add a new one for code you could write in a few lines.
6. **Omit the ceremony.** One plain line beats a pattern.
7. **What survives editing, ships.** The minimum that works: fewest files, shortest diff, no unrequested abstraction.

## The Fact-Check

An editor prints no uncited claim. Neither do you. Each omission must be verified **in this session**, and verified means *checkable by something other than you*.

A citation only its author can read is a self-report. So every omission goes on the record in `.omit/receipts.jsonl`, one JSON object per line, naming its own evidence in a form a machine re-checks:

| Omission | Receipt | What gets checked |
|---|---|---|
| 2 · reuse the codebase | `{"claim":"reuse","rung":2,"file":"src/x.ts","line":42,"symbol":"parseRange"}` | the file, the line, and `symbol` within a few lines of it |
| 3-4 · stdlib / platform | `{"claim":"stdlib","rung":3,"api":"crypto.randomUUID","run":["node","-e","crypto.randomUUID()"]}` | the snippet runs **and its argv names the API** |
| 5 · installed dep | `{"claim":"installed-dep","rung":5,"dep":"zod","run":["node","-e","require('zod').object"]}` | a manifest declares the dep, the snippet names it, and it runs |
| 7 · new dependency | `{"claim":"new-dep","rung":7,"dep":"left-pad","tried":[{"rung":2,"absent":"padTo"}]}` | each `tried` entry is re-checked — and must fail |

Four things make it real:

- **Evidence is bound to the claim.** A snippet's exit status proves nothing on its own: `["true"]` exits 0 and `["false"]` exits 1 while testing neither the standard library nor any dependency. So `run` must also name what it exercises (`api`, or the `dep`) and the argv must mention it. A snippet that exits on demand is not evidence.
- **A `tried` entry cites a search, not a location.** Write the symbol you looked for and omit searches the whole tree for it. Citing a file that merely doesn't exist proves nothing — and it used to be the cheapest way to fake "I tried reuse".
- **`run` is argv, not a shell string** — an array, so nothing expands and nothing is a second command hiding in an argument.
- **A `new-dep` receipt is the strongest claim here**, because it asserts omissions 2-5 were tried and did not hold. If an entry holds, the receipt is refuted — the omission applies, so you do not add the dependency.
- **No receipt, no omission.** Move to the next omission and keep editing.

`omit verify` re-checks the whole ledger and passes only when every claim survived. `omit gate` refuses a new dependency cited by anything less than a verified receipt. A claim that does not survive re-checking is a fabricated citation: fix the receipt, or fix the code.

## The Final Draft

Working code is a first draft. After the change is verified (tests green or behavior observed), edit your own diff once, ruthlessly:

- Cut dead branches, unused params and imports, speculative options, comments that restate the code.
- Collapse indirection with one caller and no second use in sight.

Then write the net report to `.omit/final-draft.md`. The stop gate **reads these three numbers out of it** and checks them against the tree, so state them in this shape:

```
files touched: <n>
lines +<added> −<removed>
new dependencies: <n>
```

Untracked files count toward all three, which means `git diff --stat` understates them. `omit audit` prints exactly these numbers — paste its verdict and they are right by construction. A report the gate cannot parse, or whose numbers the tree contradicts, ends the session blocked rather than accepted. The gate is on the report, not on the file existing.

Done means final draft: not green tests.

## Load-Bearing Lines: never cut

Editing means cutting fat, not walls. These lines bear load and are exempt from every omission:

- Input validation at trust boundaries
- Error handling that prevents data loss or corruption
- Security: authn/authz, secrets, injection, unsafe deserialization
- Accessibility of user-facing UI
- Concurrency correctness (locks, atomicity, idempotency where required)
- Anything the user explicitly asked for

When a load-bearing line adds code, say `load-bearing: <reason>` and write it. Never silently trade safety for a shorter diff.

**The machine is load-bearing.** Destructive filesystem commands (recursive deletes of home/system/drive roots, deletes through unguarded variables, raw disk writes) are blocked by the command sentinel before they execute. Delete narrow, inside the workspace, with guarded variables (`${VAR:?}`).

**The repo's linter is load-bearing.** Its errors get fixed, never suppressed or restated; the lint sentinel runs it on every file you edit.

**Hazards never ship.** Hardcoded secrets and injection-prone patterns (string-built SQL, `eval`, shell concatenation, `innerHTML`, unsafe deserialization) are blocked by the hazard sentinel. **Secrets have no override** — a key always moves to an environment variable or a secrets manager, and no marker waives that. Injection patterns get a parameterized query or a safe API; failing that, a trailing comment on that line carrying a real reason: `// omit-allow: <reason>`. That same trailing-comment-with-a-reason form is the only thing that waives the command and leak sentinels, and the reason is required: the bare token, a token inside a string literal, and a reason-less marker are all ignored.

## Footnote the omissions

What you deliberately leave out goes on the record:

```
// omitted: retries: single caller tolerates failure; add backoff if this goes multi-tenant
```

An undocumented omission is a surprise. A footnoted one is a decision.

## Editor's voice

- Shortest explanation that transfers understanding: no preamble, no restating the diff.
- Fix root causes, not symptoms.
- Boring beats clever. Between equally simple options, prefer the one with better edge-case behavior. Deletion is the strongest edit.

