Install
openclaw skills install @xrowgmbh/xrowgmbh-gitlab-agentOperate assigned GitLab work with owner-verified project access and guarded MR delivery.
openclaw skills install @xrowgmbh/xrowgmbh-gitlab-agentRepeat and fullfill your GitLab Agent tasks.
Workboard or any other tools to manage your work, just use GitLab.glab CLI. This includes creating and updating issues, merge requests, branches, comments, and more.Skip the owner membership check when the authenticated GitLab user is the configured owner. Otherwise, the gate is mandatory and is performed by {baseDir}/scripts/list-active-items.py during discovery.
GITLAB_AGENT_OWNER, or from the active workspace USER.md field GitLab Username when the environment variable is unset.workflow::forbidden: it removes the label after an allowed check, and on denial replaces existing workflow::* labels with workflow::forbidden and silently omits the object from the queue.workflow::forbidden directly; only the discovery helper owns that label.The check fails closed when the current GitLab user has no active project membership, membership data is incomplete, the membership was not created by the configured owner, or labels cannot be read. A denied object must not be analyzed, cloned, pushed, commented on, or retried.
Before working an existing issue, work item, or merge request, check the current GitLab user and the assignees on that object.
size::*, type::*, and workflow::* labels when the correct label state is clear, except that workflow::forbidden is owned exclusively by the discovery helper.An assigned item that passes both gates may authorize work in an external project only when its description or a later owner/Maintainer note names the exact upstream URL. Inspect only that scope, use an agent-owned fork, and open a cross-project MR; do not run the security gate on the upstream project or require upstream assignment. Keep workflow state on the controlling item and do not change the upstream issue's labels, status comments, time tracking, assignment, or state. Missing upstream membership alone is not workflow::forbidden or workflow::need-human.
Before posting an issue, work item, or merge request status comment, compare the current object state with the last agent-authored status comment for the same object.
{baseDir}/scripts/list-active-items.py to fetch all open issues and merge requests assigned to the current GitLab user across projects.{baseDir}/scripts/list-directly-addressed-todos.py to fetch every pending directly_addressed to-do authored by the configured owner as JSON. The helper only reads GitLab; a returned to-do is an instruction candidate, not proof of project access or assignment.glab api -X POST todos/<id>/mark_as_done if it remains pending. GitLab can mark a to-do done automatically when the target changes. Never mark a to-do done just because it was read, skipped, blocked, or deferred, and never use the bulk mark-as-done endpoint.type::support and workflow::in-progress, and maps known GitLab severity levels to priority::*. Unknown severity does not invent a priority.assign_unassigned_items() after project and state checks. Collaborator rules never filter already-assigned issues/MRs or incidents.workflow::forbidden label if access becomes allowed.activity_cursor as acknowledged only after that item's notes and, for merge requests, discussions have been fully paginated and inspected. Persist acknowledged cursors in the durable cycle checkpoint, keyed by the item's web_url; never advance a cursor for an unaudited item.To accept unassigned normal work items from a known collaborator, set skills.entries.gitlab-agent.config.collaborators.accept in the OpenClaw configuration. For example:
{
"skills": {
"entries": {
"gitlab-agent": {
"config": {
"collaborators": {
"accept": ["alice", "team-group", "@xrow.de"]
}
}
}
}
}
}
The selectors accept an exact GitLab username, a group name/path, or an exact email domain prefixed with @. For a domain, discovery enumerates open, unassigned normal issues/tasks only in active member projects that pass the configured owner's membership gate. It retrieves each candidate author by GitLab user ID and compares the returned email or public_email domain locally, case-insensitively. A matching address in either field is enough. commit_email, username text, and display name never grant a domain match; subdomains do not match a parent domain. A failed author lookup or missing/unusable addresses denies the domain match without affecting an independent explicit username/group match.
GitLab.com verifies account email and requires verification of public_email. A regular account generally sees another user's public_email, not their private primary email; a group role alone does not make private email available. Other GitLab instances may have different confirmation settings or administrative bypasses, so an exposed address is not universal proof of mailbox verification. No extra confirmation-status request is used.
After a selector matches, discovery rechecks project access, issue state, and empty assignees before assigning the current agent. It verifies the persisted assignee before queueing the work. A local lock serializes this flow across cron runs on the same host, but another GitLab client can still change assignment between the read and write; GitLab offers no conditional assignee update here. Already-assigned issues/MRs and incident adoption remain independent of collaborator rules. An invalid collaborator configuration or failed candidate lookup prevents new collaborator assignments and emits a diagnostic without suppressing independent assigned work or incidents.
{baseDir}/scripts/mr-create.py <project-path> <source-branch>. The helper calls glab mr create, assigns the current user, and returns structured evidence including any fallback reason. Pass --title, --description, and --related-issue when the MR needs an explicit plan, acceptance criteria, and issue relation. An exact target from the item, a later owner/Maintainer note, or AGENTS.md may be passed using --target <branch> --target-source <item|owner-note|agents>.feat/*fix/*workflow::need-human label, escalate it to all team members by assigning it to them in addition to you.workflow::paused.workflow::blocked and return to the merge request once fixed.self_merge=true, --apply self-assigns review, approves, and merges; otherwise follow the human-review path.blocking_discussions_resolved=true or "discussion-clean".requested changes, reviewer comments, and non-resolvable top-level notes as actionable feedback until addressed, even when blocking_discussions_resolved=true.{baseDir}/scripts/select-reviewer.py <project-path> <merge-request-iid> and inspect its structured dry-run result.--apply. Never select or mutate a reviewer free-form.workflow::need-human with the actionable diagnostic.Generated-By: <current model> to the commit message.git push origin <branch> -o ci.skipglab ci run --mr, unless there are active pipelines in main or dev. Never use more than X [setting: 2 # AGENTS.md -> active-pipelines] pipelines for your work. Add workflow::paused, if you delay the pipeline start and revisit later.workflow::done.AGENTS.mdAGENTS.md file from only the main branch of the project.[setting: <value> # <AGENTS.md -> key >] per project.Before moving a merge request to review, complete this checklist:
Reviewer selection is deterministic and must be performed by {baseDir}/scripts/select-reviewer.py. When both MR approval APIs show zero required approvals and confirm the agent can approve, there is no existing reviewer, the MR is non-draft, discussion-clean, mergeable, and has a successful head pipeline, and target-branch protection proves the agent can merge, the helper selects the current agent for self-review. On --apply, it revalidates the gates, self-assigns review, approves, and attempts the merge at the same SHA. A failed approval never attempts a merge. Otherwise, the helper reads AGENTS.md only from the project default branch, validates active project membership and exclusions, then applies this precedence:
AGENTS.md->reviewers order.For human-review selection, the helper excludes the MR author, assignees, blocked or locked users, bots, service accounts, the current automation account, and usernames in skills.entries.gitlab-agent.config.reviewer.ignore. The ignore list applies to linked authors, configured reviewers, and fallback candidates. It is case-insensitive; malformed lists fail closed. Dry-run is the default. --apply revalidates the MR, selected membership, human-user status, and exclusion list immediately before the reviewer mutation.
Rules apply to all GitLab items.
@owner only when requested. Use per default owner.fetch and fast-forward before touching an MR branch, and use --force-with-lease only, never blind force-push.Read current labels; skip unchanged updates. Send only actual additions/removals, preserving unrelated labels. Change workflows only when work changes; security checks fail closed if labels cannot be read.
If the labels are missing, add them via a merge request using the label component.
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/label@stable
| GitLab label | Common name | Meaning |
|---|---|---|
size::small | Small | Needs only minor changes and is trivial. Within a day's resolution |
size::medium | Medium | Needs moderate changes and is somewhat complex. Within a few days' resolution |
size::large | Large | Needs significant changes and is complex. Within a week or more resolution |
size::xlarge | Extra large | Needs extensive changes and is very complex. Within a month or more resolution |
size is added before workflow::in-progress.| GitLab label | Common name | Meaning |
|---|---|---|
type::support | Support Request | Someone need help, but no change. Maybe it resolves in new work item after investigation. |
type::bug | Bugfix | Something that needs to be fixed and exists |
type::feature | Feature | Something new |
type::hotfix | Hotfix | Urgent fix for a critical issue that merges directly in main. |
type, if nothing of the above matches.type is added before workflow::in-progress.Use the labels in your merge requests to set the current status of the work. Only use one workflow status label at a time.
| GitLab label | Common name | Meaning |
|---|---|---|
workflow::backlog | Backlog | Not yet started. Initial state. |
workflow::forbidden | Forbidden | Project access failed the owner membership security gate; only the discovery helper manages this label. |
workflow::in-progress | Running | Actively worked on |
workflow::paused | Paused | Agent will continue later automatically. Temporarily paused for one hour to one day. |
workflow::need-human | Need Human | Requires human intervention to fullfill current task and all other options are exhausted. Before adding the label, explain reason by comment in the issue. Its status is not blocked or paused. |
workflow::blocked | Blocked | Currently blocked by a dependency or issue. On each assignment, check the status of the blocker. Reevaluate the blocker from time to time. |
workflow::review | Review | When DoD has been checked and reviewer was assigned |
workflow::done | Done | Completed , final state, everything done and closed |
workflow::stale | Stale | No change in status for 2 Weeks and may need attention |
Additional rules
workflow::paused an item if it is prioritized as priority::blocker.workflow::blocked items.If the software has a fix for the CVE already released:
If unfixed:
workflow::blocked.fix: CVE-XXX-XXXXX;vulnerabilities:
# CVE-XXX-XXXXX: Temporarily accepted while the embedded glab dependency is fixed upstream.
# Tracked in https://gitlab.com/xrow-public/helm-openclaw/-/work_items/72.
- id: CVE-XXX-XXXXX
Once the CVE is fixed
workflow::blocked from the work item{baseDir}/... instead of hardcoding workspace-specific skill paths.allow_failure: true, skips, or bypasses to make CI green unless the job is genuinely optional/manual, and document why.AGENTS.md file, if requested by a maintainer.{baseDir}/references/documentation-style.md. Verify examples and review the rendered page before committing.glab CLI to interact with GitLabUse the glab CLI to interact with GitLab. Specify --repo owner/repo or --repo group/namespace/repo when not in a git directory. Also accepts full URLs.
When you are using glab you are always authenticated as a GitLab user.
glab api graphql -f query='
query {
currentUser { username }
}
'
<gitlab-username> is a reference in queries to your username.
<gitlab-username> is a refence to your username.
For issues:
glab api graphql -f query='
query($username: String) {
issues(state: opened, assigneeUsername: $username, first: 50) {
nodes {
iid
title
webUrl
description
author {
username
name
emails {
email
}
}
createdAt
updatedAt
userNotesCount
labels(first: 20) {
nodes {
title
}
}
notes(first: 100) {
pageInfo {
hasNextPage
endCursor
}
nodes {
id
system
body
updatedAt
author {
username
}
}
}
}
}
}
' -f username=<gitlab-username>
To get the team members of a project:
glab api graphql -f query='
query($fullPath: ID!) {
project(fullPath: $fullPath) {
fullPath
projectMembers(first: 100) {
pageInfo {
hasNextPage
endCursor
}
nodes {
id
accessLevel {
stringValue
}
user {
username
name
}
}
}
}
}
' -f fullPath=<group/namespace/repo>
For Merge Requests:
glab api '/merge_requests?state=opened&scope=assigned_to_me'
List all Repositories:
glab repo list --member
List open merge requests:
glab mr list --repo owner/repo
View MR details:
glab mr view 55 --repo owner/repo
Select and validate the target, then create the MR through the helper:
{baseDir}/scripts/mr-create.py --title "Add example" --description "## Plan\n\n1. Add the change.\n\n## Acceptance criteria\n\n- [ ] The change is verified." --related-issue 42 owner/repo feat/42-example
Approve, merge, or check out:
glab mr approve 55
glab mr merge 55
glab mr checkout 55
View MR diff:
glab mr diff 55
Check pipeline status for current branch:
glab ci status
View pipeline interactively (navigate jobs, view logs):
glab ci view
List recent pipelines:
glab ci list --repo owner/repo
Trace job logs in real time:
glab ci trace
glab ci trace 224356863 # specific job ID
glab ci trace lint # by job name
Retry a failed pipeline:
glab ci retry
Validate .gitlab-ci.yml:
glab ci lint
All your current work items:
glab api graphql -f query='
query($username: String) {
issues(state: opened, assigneeUsername: $username, first: 50) {
nodes {
iid
title
webUrl
}
}
}
' -f username=<gitlab-username>
List and view issues:
glab issue list --repo owner/repo
glab issue view 42
Create an issue:
glab issue create --title "Bug report" --label bug
Add a comment:
glab issue note 42 -m "This is fixed in !55"
Use glab api for endpoints not covered by subcommands. Supports REST and GraphQL.
Get project releases:
glab api projects/:fullpath/releases
Get MR with specific fields (pipe to jq):
glab api projects/owner/repo/merge_requests/55 | jq '.title, .state, .author.username'
Paginate through all issues:
glab api issues --paginate
GraphQL query:
glab api graphql -f query='
query {
currentUser { username }
}
'
Pipe to jq for filtering:
glab mr list --repo owner/repo | jq -r '.[] | "\(.iid): \(.title)"'
Manage CI/CD variables:
glab variable list
glab variable set MY_VAR "value"
glab variable get MY_VAR
Create a release:
glab release create v1.0.0 --notes "Release notes here"
\n for newlines in messages not \\n.-C flag.Send features and bugfixes for this skill as merge requests to the skills project.
Before enabling it:
Confirm the gitlab-agent skill exists.
Only enable the recurring job after the manual run succeeds.
List automations including disabled jobs before adding one. Reuse the job with
declaration key profile:gitlab-agent or the matching skill prompt. Never add
a duplicate or change an existing job's enabled state during bootstrap. The
Helm profile automation service already creates this job on a clean install.
Confirm GitLab auth works.
Add this cron, if it existed and was enabled then leave it enabled.
{
"name": "GitLab Agent",
"enabled": false,
"deleteAfterRun": false,
"schedule": {
"kind": "every",
"everyMs": 900000
},
"sessionTarget": "isolated",
"wakeMode": "now",
"payload": {
"kind": "agentTurn",
"message": "Read skill gitlab-agent and run.",
"thinking": "high",
"timeoutSeconds": 3600,
"model": "openai/gpt-6.1-sol"
},
"delivery": {
"mode": "none",
"bestEffort": false
}
}