Agent skill

Anti Entropy Governance

by GanyuanRan in GanyuanRan/Aegis

A skill your agent uses when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically…

MITAuto-check passedAgent Workflows

Install Anti Entropy Governance

skills CLI
$ npx skills add GanyuanRan/Aegis --skill anti-entropy-governance -a claude-code

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

GitHub CLI
$ gh skill install GanyuanRan/Aegis anti-entropy-governance --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/GanyuanRan/Aegis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/anti-entropy-governance .claude/skills/anti-entropy-governance && 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
anti-entropy-governance
GitHub stars
1.3k
Used in
1 other repo
Token cost
~3.1k tokens
SKILL.md length
1,365 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically…

  • Touching retiring old logic
  • SKILL.md covers Overview, When to Use, Auto-Compose Boundary and Core Principle, plus 13 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Collapsing duplicate owners

What it does

Anti Entropy Governance is an agent skill from GanyuanRan/Aegis. Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically; destructive execution requires explicit confirmation.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: Make AI coding agents architecture-aware: baseline-first, evidence-verified, drift-checked, and safe across long tasks. The licence is MIT.

When your agent uses it

  • Touching retiring old logic
  • Collapsing duplicate owners
  • Removing fallbacks
  • Schema/persistence/source-of-truth boundaries

Example prompts

  • “/anti-entropy-governance”

What it can do on your machine

Read from SKILL.md and the folder at commit 61867e9. 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

Anti Entropy Governance loads about 3.1k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 1,365 words of instructions outside code blocks.

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

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 GanyuanRan/Aegis at commit 61867e9, republished under its MIT licence (© GanyuanRan). 1,365 words, ~3,103 tokens.

Download SKILL.mdSave it as .claude/skills/anti-entropy-governance/SKILL.md (or your agent's skills folder).
name
anti-entropy-governance
description
Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically; destructive execution requires explicit confirmation.

Anti-Entropy

Overview

Use this skill when the task is not merely "change code" but "remove old paths safely without growing entropy".

This skill chooses between:

  • delete-first for internal code retirement
  • compat-exception for proven external dependency boundaries
  • confirmation-first for irreversible state or an external contract whose distributed consumers cannot be observed

It does not replace brainstorming, writing-plans, systematic-debugging, or verification-before-completion. It is a narrow governance owner for retirement, fallback collapse, duplicate-owner cleanup, and deletion safety.

When to Use

Use when any of these are true:

  • old logic, duplicate owners, or stale fallbacks should be retired
  • a candidate fix is "delete old path" vs "add another fallback"
  • internal keyword / phrase / trigger logic is being replaced by structured logic
  • a new canonical owner exists and the old owner may still carry real behavior
  • a cleanup, migration, or deprecation task touches schema, persistence, source-of-truth, or external compatibility boundaries
  • the task risks confusing code retirement with live data deletion

Do not use for:

  • pure additive feature work with no retirement decision
  • tiny wording edits
  • simple status or read-only Q&A
  • normal bug fixes that do not involve owner collapse, fallback cleanup, or deletion choice

Auto-Compose Boundary

This skill should be composed by other owners. It should not become a new global hot-path entry.

Prefer composition from:

  • brainstorming for approach selection involving retirement or persistence risk
  • writing-plans for plans that delete old paths or touch schema / migration / persistence
  • systematic-debugging when the tempting fix is fallback growth or delete-vs-retain
  • verification-before-completion for cleanup / retirement / compatibility / migration closeout

Load automatically when the task touches owner collapse, fallback removal, or schema/persistence/source-of-truth boundaries. Automatic loading identifies and advises only; destructive execution still requires explicit scoped user confirmation.

Core Principle

Default to reducing internal entropy, not preserving internal history.

Retirement is responsibility-scoped before it is carrier-scoped. Name the obsolete or duplicated authority first. If the same carrier has a separately evidenced legitimate role, remove the invalid responsibility and keep only that role-scoped capability; this is not a compatibility exception. Apply delete-first to the carrier once no legitimate responsibility remains. Unknown consumers alone still do not justify retaining an internal carrier.

Use this rule:

  • internal code retirement -> delete-first
  • external compatibility boundary -> compat-exception with active dependency evidence; confirmation-first when distribution is proven but consumers cannot be observed
  • persistent-state or irreversible source-of-truth object -> confirmation-first

Unknown alone neither proves an external dependency nor blocks internal delete-first. Once distribution is proven, unobservable consumers also do not prove deletion safe: inspect read-only. Before editing, require user-authored, scoped authorization that explicitly accepts the concrete external risk. An informed instruction may already supply it; otherwise disclose the risk and request scoped confirmation.

Mentioning, loading, or discussing destructive-action rules never authorizes destructive execution. Without explicit scoped user confirmation:

  • no irreversible deletion is executed
  • no destructive tool call is made
  • no runnable destructive command is emitted as the next action
  • no broad assent is reinterpreted as deletion approval

Deletion Classes

Classify the deletion target first:

  • code-retirement

    • source code
    • internal triggers
    • duplicate owners
    • stale fallback branches
    • compat-only carriers
    • dead tests/config tied to removed internal behavior
  • contract-carrying code

    • schema definition files
    • migration files
    • public API contract code
    • host install/discovery code
    • persistence read/write logic
  • live-state mutation surface

    • code or commands that would mutate live databases, object stores, queues, or other persistent state
  • derived-state

    • rebuildable caches
    • generated indexes
    • temporary exports
    • recomputable artifacts
  • persistent-state

    • live database tables / columns / rows
    • source-of-truth object storage files
    • user records
    • permission / identity / membership records
    • audit / billing / irreversible business records
    • non-rebuildable queue or event contents

Default Path By Class

  • code-retirement -> delete-first
  • contract-carrying code -> classify by the Core Principle; internal-only retirement uses delete-first with high-risk verification
  • live-state mutation surface -> inspect and classify; destructive execution still requires confirmation when it reaches persistent-state
  • derived-state -> verify rebuildability first, then decide
  • persistent-state -> confirmation-first

Hard Stops

If the target is persistent-state or another irreversible source-of-truth object:

  • do not execute deletion automatically
  • do not emit a runnable destructive command as the next action
  • do not call a destructive tool
  • do not interpret generic agreement as confirmation
  • ask for explicit scoped user confirmation
  • request backup / rollback / migration note when relevant

Examples that require confirmation:

  • DROP TABLE
  • DROP COLUMN
  • TRUNCATE
  • bulk delete of real business data
  • deleting source-of-truth uploaded files
  • deleting permission, identity, audit, billing, or membership records
  • purging non-rebuildable queues or event streams

Data Destruction Guard

When confirmation-first protects persistent-state or an irreversible source-of-truth object, stop normal retirement flow and emit:

text
Data Destruction Guard:
- Target Class:
- Exact Target(s):
- Environment:
- Why Irreversible:
- Backup / Rollback Note:
- Allowed Read-Only Next Steps:
- Blocked Destructive Steps:
- Confirmation Required: yes
- Status: awaiting scoped confirmation

Only explicit scoped confirmation can continue. Broad assent such as "OK", "continue", or "sounds good" is insufficient. If scope changes at all, previous confirmation is invalid and fresh confirmation is required.

Anti-Entropy Declaration

Before deletion, state:

text
Anti-Entropy Declaration:
- Deletion Class:
- Old Path/Object:
- Invalid Responsibility / Authority:
- Legitimate Capability Remaining on Carrier:
- New Canonical Owner:
- Expected Preserved Behavior:
- Expected Retired Behavior:
- External Boundary Touched: no | yes
- Source-of-Truth Data Risk: none | possible | confirmed
- User Confirmation Required: no | yes

For external-unknown code, fill User Confirmation Required with yes unless the user's own instruction already names the concrete external risk, accepts its possible breakage, and authorizes the exact retirement scope, or the user later gives scoped confirmation after your disclosure. A generic original deletion request does not satisfy this slot. Do not infer acceptance from mere awareness of external use or from your own risk summary.

If User Confirmation Required: yes, stop normal delete-first flow. Persistent-state or irreversible targets enter Data Destruction Guard; external-unknown code stays in the Retirement Decision hold below.

Show full SKILL.md (518 more words)Show less

Retirement Decision

Choose one path only:

text
Retirement Decision:
- Path: delete-first | compat-exception | confirmation-first
- Why:
- Non-edits:

Rules:

  • choose delete-first for internal retirement unless a stronger boundary blocks it
  • choose compat-exception only when external dependency is proven
  • choose confirmation-first for irreversible targets or proven distribution whose consumers cannot be observed

If Path = confirmation-first, no destructive execution may happen until scoped confirmation is established. For external-unknown code, earlier generic deletion instructions do not count. An informed, scoped user instruction may establish confirmation before your disclosure; otherwise disclose the risk and directly ask the user to confirm the exact retirement scope before editing. Do not only state that confirmation is required or quote the words needed.

Verification Plan

Do not verify only by "tests are green". Verify that the old logic actually died and the new owner actually carries the behavior.

text
Verification Plan:
- Main-path check:
- Lingering-reference check:
- Negative check:
- Boundary check:

Meaning:

  • Main-path check: new canonical owner still satisfies intended behavior
  • Lingering-reference check: the retired responsibility is no longer active; when its carrier was deleted, the old path is no longer referenced on the main path
  • Negative check: retired trigger/path really stopped working
  • Boundary check: host/API/schema/persistence boundary was not accidentally broken

Gap Taxonomy

If a gap appears after deletion, classify it before repairing:

  • expected-retirement
  • missing-owner-logic
  • stale-internal-consumer
  • baseline-gap
  • external-compat
  • persistent-state-risk

persistent-state-risk is a stop condition, not a normal repair branch.

Gap Closure

Repair order:

  • expected-retirement
    • update tests, docs, or caller expectations
  • missing-owner-logic
    • fix the new canonical owner
  • stale-internal-consumer
    • migrate the internal consumer
  • baseline-gap
    • correct requirement / spec / baseline first
  • external-compat
    • allow compat only if active external dependency evidence exists
  • persistent-state-risk
    • stop and ask for user confirmation

Use this contract:

text
Gap Closure:
- Gap Found:
- Gap Type:
- Repair Action:
- Reintroduced Compat: no | yes
- If yes, External Dependency Evidence:
- Retirement Trigger:

If Gap Type = persistent-state-risk, stop and return to the confirmation gate. Do not improvise destructive repair.

Compat Exception Gate

Retention is allowed only if all are true:

  • an external boundary is touched
  • current active dependency evidence exists
  • deletion would break a published or documented contract
  • the current slice cannot complete owner repair or consumer migration
  • an observation metric exists
  • a retirement trigger exists

Without these, do not retain compat.

Completion Semantics

Completion claims must reflect the real outcome:

  • internal retirement with old compat preserved -> bounded mitigation or deferred debt, not clean retirement
  • external compat retained with full evidence -> bounded compatibility exception
  • persistent-state deletion without scoped confirmation -> not complete

Common Mistakes

Do not:

  • treat unknown dependency as proof of dependency
  • treat missing active-dependency evidence as proof that deletion is safe across a proven external boundary
  • keep both owners active "for safety"
  • add a fallback before checking whether the gap belongs in the new owner
  • confuse migration-file deletion with live database deletion
  • treat source-of-truth data cleanup as ordinary code retirement
  • call a task "cleaned up" when old logic still carries main-path behavior
  • delete a carrier merely because one authority on it was invalid when a separately evidenced legitimate role remains
  • treat a warning or guard card as destructive authorization

Minimal Reporting Shape

This shape is the anti-entropy workflow's decision surface, not a separate final completion report. When anti-entropy materially shapes a completed task, its preserved/retired behavior, deletion class, retained boundary, verification plan, and residual risk should flow into verification-before-completion's unified Aegis impact/safety receipt.

text
Aegis Visibility:
Anti-Entropy Declaration:
Retirement Decision:
Verification Plan:
Gap Closure:

Use the compact shape by default. Expand only when task risk requires it.

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

Files

Just SKILL.md in skills/anti-entropy-governance of GanyuanRan/Aegis.

Open the folder on GitHubat commit 61867e9

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in GanyuanRan/Aegis, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Anti Entropy Governance 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.

Anti Entropy Governance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Anti Entropy Governance this skillGanyuanRan/Aegis1.3k1 repos~3.1kAutomated safety check: PassMIT
Orca CLIstablyai/orca89k2 repos~593Automated safety check: PassMIT
OpenSpec Guided OnboardingFission-AI/OpenSpec72k1 repos~4.5kAutomated safety check: PassMIT
Brainstormingobra/superpowers297k1 repos~2.5kAutomated safety check: PassMIT
Claude Code Plugin Structureanthropics/claude-plugins-official38k10 repos~3.4kAutomated safety check: PassApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Orca CLI

    stablyai/orca

    Operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and Orca's embedded browser…

    89k GitHub starsUsed in 2 repos~593 tokens
    Agent WorkflowsAuto-check passed
  • OpenSpec Guided Onboarding

    Fission-AI/OpenSpec

    Walks you through a complete OpenSpec workflow cycle with narration while doing real work in your codebase.

    72k GitHub starsUsed in 1 repo~4.5k tokens
    Agent WorkflowsAuto-check passed
  • Brainstorming

    obra/superpowers

    Makes the agent clarify intent and agree on a design with you before writing any code, scaling the process from a quick spike to a written spec.

    297k GitHub starsUsed in 1 repo~2.5k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Plugin Structure

    anthropics/claude-plugins-official

    Official

    Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.

    38k GitHub starsUsed in 10 repos~3.4k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from GanyuanRan/Aegis

All 21 skills in this repo
  • Executing Plans

    GanyuanRan/Aegis

    A skill your agent uses when executing a written implementation plan across sessions or with review checkpoints.

    1.3k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • First Principles Review

    GanyuanRan/Aegis

    A skill your agent uses when asked for first-principles or Occam's-razor review, or when high-risk decisions involve competing constraints, fallback growth, duplicate owners, or architecture…

    1.3k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Goal Framing

    GanyuanRan/Aegis

    A skill your agent uses when the user explicitly sets an Aegis goal with /aegis-goal, Aegis goal:, or asks to define goal, success evidence, stop condition, or task boundaries before work.

    1.3k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • A skill your agent uses when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling.

    1.3k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check: warnings
  • A skill your agent uses when the user asks to create, write, update, amend, supersede, or evaluate an ADR, architecture decision record, durable architecture decision, decision log, or baseline sync…

    1.3k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Requesting Code Review

    GanyuanRan/Aegis

    A skill your agent uses when requesting independent code review, after implementation slices, before merging high-risk work, or when verification exposes evidence, baseline, architecture…

    1.3k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Anti Entropy Governance

What does Anti Entropy Governance do?

A skill your agent uses when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically…. Anti Entropy Governance is an agent skill from GanyuanRan/Aegis. Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically; destructive execution requires explicit confirmation.

When should I use Anti Entropy Governance?

Anti Entropy Governance fits situations like: touching retiring old logic; collapsing duplicate owners; removing fallbacks; schema/persistence/source-of-truth boundaries.

How do I install Anti Entropy Governance in Claude Code?

Run `npx skills add GanyuanRan/Aegis --skill anti-entropy-governance -a claude-code`. Or copy the skill folder (skills/anti-entropy-governance in GanyuanRan/Aegis) into .claude/skills/anti-entropy-governance in your project. Claude Code loads it when a task matches its description.

How do I install Anti Entropy Governance in Codex?

Run `npx skills add GanyuanRan/Aegis --skill anti-entropy-governance -a codex`. Or copy the skill folder (skills/anti-entropy-governance in GanyuanRan/Aegis) into .agents/skills/anti-entropy-governance in your project. Codex loads it when a task matches its description.

Can I use Anti Entropy Governance 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 GanyuanRan/Aegis --skill anti-entropy-governance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/anti-entropy-governance, .gemini/skills/anti-entropy-governance, .github/skills/anti-entropy-governance and .opencode/skills/anti-entropy-governance in your project.

What does Anti Entropy Governance need to run?

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

Does Anti Entropy Governance 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 Anti Entropy Governance 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 Anti Entropy Governance use?

Anti Entropy Governance 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 Anti Entropy Governance use?

About 3.1k tokens (SKILL.md is roughly 12k 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 Anti Entropy Governance?

Skills that share tags, products or a category with Anti Entropy Governance: Orca CLI (stablyai/orca, 89k stars), OpenSpec Guided Onboarding (Fission-AI/OpenSpec, 72k stars), Brainstorming (obra/superpowers, 297k stars) and Claude Code Plugin Structure (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Anti Entropy Governance?

GanyuanRan (a GitHub user) maintains it in GanyuanRan/Aegis, which has 1,337 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 10, 2026.

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