Agent skill

Encode Invariant

by hoangnb24 in hoangnb24/repository-harness

Use only when the user explicitly invokes $encode-invariant.

MITAuto-check passedAgent Workflows

Install Encode Invariant

skills CLI
$ npx skills add hoangnb24/repository-harness --skill encode-invariant -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hoangnb24/repository-harness encode-invariant --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hoangnb24/repository-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/encode-invariant .claude/skills/encode-invariant && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
encode-invariant
GitHub stars
1.2k
Token cost
~668 tokens
SKILL.md length
325 words
Files
2
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Use only when the user explicitly invokes $encode-invariant.

  • Works in 5 steps: Read The Owners → Pass The Authority Gate → Design The Smallest Guard → …
  • Explicitly invokes $encode-invariant
  • SKILL.md covers 1. Read The Owners, 2. Pass The Authority Gate, 3. Design The Smallest Guard and 4. Implement And Prove, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Encode Invariant is an agent skill from hoangnb24/repository-harness. Use only when the user explicitly invokes $encode-invariant. Convert accepted repository rules into native mechanical validation with positive and negative proof. Do not infer policy from conventions, code patterns, tests, defaults, or undocumented preferences.

Its SKILL.md is about 670 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Agent Workflows. The repository describes itself as: Turn any repo into an agent-ready workspace for Claude Code, Codex, Cursor, and other coding agents. The licence is MIT.

When your agent uses it

  • Explicitly invokes $encode-invariant

Example prompts

  • “/encode-invariant”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Read The Owners
  2. Pass The Authority Gate
  3. Design The Smallest Guard
  4. Implement And Prove
  5. Discover Enforcement Without Expanding It

What it can do on your machine

Read from SKILL.md and the folder at commit 485fd40. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Encode Invariant loads about 668 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 325 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~668

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hoangnb24/repository-harness at commit 485fd40, republished under its MIT licence (© hoangnb24). 325 words, ~668 tokens.

Download SKILL.mdSave it as .claude/skills/encode-invariant/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
encode-invariant
description
Use only when the user explicitly invokes `$encode-invariant`. Convert accepted repository rules into native mechanical validation with positive and negative proof. Do not infer policy from conventions, code patterns, tests, defaults, or undocumented preferences.

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.

Source presence is not execution; CI presence is not a required check; a green check is not proof of merge blocking.

Handback

Return accepted authority, encoded scope, changed owner, actionable diagnostic, positive and negative results, the four enforcement levels, and unresolved risks or authority gaps.

© hoangnb24, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/encode-invariant of hoangnb24/repository-harness.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 485fd40

Compare with similar skills

Encode Invariant next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Encode Invariant compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Encode Invariant this skillhoangnb24/repository-harness1.2k—~668Automated safety check: PassMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k35 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers297k2 repos~5.1kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79589 repos~8.2kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 35 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    297k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed

More from hoangnb24/repository-harness

  • Audit Onboarding Proposal

    hoangnb24/repository-harness

    Use only when the user explicitly invokes $audit-onboarding-proposal.

    1.2k GitHub stars~4k tokensUpdated 5 days ago
    Auto-check passed
  • Onboard Repository

    hoangnb24/repository-harness

    Use only when the user explicitly invokes $onboard-repository.

    1.2k GitHub stars~6.8k tokensUpdated 5 days ago
    Auto-check: notes
  • Engineering Wisdom

    hoangnb24/repository-harness

    Use only when the user explicitly invokes $engineering-wisdom.

    1.2k GitHub stars~910 tokensUpdated 5 days ago
    Auto-check passed
  • Improve Harness

    hoangnb24/repository-harness

    Use only when the user explicitly invokes $improve-harness. An agent skill from hoangnb24/repository-harness.

    1.2k GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about Encode Invariant

What does Encode Invariant do?

Use only when the user explicitly invokes $encode-invariant. Encode Invariant is an agent skill from hoangnb24/repository-harness. Use only when the user explicitly invokes $encode-invariant.

When should I use Encode Invariant?

Encode Invariant fits situations like: explicitly invokes $encode-invariant.

How do I install Encode Invariant in Claude Code?

Run `npx skills add hoangnb24/repository-harness --skill encode-invariant -a claude-code`. Or copy the skill folder (.agents/skills/encode-invariant in hoangnb24/repository-harness) into .claude/skills/encode-invariant in your project. Claude Code loads it when a task matches its description.

How do I install Encode Invariant in Codex?

Run `npx skills add hoangnb24/repository-harness --skill encode-invariant -a codex`. Or copy the skill folder (.agents/skills/encode-invariant in hoangnb24/repository-harness) into .agents/skills/encode-invariant in your project. Codex loads it when a task matches its description.

Can I use Encode Invariant in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hoangnb24/repository-harness --skill encode-invariant -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/encode-invariant, .gemini/skills/encode-invariant, .github/skills/encode-invariant and .opencode/skills/encode-invariant in your project.

What does Encode Invariant need to run?

SKILL.md names no scripts, command-line tools or credentials: Encode Invariant is instructions for the agent only.

Does Encode Invariant access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Encode Invariant safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Encode Invariant use?

Encode Invariant is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Encode Invariant use?

About 668 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Encode Invariant?

Skills that share tags, products or a category with Encode Invariant: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 297k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Encode Invariant?

hoangnb24 (a GitHub user) maintains it in hoangnb24/repository-harness, which has 1,242 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 4, 2026.

Source: hoangnb24/repository-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.