glab-snippet — Claude Code skill for creating snippets
The glab-snippet Claude Code skill creates GitLab snippets from files or stdin text. It activates when a request is to share code or text as a new snippet.
MIT 115 installs ★ 51 updated 2026-10-20
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a claude-codeWhat glab-snippet does
The skill creates project or personal snippets with glab snippet create. It accepts one file, multiple files, or text piped through stdin; stdin content needs a filename supplied with --filename. Set visibility to public, internal, or private; snippets are private by default.
For a project snippet, the command uses the repository selected by the current checkout, so verify that repository or pass --repo. Files are uploaded with their contents, so review them for secrets first. Existing snippets are viewed, changed, or deleted through the GitLab UI or glab api; glab snippet has no native commands for those actions.
What it helps with
- create a project snippet from a file
- publish a personal snippet containing several files
- send stdin text into a new snippet
- choose snippet visibility during creation
Example prompts for the agent
- Create a project snippet from
script.pytitled “Example”. - Make a personal snippet from
app.pyandrequirements.txttitled “Example”. - Create a snippet from stdin text and name its file
main.go.
How to install glab-snippet
1Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a claude-code2Manually: put the files in place
~/.claude/skills/glab-snippet/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/glab-snippet/
1Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a codex2Manually: put the files in place
.agents/skills/glab-snippet/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a cursor2Manually: put the files in place
.cursor/skills/glab-snippet/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install vince-winkintel/gitlab-cli-skills glab-snippet2Manually: put the files in place
.github/skills/glab-snippet/SKILL.md1Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a gemini-cli2Platform CLI
gemini skills install https://github.com/vince-winkintel/gitlab-cli-skills --path glab-snippetManually: put the files in place
.devin/skills/glab-snippet/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about glab-snippet
How do I install glab-snippet in Claude Code?
Run npx skills add vince-winkintel/gitlab-cli-skills --skill glab-snippet -a claude-code. The skill file is at ~/.claude/skills/glab-snippet/SKILL.md.
What does glab-snippet do?
It creates GitLab project and personal snippets from files or stdin text. Use the GitLab UI or glab api to view, edit, or delete existing snippets.
What does glab-snippet need to run?
It needs glab. For a project snippet, verify the current repository or pass --repo; uploaded files should be checked for secrets.
Source text
SKILL.md · MIT
--- name: glab-snippet description: Create GitLab project or personal code snippets with glab. Use when sharing code or text as a new snippet from files or stdin. For viewing, editing, or deleting existing snippets, use the GitLab UI or the snippets API through glab api. Triggers on snippet, gist, code snippet, share code, create snippet. --- # glab snippet `glab snippet` creates snippets. It does not provide native view, update, list, or delete subcommands; use the GitLab UI or `glab api` with the project or personal snippets API for those operations. ## Create from files ```bash # Project snippet in the repository selected by the current checkout glab snippet create --title "Example" script.py # Multiple files glab snippet create --title "Example" app.py requirements.txt # Personal snippet glab snippet create --personal --title "Example" script.py ``` Verify the current repository or pass `--repo` before creating a project snippet. Review every input file for secrets because the command uploads its contents. ## Create from stdin ```bash printf '%s\n' 'package main' | \ glab snippet create --title "Go example" --filename main.go ``` Use `--filename` when stdin supplies the content. Choose `--visibility public`, `internal`, or `private` deliberately; the default is private. ## Existing snippets For project snippets, use the [Project snippets API](https://docs.gitlab.com/api/project_snippets/) through `glab api`. For personal snippets, use the [Snippets API](https://docs.gitlab.com/api/snippets/). Read the target first and verify the host, project, snippet ID, and actor before any update or delete request. ## Command reference See [references/commands.md](references/commands.md) for checksum-verified `glab snippet` and `glab snippet create` help.
© vince-winkintel · MIT · vince-winkintel/gitlab-cli-skills