Agent skill
gitlab-protected-branches
Manages protected branches in GitLab. Use for protecting/unprotecting branches, code owner approvals. Triggers: branch protection.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/gitlab-protected-branches
SKILL.md
Overview
Secures branches.
Available Tools
get_protected_branches: Retrieve a list of protected branches in a specific GitLab project or Retrieve details of a specific protected branch in a GitLab project..- Parameters:
project_id(str): Optional. - Project ID or pathbranch(Optional[str]): Optional. - Name of the branch to retrieve (e.g., 'main')
- Parameters:
protect_branch: Protect a specific branch in a GitLab project with specified access levels.- Parameters:
project_id(str): Optional. - Project ID or pathbranch(str): Optional. - Name of the branch to protect (e.g., 'main')push_access_level(Optional[str]): Optional. - Access level for pushing (e.g., 'maintainer')merge_access_level(Optional[str]): Optional. - Access level for merging (e.g., 'developer')unprotect_access_level(Optional[str]): Optional. - Access level for unprotecting (e.g., 'maintainer')allow_force_push(Optional[bool]): Optional. - Whether force pushes are allowedallowed_to_push(Optional[List[Dict]]): Optional. - List of users or groups allowed to pushallowed_to_merge(Optional[List[Dict]]): Optional. - List of users or groups allowed to mergeallowed_to_unprotect(Optional[List[Dict]]): Optional. - List of users or groups allowed to unprotectcode_owner_approval_required(Optional[bool]): Optional. - Whether code owner approval is requiredctx(Optional[Context]): Optional. - MCP context for progress
- Parameters:
unprotect_branch: Unprotect a specific branch in a GitLab project.- Parameters:
project_id(str): Optional. - Project ID or pathbranch(str): Optional. - Name of the branch to unprotect (e.g., 'main')ctx(Optional[Context]): Optional. - MCP context for progress
- Parameters:
require_code_owner_approvals_single_branch: Require or disable code owner approvals for a specific branch in a GitLab project.- Parameters:
project_id(str): Optional. - Project ID or pathbranch(str): Optional. - Name of the branch to set approval requirements for (e.g., 'main')code_owner_approval_required(bool): Optional. - Whether code owner approval is requiredctx(Optional[Context]): Optional. - MCP context for progress
- Parameters:
Usage Instructions
- Access levels: push/merge.
Examples
- Protect:
protect_branchwith project_id="123", branch="main", push_access_level="maintainer". - Code owners:
require_code_owner_approvals_single_branchwith code_owner_approval_required=true.
Error Handling
- Already protected: Update instead.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?