agentleFS
wrsmith108wrsmith108/governance-claude-skill/SKILL.md

governance

Skill13 starsChanged 35 days agoMITView on GitHub

Engineering standards and code governance enforcement. Triggers during code reviews, commits, and standards discussions. Delegates the review to a single built-in reviewer subagent so intermediate output stays out of the main conversation.

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When this skill is triggered, read agent-prompt.md for the full protocol, then delegate:

    line 91

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Governance Skill

Enforces engineering standards and code quality policies. The review runs in one delegated reviewer subagent, which keeps intermediate output out of the main conversation.

Standards Document: standards.md (starter default — replace with your own) Audit Script: npm run audit:standards Full Protocol: agent-prompt.md


Execution Model (v2.2)

Type: Delegated Execution — delegates to ONE built-in reviewer subagent.

This skill uses the reviewer subagent type (available in all Claude Code installations — no custom agent required):

  1. Spawn a single reviewer agent
  2. Delegate the governance task, telling it to read agent-prompt.md in full first
  3. Await completion
  4. Report the structured summary to the user

Why Delegate

The reviewer runs commands, reads files and applies fixes in its own context. Only the structured summary returns to the main conversation, so the main thread does not carry the review's intermediate output.


What's Checked

The full rules live in agent-prompt.md. The reviewer covers:

  • Approach validation — is the chosen approach sound before the details are reviewed
  • Type safety — no unjustified any, explicit types at boundaries
  • Constant and mock consistency — one canonical home per shared constant; mocks match real shapes
  • External-API contracts — and anti-false-green mocks that pass whatever the code does
  • Shared-state and concurrency audit — five checks: global reads outside the producer, re-firing lifecycle listeners, missing re-fire tests, double reads of a module-level singleton across an await, and unguarded async-completion writes to shared state
  • Duplicate security gates and sibling implementations — the same guard or logic must not diverge across copies
  • Observation and gate correctness in verification code — a check must be able to fail, and must examine what it claims to
  • Zero deferral — every finding is fixed now, with narrow, documented exceptions
  • String-replacement sweeps — scripted edits are re-checked for dropped or mangled text
  • Severity guide — how findings are classified
  • Retrospectives — structured post-merge review

How to Invoke

When this skill is triggered, read agent-prompt.md for the full protocol, then delegate:

Code Review

Task({
  description: "Governance code review",
  prompt: `Read <skill-dir>/agent-prompt.md in full before doing anything, and follow it.
(<skill-dir> is the directory containing this SKILL.md, e.g. ~/.claude/skills/governance.)
Review the following files for standards compliance:
- [list files or PR description]

Execute full code review workflow:
1. Run standards audit
2. Check each file against standards.md
3. Fix ALL issues immediately (zero deferral)
4. Return structured summary`,
  subagent_type: "reviewer"
})

Pre-Commit Check

Task({
  description: "Pre-commit governance",
  prompt: `Read <skill-dir>/agent-prompt.md in full before doing anything, and follow it.
(<skill-dir> is the directory containing this SKILL.md, e.g. ~/.claude/skills/governance.)
Run pre-commit governance checks:
1. typecheck, lint, format:check, test
2. Check for untracked source files
3. Return pass/fail with specific failures`,
  subagent_type: "reviewer"
})

Retrospective

Task({
  description: "Run retrospective",
  prompt: `Read <skill-dir>/agent-prompt.md in full before doing anything, and follow it.
(<skill-dir> is the directory containing this SKILL.md, e.g. ~/.claude/skills/governance.)
Run retrospective for [topic/sprint]:
1. Analyze completed issues
2. Gather metrics
3. Write report
4. Return summary`,
  subagent_type: "reviewer"
})

Quick Reference

Pre-Commit Checklist

[ ] npm run typecheck
[ ] npm run lint
[ ] npm run test
[ ] npm run audit:standards
[ ] No console.log statements
[ ] No hardcoded secrets

Compliance Check

npm run audit:standards
node scripts/governance-check.mjs

Full agent protocol, anti-pattern tables, and output format in agent-prompt.md Version 2.2.0 — Expanded review rules, code-review and retro templates, dispatcher passes the protocol path

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.