@mberneti/clab
BAI-powered review of self-hosted GitLab merge requests. Fetches MR diff, applies project-specific rules, posts inline comments. Can analyze past MRs to generate review rules.
Install
agr install @mberneti/clab --target claudeWrites 9 files into .claude/skills/, pinned to git-02ebfacc.
- .claude/skills/clab/.gitignore
- .claude/skills/clab/CHANGELOG.md
- .claude/skills/clab/Makefile
- .claude/skills/clab/README.md
- .claude/skills/clab/RELEASING.md
- .claude/skills/clab/SKILL.md
- .claude/skills/clab/gitlab-mr-review-rules.md
- .claude/skills/clab/go.mod
- .claude/skills/clab/install.sh
Document
name: clab description: "AI-powered review of self-hosted GitLab merge requests. Fetches MR diff, applies project-specific rules, posts inline comments. Can analyze past MRs to generate review rules."
clab — Claude Code Skill
Two commands. Install both by copying the files in commands/ to your project's .claude/commands/:
mkdir -p .claude/commands
curl -fsSL https://raw.githubusercontent.com/mberneti/clab/main/commands/clab-review.md \
-o .claude/commands/clab-review.md
curl -fsSL https://raw.githubusercontent.com/mberneti/clab/main/commands/clab-prepare-rules.md \
-o .claude/commands/clab-prepare-rules.md
Commands
| Command | Purpose |
|---|---|
/clab-review | Review a single MR — fetch diff, lint, semantic review, post inline comments |
/clab-prepare-rules | Analyze past MRs and generate project-specific review rules |
See each command file for full usage and steps.
Required config
Create .claude/gitlab-mr-review.env in your project (never commit this):
GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
GITLAB_HOST=git.digikala.com
GITLAB_PROJECT=frontend%2Fdigikala-now-react
Binaries
All commands depend on Go binaries installed via:
curl -fsSL https://raw.githubusercontent.com/mberneti/clab/main/install.sh | bash
| Binary | Used by |
|---|---|
clab-fetch-diff | /clab-review, /clab-prepare-rules |
clab-lint-rules | /clab-review, /clab-prepare-rules |
clab-post-comments | /clab-review |
clab-list-mrs | /clab-prepare-rules |
Typical workflow
# First time: generate rules from recent history
/clab-prepare-rules --last 30 --dry-run
/clab-prepare-rules --last 30
# Ongoing: review each MR
/clab-review <MR_URL>
Trustgrade B
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- warnLicenseno SPDX license detected
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-02ebfaccebf92026-07-31