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.
npx skills add grandcamel/GitLab-Assistant-Skills --skill gitlab-protected-branchgit clone --depth 1 https://github.com/grandcamel/GitLab-Assistant-SkillsWrote 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.
[](https://agentmods.dev/skills/grandcamel/gitlab-assistant-skills/gitlab-protected-branch)<a href="https://agentmods.dev/skills/grandcamel/gitlab-assistant-skills/gitlab-protected-branch"><img src="https://agentmods.dev/badge/skills/grandcamel/gitlab-assistant-skills/gitlab-protected-branch.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.02503 |
| Opus 5 | $0.00030 | $0.01252 |
| Sonnet 5 | $0.00012 | $0.00501 |
| Haiku 4.5 | $0.00006 | $0.00250 |
Grade A, and why
gitlab-protected-branch 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Protected Branch Skill
Branch protection management for GitLab using glab api raw endpoint calls.
Quick Reference
| Operation | Command Pattern | Risk |
|---|---|---|
| List protected | glab api projects/:id/protected_branches |
- |
| Get protection | glab api projects/:id/protected_branches/:name |
- |
| Protect branch | glab api projects/:id/protected_branches -X POST -f ... |
⚠️ |
| Update protection | glab api projects/:id/protected_branches/:name -X PATCH -f ... |
⚠️ |
| Unprotect branch | glab api projects/:id/protected_branches/:name -X DELETE |
⚠️⚠️ |
Risk Legend: - Safe | ⚠️ Caution | ⚠️⚠️ Warning | ⚠️⚠️⚠️ Danger
When to Use This Skill
ALWAYS use when:
- User mentions "protect branch", "branch protection", "protected branches"
- User wants to restrict who can push/merge to a branch
- User mentions "force push", "code owners", "merge access"
- User wants to configure main/release branch security
NEVER use when:
- User wants to create/delete branches (use git or gitlab-repo)
- User wants to manage merge request approvals (different API)
- User wants to configure CI/CD for branches (use gitlab-ci)
API Prerequisites
Required Token Scopes: api
Permissions:
- View protected branches: Developer+
- Manage protected branches: Maintainer+
Premium Features:
- Code owner approval: GitLab Premium
- Multiple access levels: GitLab Premium
Access Levels
| Level | Value | Description |
|---|---|---|
| No access | 0 | Nobody can perform action |
| Developer | 30 | Developers and above |
| Maintainer | 40 | Maintainers and above |
| Admin | 60 | Instance admins only |
Available Commands
List Protected Branches
# List all protected branches
glab api projects/123/protected_branches --method GET
# With pagination
glab api projects/123/protected_branches --paginate
# Using project path
glab api "projects/$(echo 'mygroup/myproject' | jq -Rr @uri)/protected_branches"
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.
- 8d ago First seen · 304 lines · 60 tokens per session scan A 2f49a51093ef
gitlab-protected-branch is a skill published in the GitHub repository grandcamel/GitLab-Assistant-Skills (4 stars, last pushed 7mo ago), licensed MIT. It adds 60 tokens to every session and 2,503 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
asana-sweep-setup
Set up asana-sweep in the current repository by deriving its GitLab and Asana configuration, confirming task-based scope rules, writing asana-sweep.config.json, and validating it with a dry run. Use when the user asks to set up, configure, or initialize asana-sweep.
implement-issue
Take a GitHub issue from planning to PR, resumable across clarification waits.
gitlab-cli
GitLab CLI (glab) wrapper for MR status, issues, and repository operations.
github-cli
GitHub CLI (gh) wrapper for PR status, issues, and repository operations.
atmos-hooks
Atmos hooks: lifecycle events, hook kinds, command/store/git/security hooks, step/steps hooks, when: conditions, scoping and overrides, toolchain integration, --skip-hooks, and Atmos Pro/local output.
atmos-pro
Atmos Pro setup and workflows: settings.pro, GitHub OIDC, affected and inventory uploads, stack locks, pro commit, workflow dispatch, merge queues, and drift detection.