{
  "markdown": "# Governance Skill for Claude Code\n\nAn agent skill for enforcing engineering standards and code governance. Provides proactive reminders during code reviews and commits.\n\n## Features\n\n- **Proactive Triggers** — Activates on \"code review\", \"commit\", \"standards\", \"compliance\", \"retro\",\n- **Two-Document Model** — Separates CLAUDE.md (operational) from standards.md (policy)\n- **Setup Verification** — `scripts/governance-check.mjs` validates configuration with actionable fixes\n- **Anti-Pattern Tables** — Code quality, documentation, workflow, and testing anti-patterns\n- **Pre-Commit Checklist** — Reminds about typecheck, lint, test before commits\n- **PR Review Checklist** — Standards for code review (correctness, security, performance)\n- **Ready-to-Use Default** — `standards.md` works out of the box; extend with your own rules\n- **No Custom Agent Required** — Uses the built-in `reviewer` subagent type (v2.1+)\n\n## Quick Start\n\n### Option A: Claude Plugin (Recommended)\n\n```bash\nclaude plugin add github:wrsmith108/governance-claude-skill\n```\n\n### Option B: Manual Installation\n\n```bash\ngit clone https://github.com/wrsmith108/governance-claude-skill ~/.claude/skills/governance\n```\n\n### Verify Setup\n\n```bash\nnode scripts/governance-check.mjs\n```\n\n## How It Works\n\nWhen your agent (such as Claude) detects trigger phrases like \"code review\", \"commit\", \"standards\", or \"compliance\", this skill activates and provides:\n\n1. Quick reference to relevant standards\n2. Reminder to run `npm run audit:standards`\n3. Checklists for PRs and commits\n4. Links to authoritative documentation\n\nThe skill delegates to the built-in `reviewer` subagent for context efficiency (70–90% token savings vs. inline execution).\n\n## File Structure\n\n```\ngovernance-claude-skill/\n├── .claude/\n│   └── agents/\n│       └── governance-specialist.md    # repo-local development agent\n├── scripts/\n│   └── governance-check.mjs           # setup verification script\n├── templates/\n│   ├── standards-template.md          # full-featured standards template\n│   └── audit-standards-template.mjs   # configurable audit script\n├── agent-prompt.md                    # full agent protocol\n├── SKILL.md                           # thin dispatcher (v2.1.0)\n└── standards.md                       # minimal working default\n```\n\n**Note**: `.claude/agents/governance-specialist.md` is kept for repo-local development use only. It is NOT required for the skill to work — the skill uses the built-in `reviewer` subagent type.\n\n## The Two-Document Model\n\n| Document | Purpose | Update Frequency |\n|----------|---------|------------------|\n| **CLAUDE.md** | AI operational context (commands, URLs) | Frequent |\n| **standards.md** | Engineering policy (authoritative) | Infrequent |\n\n**Benefits:**\n- CLAUDE.md stays lean (better token efficiency)\n- standards.md is the single source of truth for policy\n\n## Setting Up in Your Project\n\n1. **Install the skill** (see Quick Start above)\n\n2. **Copy the starter standards.md** to your project:\n   ```bash\n   cp ~/.claude/skills/governance/standards.md standards.md\n   # Or to the traditional location:\n   cp ~/.claude/skills/governance/standards.md docs/architecture/standards.md\n   ```\n   Edit it with your project-specific rules. Full template at `templates/standards-template.md`.\n\n3. **Add CLAUDE.md** at project root with build commands and a cross-reference:\n   ```markdown\n   > **Standards**: [standards.md](standards.md)\n   ```\n\n4. **Create audit script** for automated compliance:\n   ```bash\n   cp ~/.claude/skills/governance/templates/audit-standards-template.mjs scripts/audit-standards.mjs\n   # Add to package.json: \"audit:standards\": \"node scripts/audit-standards.mjs\"\n   ```\n\n5. **Run setup check**:\n   ```bash\n   node scripts/governance-check.mjs\n   ```\n\n## Governance Check Output\n\n```\n🏛️  Governance Setup Check\n\n1. CLAUDE.md (AI Operational Context)\n✓ CLAUDE.md exists\n✓ Has build commands section\n✓ References standards.md\n✓ Concise length (452 lines)\n\n2. standards.md (Engineering Policy)\n✓ standards.md found at root\n✓ Has Code Quality section\n✓ Has Testing section\n✓ Has Workflow section\n\n3. Audit Script (Automated Compliance)\n✓ npm run audit:standards configured\n✓ Audit script exists\n\n4. Architecture Decision Records\n✓ docs/adr/ directory exists\n✓ ADR template exists\n\n5. Pre-commit Hooks\n✓ Husky pre-commit hook configured\n✓ Hook runs quality checks\n\n6. Governance Skill\n✓ Governance skill installed\n\nGovernance Score: 100%\n```\n\n## Anti-Patterns Enforced\n\n### Code Quality\n| Anti-Pattern | Correct Pattern |\n|--------------|-----------------|\n| ❌ `any` type | ✅ `unknown` for external data |\n| ❌ 600+ line files | ✅ Split at 500 lines |\n| ❌ Hardcoded secrets | ✅ Environment variables |\n\n### Workflow\n| Anti-Pattern | Correct Pattern |\n|--------------|-----------------|\n| ❌ Commit to main | ✅ Feature branches with PR |\n| ❌ Skip audit | ✅ Run `audit:standards` before commit |\n| ❌ Defer issues | ✅ Fix immediately |\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for full history.\n\n## Contributing\n\nContributions welcome! Please submit issues and PRs.\n\n## License\n\nMIT License — See [LICENSE](LICENSE)\n\n## Credits\n\nCreated for the Claude Code community. Patterns refined through real-world governance of AI-assisted development projects.\n",
  "bytes": 5271,
  "sha": "b8f2a1777255415c70ff493dc3ce70af792b9c76c458f386b2dd941afb013481",
  "repo_slug": "wrsmith108/governance-claude-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_wrsmith108_governance_claude_skill_gover_4cde753a/readme"
}