[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81703":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":13,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":14,"starSnapshotCount":14,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},81703,"clab","mberneti\u002Fclab","mberneti","Open source Claude skill for automated GitLab MR reviews. Configurable lint rules, semantic analysis, and inline comment posting for self-hosted GitLab instances.",null,"Go",50,3,1,0,5,1.81,false,"main",true,[],"2026-06-12 02:04:18","# clab\n\nAI-powered GitLab MR code review as a Claude Code skill.  \nFetches the diff, runs lint rules, and posts inline comments — no external services, no Node.js.  \nCan also analyze past MRs to generate project-specific review rules automatically.\n\n---\n\n## How it works\n\n```\n\u002Fclab-review \u003CMR_URL>\n```\n\nClaude Code invokes Go binaries in sequence:\n\n| Binary               | What it does                                                                  |\n| -------------------- | ----------------------------------------------------------------------------- |\n| `clab-fetch-diff`    | Fetches MR metadata + full paginated diff → `\u002Ftmp\u002Fgl_mr_data.json`            |\n| `clab-lint-rules`    | Runs regex-based lint rules → `\u002Ftmp\u002Fgl_mr_auto_findings.json`                 |\n| `clab-post-comments` | Posts findings as inline GitLab discussions                                   |\n| `clab-list-mrs`      | Lists MR IIDs by count, specific IDs, or date range (used by `prepare-rules`) |\n\nClaude performs a semantic review on top of the lint output, then calls `clab-post-comments` with the combined findings.\n\n---\n\n## Demo\n\n![Detected issue posted as inline GitLab discussion](demo\u002Fdetected-issue.png)\n\n---\n\n## Installation\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fmberneti\u002Fclab\u002Fmain\u002Finstall.sh | bash\n```\n\nInstalls `clab-fetch-diff`, `clab-lint-rules`, `clab-post-comments`, and `clab-list-mrs` to `\u002Fusr\u002Flocal\u002Fbin`.\n\n**Custom install directory:**\n\n```bash\nCLAB_INSTALL_DIR=~\u002F.local\u002Fbin curl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fmberneti\u002Fclab\u002Fmain\u002Finstall.sh | bash\n```\n\n**Specific version:**\n\n```bash\nCLAB_VERSION=v1.0.0 curl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fmberneti\u002Fclab\u002Fmain\u002Finstall.sh | bash\n```\n\nSupports Linux and macOS on amd64 and arm64. Pre-built archives are on the [Releases](..\u002F..\u002Freleases) page.\n\n---\n\n## Setup\n\n### 1. Create a GitLab personal access token\n\nGo to **GitLab → User Settings → Access Tokens** and create a token with the `api` scope.\n\n### 2. Add the skills to your Claude Code or Cursor project\n\n```bash\nmkdir -p .claude\u002Fcommands\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fmberneti\u002Fclab\u002Fmain\u002Fcommands\u002Fclab-review.md \\\n  -o .claude\u002Fcommands\u002Fclab-review.md\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fmberneti\u002Fclab\u002Fmain\u002Fcommands\u002Fclab-prepare-rules.md \\\n  -o .claude\u002Fcommands\u002Fclab-prepare-rules.md\n```\n\n> **Cursor users:** same steps, Cursor reads `.claude\u002Fcommands\u002F` and exposes them as `\u002F` slash commands in the chat panel.\n\n### 3. Create the config file\n\n```bash\ncat > .claude\u002Fgitlab-mr-review.env \u003C\u003C 'EOF'\nGITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx\nGITLAB_HOST=gitlab.com\nGITLAB_PROJECT=your-group%2Fyour-repo\nEOF\n```\n\n> **Never commit this file.** Add `.claude\u002Fgitlab-mr-review.env` to `.gitignore`.\n\n### 4. (Optional) Project-specific rules\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fmberneti\u002Fclab\u002Fmain\u002Fgitlab-mr-review-rules.md \\\n  -o .claude\u002Fgitlab-mr-review-rules.md\n```\n\nRules format:\n\n```\nRULE[critical] no-eval     — never use eval() in client code\nRULE[major]    no-any      — no TypeScript `any` casts\nRULE[minor]    rtl-missing — user-facing text must have dir=\"rtl\"\n```\n\n---\n\n## Usage\n\nWorks in **Claude Code** and **Cursor** — both read `.claude\u002Fcommands\u002F` and invoke the same `\u002F` slash commands.\n\n### Review a single MR\n\n```\n\u002Fclab-review \u003CMR_URL>\n\u002Fclab-review \u003CMR_IID>                    # uses GITLAB_PROJECT from config\n\u002Fclab-review \u003CMR_URL> --dry-run          # print findings, don't post\n\u002Fclab-review \u003CMR_URL> --rules-only       # print active rules and exit\n\u002Fclab-review \u003CMR_URL> --severity major+  # only major and critical\n```\n\n### Generate rules from past MRs\n\n```\n\u002Fclab-prepare-rules --last 20\n\u002Fclab-prepare-rules --mr-ids 123,456,789\n\u002Fclab-prepare-rules --since 2026-01-01\n\u002Fclab-prepare-rules --since 2026-01-01 --until 2026-03-31\n\u002Fclab-prepare-rules --last 10 --dry-run   # print suggestions, don't write file\n\u002Fclab-prepare-rules --last 10 --append    # append to existing rules file\n```\n\nAnalyzes findings across multiple MRs, identifies recurring patterns, and writes them as named rules to `.claude\u002Fgitlab-mr-review-rules.md`.\n\n---\n\n## Built-in rules\n\n| Severity | Rule ID        | What it catches                                  |\n| -------- | -------------- | ------------------------------------------------ |\n| critical | `no-secrets`   | Hardcoded tokens, passwords, API keys            |\n| major    | `dead-code`    | Commented-out code blocks (>3 consecutive lines) |\n| minor    | `todo-comment` | TODO\u002FFIXME without a ticket reference            |\n| minor    | `large-file`   | File diff > 400 lines — suggests splitting       |\n\nProject-specific rules from `.claude\u002Fgitlab-mr-review-rules.md` are applied on top.\n\n---\n\n## Binary CLI reference\n\nAll binaries read config from environment variables. The skill sets them from `.claude\u002Fgitlab-mr-review.env`.\n\n### `clab-fetch-diff [output.json]`\n\n```\nEnv:  GITLAB_TOKEN  GITLAB_HOST  GITLAB_PROJECT_ID  GITLAB_MR_IID\nOut:  \u002Ftmp\u002Fgl_mr_data.json  (default)\n```\n\n### `clab-lint-rules [input.json] [output.json]`\n\n```\nIn:   \u002Ftmp\u002Fgl_mr_data.json          (default)\nOut:  \u002Ftmp\u002Fgl_mr_auto_findings.json (default)\n```\n\n### `clab-post-comments [findings.json]`\n\n```\nEnv:  GITLAB_TOKEN  GITLAB_HOST  GITLAB_PROJECT_ID  GITLAB_MR_IID\nIn:   \u002Ftmp\u002Fgl_mr_findings.json  (default)\n```\n\n### `clab-list-mrs [flags] [output.json]`\n\n```\nEnv:    GITLAB_TOKEN  GITLAB_HOST  GITLAB_PROJECT_ID\nOut:    \u002Ftmp\u002Fgl_mr_list.json  (default)\nFlags:\n  --last N                 last N MRs (any state), newest first\n  --mr-ids IID,IID,...     specific MR IIDs\n  --since YYYY-MM-DD       MRs created on or after date\n  --until YYYY-MM-DD       MRs created on or before date (combine with --since)\n```\n\n---\n\n## Building from source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmberneti\u002Fclab.git\ncd clab\nmake build    # .\u002Fbin\u002F\nmake release  # cross-compile all platforms → .\u002Fdist\u002F\n```\n\n---\n\n## License\n\nMIT\n","clab 是一个开源的 Claude 技能，用于自动化 GitLab 合并请求（MR）代码审查。项目通过 Go 语言实现，能够从自托管的 GitLab 实例中获取 MR 的差异文件、运行可配置的 lint 规则，并基于语义分析结果在 MR 中发布内联评论，整个过程无需依赖外部服务或 Node.js。此外，clab 还可以分析历史 MR 来自动生成项目特定的审查规则。该工具适合于需要增强代码审查效率和质量控制的开发团队使用，特别是那些偏好自托管解决方案且希望减少对外部服务依赖的团队。",2,"2026-06-11 04:06:01","CREATED_QUERY"]