with one click
gitlab
GitLab 代码仓库数据查询:提交记录、Merge Request、项目成员、用户活跃度
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
GitLab 代码仓库数据查询:提交记录、Merge Request、项目成员、用户活跃度
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Discord 社区数据查询:频道消息、成员列表、线程
Figma 设计文件查询:读取文件结构、导出界面截图、查看组件和样式
生成交互式 HTML 可视化(图表、流程图、UI原型、数据仪表盘、演示页等)
将自己的 Skill 分享给同事或部门,管理已分享的 Skill
浏览、搜索、安装、卸载所有 Skill(系统/共享/个人)
查询 DataEye AdXray 广告透视平台数据,包括产品投放趋势、媒体分布、热门排行、新品排行、搜索产品等
| name | GitLab |
| description | GitLab 代码仓库数据查询:提交记录、Merge Request、项目成员、用户活跃度 |
| triggers | ["GitLab","GL","代码提交","提交记录","commit","MR","merge request","合并请求","设置GitLab","设置GL凭证"] |
| tool | tools/gitlab_api.py |
| default | false |
| credentials | {"key":"gitlab","display_name":"GitLab","setup":"manual","fields":[{"name":"token","label":"Personal Access Token (read_api)","secret":true}]} |
通过 GitLab REST API 查询代码仓库数据:提交记录、Merge Request、项目成员、用户活动事件。工具脚本:
tools/gitlab_api.py — 8 个子命令(只读)用户要求创建 MR、评论、approve、push 代码、创建 Issue 等写入类意图时,直接回复:
GitLab 功能目前仅支持查看,不支持写入操作。请在 GitLab 中直接操作。
使用前需先设置 GitLab Personal Access Token。Token 从 tygit PAT 页面 创建。
创建 Token 时只需勾选 read_api 一个 scope(只读访问 API),不要勾选 api(权限过大,包含写操作)、read_repository(用于 git clone,本 Skill 不拉代码)。
python3 tools/gitlab_api.py setup --token "glpat-xxxxxxxxxxxxxxxxxxxx"
清除凭证:
python3 tools/gitlab_api.py clear-credentials
收到 GitLab 查询需求时:
read_api scope,给出创建链接)list-projects 了解用户可访问的项目范围list-projects 结果匹配 id 或 path_with_namespace所有需要 --project 的子命令,可传项目 ID(数字)或 URL 编码的 namespace/project 路径。路径中的 / 需替换为 %2F,如 star-studio%2Fclient。
建议先 list-projects 获取 ID,后续用 ID 更简单。
python3 tools/gitlab_api.py setup --token "glpat-xxxxxxxxxxxxxxxxxxxx"
| 参数 | 必填 | 说明 |
|---|---|---|
| --token | 是 | Personal Access Token(只需 read_api scope) |
python3 tools/gitlab_api.py clear-credentials
无参数。
python3 tools/gitlab_api.py list-projects
python3 tools/gitlab_api.py list-projects --search "client"
python3 tools/gitlab_api.py list-projects --owned
| 参数 | 必填 | 说明 |
|---|---|---|
| --search | 否 | 按关键词搜索项目名 |
| --owned | 否 | 只列出自己拥有的项目 |
| --membership | 否 | 只列出自己是成员的项目(默认行为) |
| --per-page | 否 | 每页数量,默认 20,最大 100 |
| --page | 否 | 页码,默认 1 |
python3 tools/gitlab_api.py commits --project 42
python3 tools/gitlab_api.py commits --project 42 --author "zhangsan@example.com" --since 2026-04-11
python3 tools/gitlab_api.py commits --project 42 --ref develop --since 2026-04-01 --until 2026-04-18
| 参数 | 必填 | 说明 |
|---|---|---|
| --project | 是 | 项目 ID 或 URL 编码路径 |
| --author | 否 | 按作者过滤(邮箱或姓名) |
| --since | 否 | 起始日期(YYYY-MM-DD) |
| --until | 否 | 截止日期(YYYY-MM-DD) |
| --ref | 否 | 分支名或 tag,默认项目默认分支 |
| --per-page | 否 | 每页数量,默认 20,最大 100 |
| --page | 否 | 页码,默认 1 |
python3 tools/gitlab_api.py list-mrs --project 42
python3 tools/gitlab_api.py list-mrs --project 42 --state opened
python3 tools/gitlab_api.py list-mrs --project 42 --state merged --author zhangsan --since 2026-04-01
| 参数 | 必填 | 说明 |
|---|---|---|
| --project | 是 | 项目 ID 或 URL 编码路径 |
| --state | 否 | 状态过滤:opened / merged / closed / all(默认 all) |
| --author | 否 | 按作者用户名过滤 |
| --reviewer | 否 | 按 reviewer 用户名过滤 |
| --since | 否 | 创建时间起始(YYYY-MM-DD) |
| --per-page | 否 | 每页数量,默认 20,最大 100 |
| --page | 否 | 页码,默认 1 |
python3 tools/gitlab_api.py mr-detail --project 42 --mr-iid 123
python3 tools/gitlab_api.py mr-detail --project 42 --mr-iid 123 --with-changes --with-comments
| 参数 | 必填 | 说明 |
|---|---|---|
| --project | 是 | 项目 ID 或 URL 编码路径 |
| --mr-iid | 是 | MR 的项目内编号(iid) |
| --with-changes | 否 | 包含变更文件列表(文件路径 + 增删行数,不含 diff 正文) |
| --with-comments | 否 | 包含评论/讨论 |
python3 tools/gitlab_api.py user-events
python3 tools/gitlab_api.py user-events --username zhangsan --since 2026-04-11
| 参数 | 必填 | 说明 |
|---|---|---|
| --username | 否 | 目标用户名(不传查当前用户) |
| --since | 否 | 起始日期(YYYY-MM-DD) |
| --until | 否 | 截止日期(YYYY-MM-DD) |
| --per-page | 否 | 每页数量,默认 20,最大 100 |
| --page | 否 | 页码,默认 1 |
python3 tools/gitlab_api.py list-members --project 42
| 参数 | 必填 | 说明 |
|---|---|---|
| --project | 是 | 项目 ID 或 URL 编码路径 |
| --per-page | 否 | 每页数量,默认 20,最大 100 |
| --page | 否 | 页码,默认 1 |
list-projects --search "项目名" → 获取项目 IDcommits --project <id> --author "张三" --since 2026-04-11list-mrs --project <id> --state openedmr-detail --project <id> --mr-iid 123 --with-changes --with-commentslist-members --project <id> → 获取成员列表commits --project <id> --since 2026-04-01 --per-page 100 → 按 author 汇总user-events --since 2026-04-11 → 查看自己的 push/MR/comment 等活动--with-changes 只返回文件路径和增删行数统计,不返回 diff 正文