branch-permissions

Enforce Git branch permissions and approval workflows via pre-tool use hooks.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/jimmymalhan/codereview-pilot --skill branch-permissions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch-permissions
Source: https://github.com/jimmymalhan/codereview-pilot/tree/main/.claude/skills/branch-permissions
Command: npx skills add https://github.com/jimmymalhan/codereview-pilot --skill branch-permissions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates access control for Git branches, ensuring that feature branches allow for flexible development while protected branches like main/master require explicit approval for changes.

Core Features & Use Cases

  • Feature Branch Automation: Automatically allows edits, safe commands, and even pushes on branches prefixed with feature/.
  • Protected Branch Control: Prompts for approval on changes to main or master branches, enhancing safety.
  • Configurable Permissions: Uses local settings to define which actions are auto-allowed versus require asking.

Quick Start

Use the branch-permissions skill to enforce safe Git workflows based on your current branch.

Frequently Asked Questions about branch-permissions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Git branch permissions to enforce approval workflows on protected branches?

Automating Git branch permissions involves mapping specific branches like main or master to predefined rules that prompt for approval before changes. This Skill enforces those workflows using pre-tool use hooks based on your local configuration mappings.

Can I auto-allow edits and pushes on feature branches while protecting the main branch?

Yes, you can auto-allow edits and pushes on feature branches while protecting the main branch. The Skill identifies your current branch and applies configurable permissions, automatically allowing actions on feature/ prefixes and prompting for approval on main.

What is the best way to prevent accidental commits to the master branch during a workflow?

Preventing accidental commits to the master branch requires enforcing explicit approval workflows for protected branches. This Skill maps your current branch to a predefined permission set and intercepts changes to main or master using pre-tool use hooks.

Do I need local configuration to set up branch-specific Git permissions?

Yes, local configuration is required to set up branch-specific Git permissions. You must define local settings that map your branches, such as feature/ or main, to their corresponding permission sets for auto-allowed actions or explicit approval prompts.

How does a pre-tool use hook enforce code review rules on different Git branches?

A pre-tool use hook enforces code review rules by intercepting actions before execution and checking them against your branch permission mappings. It automatically allows safe commands on feature branches and requires explicit approval for changes on protected main or master branches.