A Codex skill for working with GitLab through the glab CLI.
This repository packages a reusable skill that tells Codex when to prefer glab, how to verify command availability, and which local references to consult before guessing flags.
skills/glab/SKILL.md: the skill definition and operating rulesskills/glab/agents/openai.yaml: agent metadata for invocation UXskills/glab/references/: checked-in command references derived fromglabdocs and help outputskills/glab/scripts/generate_docs_command_tree.py: regeneration script for the reference files
glab is broad, changes over time, and has many subcommands that are easy to guess wrong.
This skill pushes the agent toward a stricter workflow:
- confirm repo and auth context
- check source-derived references or local help
- prefer a built-in
glabsubcommand overglab api - keep commands non-interactive and scriptable
That is the difference between a demo prompt and something you can rely on in real repositories.
- Codex with local skill support
glabinstalled and authenticatedgitavailable inPATHpython3available if you want to regenerate references
Clone this repository somewhere local, then copy skills/glab into the skill directory used by your coding agent.
Source directory:
skills/glab
Target directories:
- Codex / Cursor:
.agents/skills/glab - Claude Code:
.claude/skills/glab
Example:
git clone git@github.com:isamisushi/glab-skill.git
# Codex / Cursor
mkdir -p ~/.agents/skills
cp -R glab-skill/skills/glab ~/.agents/skills/glab
# Claude Code
mkdir -p ~/.claude/skills
cp -R glab-skill/skills/glab ~/.claude/skills/glabThe skill is self-contained. The references it depends on are already checked in.
Ask the agent to use the glab skill, or rely on implicit invocation when the task is clearly about GitLab state.
Example prompts:
Use the glab skill to list my open merge requestsUse the glab skill to show the latest failed pipelineUse the glab skill to create a release for tag v1.2.3Use the glab skill to fetch project variables with glab api
The checked-in reference files are snapshots. They should be regenerated after upgrading glab or when the GitLab CLI command surface changes.
From the repository root:
python3 skills/glab/scripts/generate_docs_command_tree.pyThe script expects working glab authentication because it queries GitLab and clones the upstream CLI repository.
After regeneration, review and commit the updated files under skills/glab/references/.
This repository is intentionally narrow.
It is not a general GitLab integration layer, a plugin marketplace package, or a wrapper around glab itself.
It is a skill bundle that improves command selection and reduces hallucinated CLI usage.
See CONTRIBUTING.md.
MIT. See LICENSE.