AGENT SKILL

protect-main-branch

Block direct commits and pushes to main or master. Enforced at commit time by reading the current branch, and at push time by parsing the refs the agent is pushing.

License 许可
Apache-2.0
最近更新
2026-11-15
Stars
★ 10
Forks
1

01 前言 Front Matter

name
protect-main-branch
metadata
{ "chock.artifact": "hook", "chock.enforcement": "block", "chock.coverage_without_chock": "advisory" }
description
Block direct commits and pushes to main or master. Enforced at commit time by reading the current branch, and at push time by parsing the refs the agent is pushing.

03 SKILL.md 正文

Protect Main Branch

Block direct commits and pushes to main or master. Enforced at commit time by reading the current branch, and at push time by parsing the refs the agent is pushing.

on(commit|push): block(forbidden_ref) refs=main|master
Direct commits/pushes to a protected branch (main|master) are blocked. Create a feature branch and open a pull request.

This skill is advisory: the client reading it has no mechanism to enforce it. The same policy compiled by chock blocks at commit and at push. See https://github.com/open-coder-ai/chock

04 同仓库更多 Skills