repository-harness: Skill for Codex

.agents/skills/encode-invariant/SKILL.md

encode-invariant is a skill for Codex from hoangnb24/repository-harness. It costs 48 tokens per session (527 once invoked), scanned A, original, MIT.

A method for turning an accepted repository rule into a small automated check. It also defines how to prove that compliant code passes and violating code fails.

In plain words
What is it for?
Use it to add or improve a test, build check, lint rule, scan, or other repository-native validation for an agreed rule.
Why use it?
It prevents important architecture, reliability, security, or quality rules from being forgotten or applied inconsistently.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md; $skill-name invocation.

This is hoangnb24/repository-harness's own configuration. It tells Codex how to work on repository-harness 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 repository-harness configures →

About the project

repository-harness is a repository protocol that makes a software codebase easier for coding agents to understand and work on safely. It is for teams using Claude Code, Codex, Cursor, and similar agents who need authoritative documents, durable plans, explicit decision boundaries, and evidence for completed work. Its catalogue entries install the protocol's skills and instructions.

hoangnb24/repository-harness · 1,256 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to hoangnb24/repository-harness. 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/hoangnb24/repository-harness/main/.agents/skills/encode-invariant/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/hoangnb24/repository-harness

Made for: Codex.

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 encode-invariant

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangnb24/repository-harness/encode-invariant/github.svg)](https://agentmods.dev/skills/hoangnb24/repository-harness/encode-invariant)
Your own site
<a href="https://agentmods.dev/skills/hoangnb24/repository-harness/encode-invariant"><img src="https://agentmods.dev/badge/skills/hoangnb24/repository-harness/encode-invariant/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 encode-invariant

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangnb24/repository-harness/encode-invariant"><img src="https://agentmods.dev/badge/skills/hoangnb24/repository-harness/encode-invariant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 527 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00048 $0.00527
Opus 5.5 $0.00019 $0.00211
Sonnet 5.5 $0.00010 $0.00105
Haiku 4.5 $0.00005 $0.00053

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

Security

Grade A, and why

encode-invariant 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 23d 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.

.agents/skills/encode-invariant/SKILL.md · 68 lines

How it starts

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

Encode Invariant

Turn an accepted rule into a focused guard without creating new product policy.

1. Read The Owners

Read applicable AGENTS.md, docs/WORKFLOW.md, and the complete encoding pattern. Locate the repository's product or technical authority and its native validation owner.

2. Pass The Authority Gate

Cite the accepted source and restate the exact scope, allowed behavior, forbidden behavior, and authorized exceptions. Stop before edits if authority is absent or materially ambiguous.

Do not promote conventions, code patterns, tests, defaults, tool behavior, or undocumented preferences into policy. An existing check without accepted authority is a mismatch to report, not authority to expand.

3. Design The Smallest Guard

Reuse the repository's existing test, build, task, lint, scan, or validation owner. Choose the lowest deterministic layer that sees the complete accepted scope. Avoid a parallel framework or duplicated source of truth.

Make failures actionable: name the violating item, the broken rule, the authority source, and a concrete compliant next action.

4. Implement And Prove

Implement only the authorized boundary. Add or run:

  • positive proof showing a conforming case passes; and
  • negative proof showing the targeted violation fails for the intended rule and diagnostic.

Use recoverable fixtures or test mutations for negative proof. Preserve unrelated work and never leave a deliberate violation in product files.

5. Discover Enforcement Without Expanding It

Inspect the checked-in validation and CI paths. Do not install hooks, choose a CI provider, change merge policy, or mutate external branch protection unless the user separately authorizes that action.

Report each level independently:

  • local validation command and observed result;
  • optional hook availability, if any;
  • CI invocation discovered or absent, plus observed run status only when verified; and
  • branch-protection enforcement verified or unverified.

Read the full file on GitHub · 68 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 23d ago Changed · -33 tokens per session 025d09975778
  2. 1mo ago First seen · 68 lines · 81 tokens per session scan A cd2742df488a

Subscribe to this mod's changes

encode-invariant is a skill published in the GitHub repository hoangnb24/repository-harness (1,256 stars, last pushed 23d ago), licensed MIT. It adds 48 tokens to every session and 527 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-08-30.

Related

Other skills, from other repositories

pin-guardrail

Pin a shell guardrail (a hook, a git hook, a checker script) with a behavioral test suite, prove the suite is real by mutating the code, and wire it into CI with its mutation ledger. Use when asked to "add tests for this hook", "pin that guard", "mutation-test this script", "this hook has no test", "wire the suite…

craigcossairt/trellis · 94 tokens

build-verification-skill

Build this project's verification skill - a small CLI that drives the running app and captures evidence, plus a feature map of what exists and how to reach it - and the CI check that keeps the map current. Use when asked to 'build a verification skill', 'let the agent drive the app', 'make a feature map', 'the agent…

craigcossairt/trellis · 92 tokens

launch-check

Run a pre-demo/pre-launch audit of the app - test data, broken screens, missing error states, brand consistency. Use when asked to 'demo check', 'launch check', 'pre-demo audit', 'check before user interview', 'audit before demo'.

craigcossairt/trellis · 55 tokens

tdd

TDD workflow - red-green-refactor per docs/methodology/tdd.md. Use when asked to '/tdd', 'TDD workflow', 'red-green-refactor', 'test-first development', 'write the failing test first'.

craigcossairt/trellis · 51 tokens

adding-an-audit-check

Add a new audit check to agent-context-doctor end to end, including config, suppressions, the check catalog, tests, and docs. Use when asked to detect a new kind of problem in agent instruction files.

alipajand/agent-context-doctor · 50 tokens

safe-change

Trace, implement, test, and independently review one bounded software change. Use for ordinary feature, bug-fix, or refactor work after the repository is bootstrapped; do not use for broad repository cleanup, production operations, or undefined rewrites.

cz1993/vibe-coding-repository-standard · 54 tokens