Automated summary
Enforces engineering standards and code quality policies by delegating the analysis to a built-in reviewer subagent, which keeps the main thread's token usage low.
Strengths
- Delegates to the reviewer subagent shipped with Claude Code, so no custom agent has to be installed
- Claims 70–90% token savings versus running the same checks directly in the main thread
- Covers several workflows: code review, pre-commit checks, compliance audits and retrospectives
- Requires all detected issues to be fixed immediately with no deferral
Limitations
- Relies on repository-specific npm scripts (audit:standards, typecheck, lint, test) and on a standards.md file you must adapt
- The delegation model depends on Claude Code's Task tool, so it does not port cleanly to other editors
- The token-saving figures are the author's estimates, not independently measured
Use it before committing or merging, or during a code review, to check work against your team's standards.
Not useful in a repository without audit scripts or a standards document, or outside Claude Code.
Security analysis
CautionThe skill delegates code review and pre-commit checks using Bash and subagents. The commands are standard development tooling (npm typecheck/lint/test, custom audit scripts) and do not include destructive or exfiltrating operations, but execution of arbitrary npm/node scripts warrants caution.
- •Executes Bash commands including npm run audit:standards and node scripts/governance-check.mjs, which may run arbitrary code if project scripts are untrusted; no explicit safeguards against malicious package scripts.
Examples
Review these files against our standards before I merge: src/api/client.ts and src/api/auth.ts. Run the standards audit, fix every issue you find, and give me a structured summary.Run the pre-commit governance checks: typecheck, lint, format:check, test and audit:standards. Flag any untracked source files, then tell me pass/fail with the specific failures./retro for the last sprint — analyze the completed issues, pull the relevant metrics, write the report and summarize the key takeaways.name: governance version: "2.1.0" description: "Engineering standards and code governance enforcement with parallel agent execution. Triggers during code reviews, commits, and standards discussions. 70-90% token savings via delegated execution." category: development tags:
- governance
- code-review
- standards
- compliance
- quality
- automation
author: wrsmith108
repository: https://github.com/wrsmith108/governance-claude-skill
license: MIT
triggers:
keywords:
- code review
- review this
- commit
- before I merge
- standards
- compliance
- code quality
- best practices
- retro
- retrospective explicit:
- /governance
- /review
- /retro
- /audit delegates_to: reviewer allowed-tools:
- Bash
- Read
- Write
- Edit
- Grep
- Glob
Governance Skill
Enforces engineering standards and code quality policies with parallel agent execution for context efficiency.
Standards Document: standards.md (starter default — replace with your own) Audit Script:
npm run audit:standardsFull Protocol: agent-prompt.md
Execution Model (v2.1)
Type: Delegated Execution — delegates to the built-in reviewer subagent type.
This skill uses the reviewer subagent (available in all Claude Code installations — no custom agent required):
- Spawn the reviewer agent
- Delegate the governance task with instructions from
agent-prompt.md - Await completion
- Report the structured summary to the user
Token Efficiency
| Execution Mode | Token Usage | Benefit | |----------------|-------------|---------| | Direct (v1.x) | ~3,000–8,000 | Full context in main thread | | Delegated (v2.x) | ~500–800 | 70–90% token savings |
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: `[See agent-prompt.md for full instructions]
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: `[See agent-prompt.md for full instructions]
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: `[See agent-prompt.md for full instructions]
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.1.0 — Structural cleanup: flat layout, built-in reviewer agent, standards.md default added
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-governance-and-standards-enforcement-msr1u7kw/download' --output '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md.part' && mv '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md.part' '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: 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.1.0 — Structural cleanup: flat layout, built-in reviewer agent, standards.md default added
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md' && test -s '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/governance' && cp -R '.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw' '.claude/skills/governance'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/code-governance-and-standards-enforcement-msr1u7kw'openskills read 'code-governance-and-standards-enforcement-msr1u7kw'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/code-governance-and-standards-enforcement-msr1u7kw/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.