github-ruleset-architecture

github-ruleset-architecture is a skill for Claude Code from chf3198/copilot-governance. It costs 31 tokens per session (472 once invoked), scanned A, original, MIT.

A design and audit guide for GitHub rulesets, which are repository or organisation rules controlling pushes, branches, tags, approvals, and merges.

In plain words
What is it for?
Use it to audit, design, migrate, or verify rulesets, branch protection, bypass permissions, and merge-queue compatibility.
Why use it?
It helps make overlapping protections predictable while limiting bypass access and avoiding unsafe one-step migrations.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to audit, design, migrate, or verify rulesets, branch protection, bypass permissions, and merge-queue compatibility.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chf3198/copilot-governance/github-ruleset-architecture
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 chf3198/copilot-governance --skill github-ruleset-architecture
Clone the repo
git clone --depth 1 https://github.com/chf3198/copilot-governance

Made for: Claude Code.

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 github-ruleset-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/chf3198/copilot-governance/github-ruleset-architecture/github.svg)](https://agentmods.dev/skills/chf3198/copilot-governance/github-ruleset-architecture)
Your own site
<a href="https://agentmods.dev/skills/chf3198/copilot-governance/github-ruleset-architecture"><img src="https://agentmods.dev/badge/skills/chf3198/copilot-governance/github-ruleset-architecture/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 github-ruleset-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/chf3198/copilot-governance/github-ruleset-architecture"><img src="https://agentmods.dev/badge/skills/chf3198/copilot-governance/github-ruleset-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 472 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.
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.00031 $0.00472
Opus 5.5 $0.00012 $0.00189
Sonnet 5.5 $0.00006 $0.00094
Haiku 4.5 $0.00003 $0.00047

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

Security

Grade A, and why

github-ruleset-architecture 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.

skills/github-ruleset-architecture/SKILL.md · 73 lines

What it actually says

GitHub Ruleset Architecture

Purpose

Create a deterministic, auditable protection model using GitHub rulesets as primary governance controls.

Scope

  • Branch/tag rulesets
  • Push rulesets where supported
  • Ruleset layering with existing branch protection
  • Bypass actor minimization
  • Merge queue compatibility checks

Hard constraints

  1. No destructive migration in one pass.
  2. Preserve current enforcement unless explicitly approved.
  3. Prefer staged rollout: Disabled -> validate -> Active.
  4. Always report bypass principals explicitly.

Core checks

  • Ruleset target patterns (fnmatch) are precise and non-overlapping where possible.
  • Layered rules produce intended effective policy (most restrictive wins).
  • Bypass is least-privilege (role/team/app, justified).
  • Merge queue requirements align with rules/protections.
  • Required checks include merge_group readiness where merge queue is used.

Output contract

RULESET_ARCHITECTURE_REPORT
mode: <audit|design|migrate|verify>
scope: <repo|org>
policy_profile: <strict|standard|light>

current_state:
- rulesets_found: <count>
- branch_protection_found: <yes|no>
- merge_queue_required: <yes|no>

findings:
- id: R1
  result: <pass|fail|partial>
  observation: <what exists>
  risk: <low|medium|high>

proposed_changes:
1) change: <specific rule/ruleset>
   rationale: <why>
   rollout: <disabled-validate-active|direct>
   verification: <objective check>

decision:
- <apply|defer|NO_CHANGE>

missing_evidence:
- <none or required artifacts>

Invocation policy

Use before pre-merge governance hardening and before introducing merge queue/ruleset changes across repos.

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 · 73 lines · 31 tokens per session scan A aa0a7a7c8ebf

Subscribe to this mod's changes

github-ruleset-architecture is a skill published in the GitHub repository chf3198/copilot-governance (2 stars, last pushed 7d ago), licensed MIT. It adds 31 tokens to every session and 472 once invoked, about $0.0001 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-31.

Related

github-ruleset-architecture compared with skills from other repositories

github-ruleset-architecture next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
github-ruleset-architecturechf3198/copilot-governanceSkill27d agoMITA31Claude Code
merge-batchdiegosouzapw/OmniRouteSkill91k3d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15ktodayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.8ktodayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1kyesterdayMITA51Claude Code
comet-githubrpamis/cometSkill3.3kyesterdayMITA72Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex