self-governance

self-governance is a skill for Claude Code from davisjam/model-based-agentic-software-engineering. It costs 291 tokens per session (2,008 once invoked), scanned A, original, MIT.

A method for guiding an agent through engineering work by identifying the situation, deciding what must be known or preserved, choosing an action, and checking the evidence. It also turns lasting lessons from failures into durable controls.

In plain words
What is it for?
Use it to choose between modeling and alignment work, select the right capability, act within a governed environment, evaluate results, diagnose failures, and improve the engineering process.
Why use it?
It helps prevent agents from jumping straight into changes without understanding the problem or the conditions that must remain true. It provides a repeatable way to respond to both success and failure.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mage plugin — 3 skills shipped together

Good fit Use it to choose between modeling and alignment work, select the right capability, act within a governed environment, evaluate results, diagnose failures, and improve the engineering process.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davisjam/model-based-agentic-software-engineering/self-governance
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.

Any agent
npx skills add davisjam/model-based-agentic-software-engineering --skill self-governance
Clone the repo
git clone --depth 1 https://github.com/davisjam/model-based-agentic-software-engineering

Made for: Claude Code.

Or install mage, the plugin that ships this one along with the rest of its 3 skills.

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 self-governance

README.md
[![agentmods](https://agentmods.dev/badge/skills/davisjam/model-based-agentic-software-engineering/self-governance/github.svg)](https://agentmods.dev/skills/davisjam/model-based-agentic-software-engineering/self-governance)
Your own site
<a href="https://agentmods.dev/skills/davisjam/model-based-agentic-software-engineering/self-governance"><img src="https://agentmods.dev/badge/skills/davisjam/model-based-agentic-software-engineering/self-governance/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 self-governance

Your own site · 80×15
<a href="https://agentmods.dev/skills/davisjam/model-based-agentic-software-engineering/self-governance"><img src="https://agentmods.dev/badge/skills/davisjam/model-based-agentic-software-engineering/self-governance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 291 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,008 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.00291 $0.02008
Opus 5.5 $0.00116 $0.00803
Sonnet 5.5 $0.00058 $0.00402
Haiku 4.5 $0.00029 $0.00201

Measured 3mo ago against content hash 0c863bb7a13f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-governance 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 3mo 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.

plugin/mage/skills/self-governance/SKILL.md · 162 lines

How it starts

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

Self-Governance

This skill applies MAGE to the agent's own engineering work. It carries the modeling repertoire, the engineering moves, the Alignment mechanisms, and the judgment to choose among them — and it composes model providers and other skills to act. It is a router, not a manual: each facet below owns one question, and this file sends you to the right one.

The engineering loop

Everything here supports one loop. Run it whenever you engineer.

       recognize the situation
                 |
         what do I need to know?
          /                    \
     MODEL                    ALIGN
   what is missing?        what must hold?
          \                    /
           choose an engineering move
                 |
           choose a capability
                 |
            act through the GEE
                 |
             weigh the evidence
          /                    \
     success                 failure
        |                        |
     continue                 diagnose
                                 |
                          durable lesson?
                           /          \
                          no          yes
                          |            |
                        repair     capitalize

MODEL and ALIGN are the two — and only two — MAGE activities. Modeling makes engineering knowledge explicit; Alignment gives that knowledge authority. Self-Governance is not a third activity beside them; it is the discipline of applying both to your own work.

When failure means a generate-evaluate loop is not converging rather than a single action was wrong, practice/judgment.md ("When search stalls") diagnoses which ingredient — searcher, model, oracle, or target — is missing before you add more of anything.

What this skill establishes

  • Self-Governance applies MAGE to the work. It is the method turned on the agent's own engineering, not a separate practice.
  • Modeling and Alignment remain the two activities. Self-Governance is not a third one.
  • The skill knows the method; model providers know the system. Concrete system truth — what this codebase intends, contains, and guarantees — arrives through providers, never from memory. See system/model-access.md.
  • Specialized capabilities come through other skills. Self-Governance chooses the move; a specialized skill executes it. See skills/repertoire.md.
  • Consequential action stays bounded by the GEE. Self-Governance supplies judgment; the governed engineering environment supplies authority. A move becomes consequential only through that environment — never by the skill asserting its own output is safe.
  • Self-Governance is not Self-Operate. This skill engineers and improves the environment; it does not run operational lifecycles. When the task is to execute or recover one, cross the boundary to the operate skill.
  • Self-Governance is not self-certification. The agent may learn to govern its work; it does not thereby become the authority that certifies that work. Guardrails are proposed and scaffolded, then handed to a human or the harness — never claimed as enforced when only recommended.

Read the full file on GitHub · 162 lines

Files

What ships with it

60 files 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. 3mo ago First seen · 162 lines · 291 tokens per session scan A 0c863bb7a13f

Subscribe to this mod's changes

self-governance is a skill published in the GitHub repository davisjam/model-based-agentic-software-engineering (64 stars, last pushed yesterday), licensed MIT. It adds 291 tokens to every session and 2,008 once invoked, about $0.0012 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

self-governance compared with skills from other repositories

self-governance next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-governancedavisjam/model-based-agentic-software-engineeringSkill64yesterdayMITA291Claude Code
ralplanYeachan-Heo/oh-my-claudecodeSkill41kyesterdayMITA21Claude Code
create-verification-skillYeachan-Heo/oh-my-claudecodeSkill41kyesterdayMITA45Claude Code
rememberYeachan-Heo/oh-my-claudecodeSkill41kyesterdayMITA20Claude Code
handoverme2resh/apexyardSkill555yesterdayMITA25Claude Code
moai-ref-ui-polishmodu-ai/moai-adkSkill1.3ktodayApache-2.0A98Claude Code
projectsme2resh/apexyardSkill555yesterdayMITA24Claude Code