docs: update glab SKILL.md with comments section and API content-type guidance
Description
Updates the bundled glab skill (internal/commands/skills/bundled/assets/glab/SKILL.md) with documentation that was missing and caused agents to waste tool calls when posting comments and using glab api.
Changes
a) New "Comments and discussions" section
- Documents
glab issue/mr/incident notewith the required-mflag - Documents stdin / heredoc patterns for long or Markdown comment bodies on
glab mr note create(preferred for non-interactive use) - Documents the
$(cat << 'EOF' ... EOF)heredoc-in--mfallback forglab issue noteandglab incident note(which do not read stdin) - Documents
glab mr note create --replyfor threaded MR replies (full ID or 8+ char prefix) - Documents
glab mr note create --file/--linediff comments andglab mr note resolve/reopenfor thread state management - Documents
glab api .../discussions/<id>/notesfallback for threaded replies on issues/incidents
b) Quick reference additions
glab mr note create <iid> -m "comment text"under Merge requestsglab ci status --output jsonandglab ci get --merge-request <iid> --with-job-details/--pipeline-id <id> --output jsonfor non-streaming pipeline inspectionglab api projects/:id/jobs/<job-id>/tracefor fetching a finished job log without streaming- Corrected
glab ci retry <job-id>(was<pipeline-id>)
c) New "Content-type guidance" subsection under API calls
- Explains the difference between
-f(raw string),-F(file/type-inferred), and--input(raw bytes requiring explicitContent-Typeheader) - Prevents HTTP 415 errors from
--inputwithoutContent-Type
d) Expanded "Common mistakes" section
-mrequirement forglab issue note/glab incident note(open$EDITORwithout it)- Deprecation of root
glab mr noteflags in favor ofcreate/resolve/reopensubcommands - Editor-opening flags (
--description "-") are unsafe in agent environments - Threaded reply limitations for issues/incidents
--inputContent-Type pitfallglab ci retrytakes a job ID, not a pipeline IDglab ci tracestreams (blocks until job finishes) — useglab ci getor the trace API insteadglab ci viewis an interactive terminal UI — useglab ci statusorglab ci getinstead
Related Issues
Resolves #8316 (closed)
How has this been tested?
This is a documentation-only change to a skill Markdown file.
- The
validate-skillspre-commit hook ran successfully, confirming the skill file parses correctly. @duo-developer-gitlab-orgran a verification session against this MR exercising every documented command. Results in this comment:- All quick-reference commands pass.
- All Comments and discussions patterns (
-m, stdin pipe, heredoc stdin, heredoc-in--m,--replyfull ID and 8-char prefix,--repo) pass. - All API content-type patterns pass, including the documented HTTP 415 behavior when
--inputis used withoutContent-Type. glab mr note create --file --line(diff comments) andglab mr note resolve/reopenfail with HTTP 403 in agent sessions because the agent token currently only hasai_workflows read_apiscope. These commands work outside agent sessions and the broader scope work is in progress separately, so the documentation is retained.
- Iterated on the diff based on the verification feedback: removed duplication (a separate "Non-interactive use (agents)" section and a separate "CI/CD pipeline inspection" section) and consolidated the actionable guidance into the quick reference and Common mistakes.
Edited by Thomas Schmidt