โ† All skills
Tencent SkillHub ยท Developer Tools

gitlab-code-reviewer

Senior-level code review for GitLab merge requests. Use when: reviewing MRs, providing feedback on code quality, security, performance, maintainability, or p...

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Senior-level code review for GitLab merge requests. Use when: reviewing MRs, providing feedback on code quality, security, performance, maintainability, or p...

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
references/review-guidelines.md, scripts/gitlab_client.py, scripts/ignore_matcher.py, scripts/post_comments.py, SKILL.md

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.2

Documentation

ClawHub primary doc Primary doc: SKILL.md 6 sections Open source page

1. Read credentials and check token scope

Credentials: ~/.openclaw/credentials/gitlab.json { "token": "glpat-xxx", "host": "https://gitlab.com", "ignore_patterns": ["*.min.js", "*.lock", "forms/*.json"] } Required API scopes: api โ€” required for posting inline comments read_api โ€” sufficient for analysis only (no comment posting) Always run token check first to know upfront whether comments can be posted: python scripts/gitlab_client.py check-token <mr_url> Output includes "can_write": true/false. If false, skip step 6 and inform the user that the token needs the api scope to post comments. Do NOT proceed to analysis and then fail at step 6.

2. Fetch MR metadata and diff

python scripts/gitlab_client.py fetch-mr <mr_url> python scripts/gitlab_client.py fetch-diff <mr_url> fetch-diff returns a JSON array. Each entry contains new_path, old_path, diff (unified diff text), and boolean flags new_file, deleted_file, renamed_file. Fallback: if the /diffs endpoint returns HTTP 500 (some self-hosted GitLab instances), the script automatically retries via /changes. No manual intervention needed.

3. Filter files

Use ignore_matcher.py to exclude files before analysis: from ignore_matcher import filter_diffs reviewable = filter_diffs(all_diffs) # merges defaults + credentials ignore_patterns Default ignore patterns (always applied, even without credentials file): *.min.js, *.min.css, *.lock, package-lock.json, pnpm-lock.yaml, forms/*.json Binary extensions (.png, .jar, .class, .map, etc.) are always skipped.

4. Analyze the diff

Analyze only modified lines (added/removed in the diff). Do not comment on unchanged context lines. If the total diff is large, process file-by-file and aggregate results. Read references/review-guidelines.md for all review rules, severity definitions, and comment format. Focus areas: Java / Spring Boot โ€” Clean Code, SOLID, transaction boundaries, lazy loading MongoDB โ€” query correctness, index coverage, atomicity PostgreSQL โ€” SQL correctness, isolation levels, index/schema migrations React / TypeScript โ€” hooks correctness, type safety, XSS, stale closures

5. Structure the chat summary

  • Group findings by severity:
  • ## Code Review โ€” <MR title> (<source_branch> โ†’ <target_branch>)
  • ### Critical
  • `UserService.java:42` โ€” Transaction wraps HTTP call; holds DB lock during network I/O.
  • ### Major
  • `OrderRepository.java:87` โ€” N+1: `findRolesByUserId` called inside loop. Use batch query.
  • ### Minor
  • `PaymentDto.java:15` โ€” Field name `val` is not descriptive.
  • ### Decision: Needs changes
  • Decision options: Pass / Needs changes / Reject
  • Pass: no Critical or Major findings
  • Needs changes: one or more Major findings, no Critical
  • Reject: one or more Critical findings

6. Post inline comments to GitLab

  • Only execute this step if check-token (step 1) returned "can_write": true.
  • Write comments to a temp JSON file, then post via post_comments.py.
  • Never use python -c with inline comment bodies โ€” backticks and special characters break shell escaping.
  • # 1. Write all findings to a JSON file
  • cat > /tmp/mr_comments.json << 'EOF'
  • [
  • {
  • "file_path": "src/main/UserService.java",
  • "line": 42,
  • "body": "[CRITICAL] Transaction wraps HTTP call...\n\nSuggestion:\n```java\n// fix\n```"
  • }
  • ]
  • EOF
  • # 2. Post via script
  • python scripts/post_comments.py <mr_url> /tmp/mr_comments.json
  • How to determine the correct line number from a diff hunk:
  • @@ -375,6 +375,8 @@ โ† new file starts at line 375
  • unchanged line โ†’ 375
  • unchanged line โ†’ 376
  • unchanged line โ†’ 377
  • + added line โ†’ 378 โ† use this number
  • + added line โ†’ 379
  • Count from the +A value in @@ -X,Y +A,B @@ for new-file lines.
  • Each comment body format (from references/review-guidelines.md ยง8):
  • [SEVERITY] <one-line issue>
  • <2-4 sentence explanation referencing the diff.>
  • Suggestion:
  • ```<language>
  • <corrected snippet>
  • **Constraints:**
  • Do not auto-approve the MR.
  • Do not add labels or trigger pipelines.
  • Only post comment-type discussions (no approval API calls).
  • If a line is not in the diff, the API returns an error โ€” log it and continue with the next comment.
  • On HTTP 403 `insufficient_scope`, the script stops immediately and prints a fix instruction. Do not retry.
  • ## Behavior Rules
  • Strict engineering tone. No emotional language. No generic praise.
  • Analyze only the modified code in the diff. Do not speculate about code outside the diff.
  • Do not log or persist source code content.
  • Respect ignore patterns strictly.
  • For large diffs: process per file, deduplicate similar findings across files before final output.
  • ## References
  • **Review rules, severity table, comment format**: `references/review-guidelines.md`
  • - ยง2 Java & Spring Boot (Clean Code, transactions, N+1, concurrency)
  • - ยง3 MongoDB (queries, indexes, atomicity)
  • - ยง4 PostgreSQL (SQL correctness, isolation, migrations)
  • - ยง5 React & TypeScript (hooks, type safety, security)
  • - ยง6 SOLID & DDD alignment
  • - ยง7 Severity classification table
  • - ยง8 Inline comment format template
Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
3 Scripts2 Docs
  • SKILL.md Primary doc
  • references/review-guidelines.md Docs
  • scripts/gitlab_client.py Scripts
  • scripts/ignore_matcher.py Scripts
  • scripts/post_comments.py Scripts