微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

gitlab-code-reviewer

gitlab-code-reviewer · v1.0.0
安全 unknown 级 作者 neuyazvimyi 公开目录收录
949 下载 1 安装 4k 收藏 1 浏览

简介

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...

通过你的 Agent 添加

安装目录:gitlab-code-reviewer/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/gitlab-code-reviewer/
Codex CLI~/.codex/skills/gitlab-code-reviewer/
DeepSeek Harness~/.agents/skills/gitlab-code-reviewer/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: gitlab-code-reviewer description: "Senior-level code review for GitLab merge requests. Use when: reviewing MRs, providing feedback on code quality, security, performance, maintainability, or preparing review comments for GitLab MRs."

GitLab Code Reviewer

Overview

Automated code review tool for GitLab merge requests. Analyzes code for security vulnerabilities, code quality issues, and best practices violations.

When to Use

  • Review merge requests automatically
  • Find security vulnerabilities (SQL injection, XSS, hardcoded secrets, etc.)
  • Detect code quality issues
  • Generate review comments for GitLab

Usage

Via OpenClaw

"Review MR !42 in project group/project"

Via CLI

# Using GitLab URL (recommended)
python scripts/gitlab_code_review.py --url "https://gitlab.com/group/project/-/merge_requests/42"

# Using project and MR IID
python scripts/gitlab_code_review.py --project group/project --mr 42

# Post comments to GitLab
python scripts/gitlab_code_review.py --project group/project --mr 42 --post-comments

# Save report to file
python scripts/gitlab_code_review.py --project group/project --mr 42 --output review.md

# From diff file (offline)
python scripts/gitlab_code_review.py --diff-file changes.json

Configuration

Credentials

Create ~/.openclaw/credentials/gitlab.json:

{
  "token": "glpat-xxx",
  "host": "https://gitlab.com",
  "ignore_patterns": [
    "*.min.js",
    "*.lock",
    "forms/*.json"
  ]
}

Get token: GitLab → Settings → Access Tokens → Create token with read_api, write_repository scopes.

Priority: --token arg > GITLAB_TOKEN env > credentials file

Security Checks

Category Severity Examples
SQL Injection HIGH String concatenation in queries
XSS HIGH innerHTML, document.write
Command Injection CRITICAL os.system, subprocess with user input
Hardcoded Secrets CRITICAL Passwords, API keys, tokens
Weak Crypto MEDIUM MD5, SHA1, DES
Path Traversal MEDIUM User input in file paths
Auth Bypass CRITICAL Hardcoded admin checks

Review Priorities

  • 🔴 Critical — Block merge (security vulns, data loss)
  • 🟡 Major — Fix before merge (error handling, missing tests)
  • 🟢 Minor — Recommendations (style, documentation)

Supported Languages

Python, JavaScript/TypeScript, Java, Go, Ruby, PHP, YAML, JSON

File Ignoring

Default ignores: *.min.js, *.min.css, *.lock, package-lock.json, pnpm-lock.yaml, forms/*.json

Override with --ignore "*.json" "*.lock" or --no-default-ignores


Note: This tool assists human review but doesn't replace it.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill