GitHub and GitLab CLI and API calls for PRs and MRs, review threads, comments, head refs, and PR templates. Load before any gh or glab call, however small.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Code Host Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-code-host-patterns)
---
name: code-host-patterns
description: GitHub and GitLab CLI and API calls for PRs and MRs, review threads, comments, head refs, and PR templates. Load before any gh or glab call, however small.
---
# Code host patterns
Default assumption: gh 2.106 and glab 1.133, per their releases.
A row applies when the installed `gh --version` or `glab --version` is at least its version, and an API row when the host serves it. Which host a repo is on: `skills/kit-rules/reference/tooling.md` section 4. A host with neither CLI: the matching operation of its MCP connector, or say none was found.
A skill names an operation (the PR's head SHA, a line comment, the PR template), and the host's file gives its command.
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ------------------------------------------------------------------- | -------------------------------------------------------- |
| A `gh` call, or any PR operation on GitHub | [reference/github.md](reference/github.md) |
| A `glab` call, or any MR operation on GitLab | [reference/gitlab.md](reference/gitlab.md) |
| A `gh` or `glab` call, or updating either CLI | [reference/upgrades.md](reference/upgrades.md) |
| Writing or reviewing a `gh` or `glab` call, or a workflow using one | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Paginating, or handling a rate limit | [reference/practices.md](reference/practices.md) |
| Linting a workflow or script that calls `gh` or `glab` | [reference/tooling.md](reference/tooling.md) |