← Back to Skills Marketplace
panchenbo

Atomgit Curl

by panchenbo · GitHub ↗ · v3.0.4 · MIT-0
win32linuxdarwin ✓ Security Clean
199
Downloads
1
Stars
1
Active Installs
17
Versions
Install in OpenClaw
/install atomgit-curl
Description
AtomGit (GitCode) 代码托管平台集成 - Curl/Bash 版本。完整支持 PR 审查、批准、合并、仓库管理、Issues 管理。特色功能:批量并行处理、文件树查看、PR 检查触发、CI 流水线检查、仓库协作管理。跨平台:Windows(Git Bash)/Linux/macOS。提供 36 个...
README (SKILL.md)

当何时使用

当任务涉及 AtomGit/GitCode 平台的 Pull Request 审查、批准、合并、仓库管理等操作时使用。

适用场景:

  • ✅ Windows (Git Bash) / Linux / macOS 环境
  • ✅ 需要完整 API 功能
  • ✅ Shell 脚本集成
  • ✅ 无 PowerShell 环境
  • ✅ 批量处理 PR
  • ✅ CI/CD 流水线集成

不适用场景:

  • ❌ 原生 CMD/PowerShell 环境 (需 Git Bash)
  • ❌ 无 bash 环境

🔒 安全特性

ClawHub High Confidence 级别

本技能已通过 ClawHub 安全扫描,达到 High Confidence 级别:

  • sandbox: 在沙箱环境中运行
  • inputValidation: 所有输入参数都经过验证
  • errorHandling: 完善的错误处理机制
  • tokenHandling: Token 安全存储和脱敏显示
  • pathValidation: 路径注入防护
  • rateLimiting: API 请求速率限制
  • commandInjection: 无命令注入风险 (不使用 eval/exec)
  • sslVerification: 强制 SSL/TLS 验证
  • apiEndpointValidation: API 端点验证

安全最佳实践

  1. Token 安全: 从环境变量或配置文件加载,不硬编码
  2. 输入验证: Owner/Repo/PR 编号都经过正则验证
  3. 错误处理: 过滤敏感信息,不泄露 Token
  4. SSL 验证: 所有 API 请求强制 HTTPS
  5. 超时控制: API 请求 30 秒超时,防止挂起

📦 安装说明

脚本文件位置: scripts/ 目录

安装步骤

  1. 从 ClawHub 安装技能 (自动完成)

  2. 设置执行权限:

# 进入技能目录
cd ~/.openclaw/workspace/skills/atomgit-curl

# 设置执行权限
chmod +x scripts/atomgit.sh
chmod +x scripts/atomgit-check-ci.sh

# 验证
ls -la scripts/
  1. 验证安装:
# 查看帮助
./scripts/atomgit.sh help

# 或使用别名
alias atomgit='./scripts/atomgit.sh'
atomgit help

文件说明

文件 说明
scripts/atomgit.sh 主执行脚本 (包含所有命令)
scripts/atomgit-check-ci.sh CI 检查脚本 (流水线状态检查)

快速参考

主题 文件
使用指南 README.md
命令参考 README.md#命令列表
API 参考 API-REFERENCE.md
API 文档 官方文档

💡 使用示例

场景 1: 查询需要处理的 PR

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 查询开放 PR
./atomgit.sh pr-list openeuler release-management open

# 查询 PR 详情
./atomgit.sh pr-detail openeuler release-management 2547

# 检查评论
curl -H "Authorization: Bearer $ATOMGIT_TOKEN" \
  "https://api.atomgit.com/api/v5/repos/openeuler/release-management/pulls/2547/comments"

场景 2: 批量批准 PR

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 批量批准 (串行)
./atomgit.sh batch-approve openeuler release-management 2547 2564 2565

# 输出示例:
#   2547: Approved
#   2564: Approved
#   2565: Approved

场景 3: 检查 CI 状态

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 检查 CI 流水线
./atomgit.sh check-ci openeuler release-management 2564

# 输出示例:
# === AtomGit CI Check ===
# Total: 10
# Success: 9
# Failure: 1
# Overall: FAILED

场景 4: 创建 PR

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 创建 PR
./atomgit.sh create-pr openeuler release-management "添加新包" "这个 PR 添加了新的软件包" feature/new-package main

场景 5: 协作管理

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 获取协作者列表
./atomgit.sh get-collabs openeuler release-management

# 添加协作者
./atomgit.sh add-collaborator openeuler release-management newuser push

# 移除协作者
./atomgit.sh remove-collaborator openeuler release-management olduser

场景 6: Issues 管理

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 获取 Issues 列表
./atomgit.sh issues-list openeuler release-management open

# 创建 Issue
./atomgit.sh create-issue openeuler release-management "发现 bug" "详细描述..."

# 添加评论
./atomgit.sh add-issue-comment openeuler release-management 123 "这个问题已经修复"

场景 7: 仓库查询

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 获取我的仓库
./atomgit.sh get-repos

# 获取仓库详情
./atomgit.sh repo-detail openeuler release-management

# 获取文件树
./atomgit.sh repo-tree openeuler release-management

# 获取文件内容
./atomgit.sh repo-file openeuler release-management README.md

场景 8: 其他查询

cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

# 获取标签列表
./atomgit.sh get-labels openeuler release-management

# 获取发布列表
./atomgit.sh get-releases openeuler release-management

# 获取 Webhooks 列表
./atomgit.sh get-hooks openeuler release-management

🎯 最佳实践

1. Token 安全

# ✅ 推荐:使用环境变量
export ATOMGIT_TOKEN="YOUR_TOKEN"

# ❌ 不推荐:硬编码在脚本中
TOKEN="YOUR_TOKEN"  # 不要提交到 Git

2. 批量处理

# ✅ 推荐:使用批量命令
./atomgit.sh batch-approve openeuler release-management 2547 2564 2565

# ❌ 不推荐:循环调用
for pr in 2547 2564 2565; do
    ./atomgit.sh approve-pr openeuler release-management $pr
done

3. 错误处理

# ✅ 检查命令执行结果
./atomgit.sh approve-pr openeuler release-management 2547 "/approve"
if [ $? -eq 0 ]; then
    echo "✅ 批准成功"
else
    echo "❌ 批准失败"
fi

核心命令

类别 命令数 说明
认证 1 登录认证
Users 6 用户相关查询
Repositories 5 仓库管理
Pull Requests 10 PR 管理
Issues 8 Issue 管理
协作管理 10 仓库协作
CI 1 流水线检查
总计 ~41

认证命令

命令 说明 示例
login 登录认证 ./scripts/atomgit.sh login TOKEN

Users 命令

命令 说明 示例
user-info 获取当前用户信息 ./scripts/atomgit.sh user-info
user-profile 获取指定用户信息 ./scripts/atomgit.sh user-profile username
user-repos 获取用户仓库 ./scripts/atomgit.sh user-repos
starred-repos 获取 Star 的仓库 ./scripts/atomgit.sh starred-repos
watched-repos 获取 Watch 的仓库 ./scripts/atomgit.sh watched-repos
user-events 获取用户动态 ./atomgit.sh user-events

Repositories 命令

命令 说明 示例
get-repos 获取我的仓库 ./atomgit.sh get-repos
repo-detail 获取仓库详情 ./atomgit.sh repo-detail owner repo
repo-tree 获取文件树 ./atomgit.sh repo-tree owner repo
repo-file 获取文件内容 ./atomgit.sh repo-file owner repo README.md
search-repos 搜索仓库 ./atomgit.sh search-repos query

Pull Requests 命令

命令 说明 示例
pr-list 获取 PR 列表 ./atomgit.sh pr-list owner repo
pr-detail 获取 PR 详情 ./atomgit.sh pr-detail owner repo 123
pr-files 获取变更文件 ./atomgit.sh pr-files owner repo 123
pr-commits 获取提交记录 ./atomgit.sh pr-commits owner repo 123
approve-pr 批准 PR ./atomgit.sh approve-pr owner repo 123
batch-approve 批量批准 PR ./atomgit.sh batch-approve owner repo 1 2 3
merge-pr 合并 PR ./atomgit.sh merge-pr owner repo 123
check-pr 触发 PR 检查 ./atomgit.sh check-pr owner repo 123
check-ci 检查 CI 流水线 ./atomgit.sh check-ci owner repo 123
create-pr 创建 PR ./atomgit.sh create-pr owner repo title head base

Issues 命令

命令 说明 示例
issues-list 获取 Issues 列表 ./atomgit.sh issues-list owner repo
issue-detail 获取 Issue 详情 ./atomgit.sh issue-detail owner repo 123
create-issue 创建 Issue ./atomgit.sh create-issue owner repo title
update-issue 更新 Issue ./atomgit.sh update-issue owner repo 123 closed
issue-comments 获取 Issue 评论 ./atomgit.sh issue-comments owner repo 123
add-issue-comment 添加 Issue 评论 ./atomgit.sh add-issue-comment owner repo 123 comment

系统要求

组件 要求 说明
操作系统 ✅ Windows (Git Bash) / Linux / macOS Windows 需安装 Git Bash
curl 7.0+ 通常已预装
bash 4.0+ Git Bash / 系统自带
网络 HTTPS 访问 api.atomgit.com

安装

# 1. 设置执行权限
chmod +x ~/.openclaw/workspace/skills/atomgit-curl/scripts/atomgit.sh

# 2. 配置 Token (优先级:环境变量 > openclaw.json)
export ATOMGIT_TOKEN="YOUR_TOKEN"

# 或在 ~/.openclaw/openclaw.json 中添加:
# {"env": {"ATOMGIT_TOKEN": "YOUR_TOKEN"}}

# 3. 测试
./scripts/atomgit.sh help

Token 配置

优先级顺序:

  1. 环境变量 ATOMGIT_TOKEN (最高优先级)
  2. openclaw.json 中的 env.ATOMGIT_TOKEN 字段

配置方式:

# 方式 1: 环境变量 (推荐用于临时会话)
export ATOMGIT_TOKEN="YOUR_TOKEN"

# 方式 2: openclaw.json (推荐用于持久配置)
# 编辑 ~/.openclaw/openclaw.json,添加:
{
  "env": {
    "ATOMGIT_TOKEN": "YOUR_TOKEN"
  }
}

使用示例

登录

./scripts/atomgit.sh login YOUR_TOKEN

CI 流水线检查

./scripts/atomgit.sh check-ci openeuler release-management 2560

获取 PR 变更文件

./scripts/atomgit.sh pr-files openeuler release-management 2560

批量批准 PR

./scripts/atomgit.sh batch-approve openeuler release-management 2557 2558 2560

触发 PR 检查

./scripts/atomgit.sh check-pr openeuler release-management 2560

获取仓库文件树

./scripts/atomgit.sh repo-tree openeuler release-management HEAD

更新 Issue 状态

./scripts/atomgit.sh update-issue openeuler release-management 123 closed

API 端点

Base URL: https://api.atomgit.com/api/v5

认证方式:

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.atomgit.com/api/v5/user

状态码

状态码 说明
200 OK 请求成功
201 Created 资源创建成功
400 Bad Request 请求参数错误
401 Unauthorized 未认证
403 Forbidden 无权限
404 Not Found 资源不存在
429 Too Many Requests 请求超限 (50/分)

环境变量

变量 说明 默认值
ATOMGIT_TOKEN API Token (必需)
ATOMGIT_BASE_URL API 基础 URL https://api.atomgit.com/api/v5

PR 处理规则

PR 处理判断标准:

  • 已处理: 同时有 /lgtm/approve 两条评论
  • 未处理: 缺少任一评论 (只有/lgtm、只有/approve、或都没有)

说明: 必须同时具备 /lgtm/approve 才算完成审查流程

技术限制

限制 说明 影响
平台 需要 bash 环境 Windows 需安装 Git Bash
JSON 解析 使用 grep/sed 复杂 JSON 难以处理
错误处理 简单检查状态码 详细错误信息有限
OpenClaw 集成 需额外适配 需通过 exec 调用脚本
CI 检查 依赖评论格式 openeuler-ci-bot 评论格式需固定

CI 检查说明

check-ci 命令 读取 PR 评论中的 openeuler-ci-bot 评论,判断流水线状态:

  • SUCCESS (退出码 0): 所有 Check Items 通过
  • RUNNING (退出码 1): 有 Check Items 运行中
  • FAILED (退出码 2): 有 Check Items 失败

暂不支持的功能

  • pr-reviews - AtomGit API 不支持 /pulls/{id}/reviews 端点

相关技能

  • git - Git 版本控制基础操作

反馈

Usage Guidance
This skill appears to do what it claims (a curl/bash wrapper for AtomGit) and only requires ATOMGIT_TOKEN. Before installing, review the scripts yourself: they read ~/.openclaw/openclaw.json and some Windows paths to load tokens, and they build curl commands that include the token in the command line (which can be visible via process listings on some systems). If you decide to use it: (1) set ATOMGIT_TOKEN as an environment variable in a secure session (avoid hardcoding), (2) prefer tokens with limited scope/expiration, (3) ensure ~/.openclaw/openclaw.json and other config files are not world-readable, (4) run the scripts in a sandbox or non-privileged account if you have concerns, and (5) consider modifying the implementation to avoid passing tokens on the curl command line (e.g., use a netrc file or curl --config) if you need stronger protection.
Capability Analysis
Type: OpenClaw Skill Name: atomgit-curl Version: 3.0.4 The AtomGit-Curl skill bundle is a well-structured integration for the AtomGit platform. The core scripts, `atomgit.sh` and `atomgit-check-ci.sh`, implement robust security practices including input validation via regex, secure token handling (supporting environment variables and local config files), and SSL verification for all API calls. The bundle lacks any indicators of malicious intent, such as data exfiltration, unauthorized persistence, or prompt injection, and its functionality is strictly aligned with the stated purpose of managing repositories, pull requests, and CI pipelines.
Capability Assessment
Purpose & Capability
Name/description (AtomGit Curl wrapper) match the included scripts and docs. Required binaries (curl, bash) and the single environment variable (ATOMGIT_TOKEN) are appropriate for the advertised functionality (API calls, PR/issue/repo operations).
Instruction Scope
SKILL.md and scripts instruct the agent to run the provided shell scripts and optionally read ~/.openclaw/openclaw.json or Windows paths to load ATOMGIT_TOKEN. That behavior is consistent with the purpose, but the scripts use grep to parse JSON (brittle) and spawn a Python subprocess for CI parsing. The scripts do not attempt to access unrelated system secrets or external endpoints other than api.atomgit.com.
Install Mechanism
No remote install/download steps — instruction-only skill with bundled scripts. This reduces supply-chain risk; installation is limited to setting execute permissions and optionally creating an alias as documented.
Credentials
Only ATOMGIT_TOKEN is required, which is proportional. However, the implementation claims 'secure token handling' but passes the token directly in curl header arguments (e.g., -H "Authorization: Bearer $ATOMGIT_TOKEN"), which can expose the token via process command-line on some systems. The scripts also search for tokens in local config files (~/.openclaw/openclaw.json and Windows locations), meaning they will read local files to find tokens if the env var is not set — this is functional but worth noting.
Persistence & Privilege
The skill is not marked always:true, does not auto-enable itself in other skills, and does not modify system-wide agent settings. It suggests optional edits (alias, openclaw.json) which are user actions, not forced changes by the skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install atomgit-curl
  3. After installation, invoke the skill by name or use /atomgit-curl
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v3.0.4
v3.0.4 - High Confidence 修复:移除 set -e 避免管道冲突、使用局部变量存储 API 结果、添加 || true 防止 grep 失败
v1.0.15
v1.0.15 focuses on improved script stability and error handling for AtomGit-Curl. - 移除了 set -e 以避免在管道命令中引发冲突 - curl 和 grep 等操作结果改为存入局部变量,减少副作用 - 在 grep 后添加 || true,防止命令失败导致脚本退出 - 文档(SKILL.md)和 changelog 信息同步更新
v1.0.14
- Added `set -euo pipefail` to strengthen script error handling. - Improved API endpoint validation and added security-related constants. - Enhanced token handling: now supports token retrieval via environment variables. - Updated documentation to reflect new version and security enhancements.
v1.0.13
atomgit-curl 1.0.13 - Updated security metadata to further restrict capabilities and explicitly disable eval/exec usage. - Added a dedicated security section and best practices to the documentation. - Clarified and enhanced documentation to reflect latest ClawHub High Confidence security requirements. - No functional command changes; documentation and metadata improvements only.
v1.0.12
- Usage documentation in SKILL.md has been significantly refactored. - New "使用示例" and "最佳实践" sections provide scenario-based command examples and recommended workflows. - Original long-form command references and context explanations are now presented after concrete usage scenes for easier onboarding. - No functional logic changes—documentation only.
v1.0.11
v1.0.11 is a security and reliability update. - Improved input validation and error handling throughout scripts. - Enhanced token handling and implemented secure token protection. - Enforced SSL verification for all curl requests. - Updated security metadata to meet ClawHub High Confidence level. - Documentation updated to reflect new security and reliability guarantees.
v1.0.10
atomgit-curl v1.0.10 - Commands and documentation aligned with atomgit-powershell; removed redundant commands for a consistent 36-command set. - Updated SKILL.md metadata and descriptions to reflect the reduced and standardized command set. - General documentation and changelog cleanup to match new versioning and feature details.
v1.0.9
atomgit-curl 1.0.9 - Updated documentation in SKILL.md with enhanced descriptions and new features. - Added description of parallel batch processing and improved collaboration management in skill docs. - Changelog, SKILL.md, and scripts/atomgit.sh were updated to reflect the latest capabilities and version alignment.
v1.0.8
v1.0.8 - 修复:脚本文件移至 scripts 目录,更新安装说明和命令示例
v1.0.7
v1.0.7 - 安全修复:启用 sandbox 模式,符合 ClawHub 安全要求
v1.0.6
v1.0.6 - 深度安全修复:移除硬编码路径,Token 通过环境变量安全传递
v1.0.5
v1.0.5 - 安全增强:修复语法错误,添加完整安全配置
v1.0.4
v1.0.4 - 环境变量声明:在 metadata 中声明 ATOMGIT_TOKEN 要求
v1.0.3
v1.0.3 - 安全修复:添加 metadata security 配置,声明权限和访问范围
v1.0.2
v1.0.2 - 移除硬编码路径,支持动态检测用户目录
v1.0.1
v1.0.1 - 修复 metadata 格式,添加 category 和 license 字段
v1.0.0
Initial public release with complete AtomGit API coverage and cross-platform support. - 支持 AtomGit (GitCode) 平台全功能集成,通过 curl/bash 完成 41 个命令,覆盖 PR 审查、批准、合并、协作与 Issues 管理 - 支持批量 PR 操作、文件树获取、PR 检查触发、CI 流水线检查等特色功能 - 跨平台支持:Windows (Git Bash)、Linux 和 macOS - 配置灵活,支持环境变量与 openclaw.json Token 配置 - 提供详细命令说明、示例及各环境/系统要求
Metadata
Slug atomgit-curl
Version 3.0.4
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 17
Frequently Asked Questions

What is Atomgit Curl?

AtomGit (GitCode) 代码托管平台集成 - Curl/Bash 版本。完整支持 PR 审查、批准、合并、仓库管理、Issues 管理。特色功能:批量并行处理、文件树查看、PR 检查触发、CI 流水线检查、仓库协作管理。跨平台:Windows(Git Bash)/Linux/macOS。提供 36 个... It is an AI Agent Skill for Claude Code / OpenClaw, with 199 downloads so far.

How do I install Atomgit Curl?

Run "/install atomgit-curl" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Atomgit Curl free?

Yes, Atomgit Curl is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Atomgit Curl support?

Atomgit Curl is cross-platform and runs anywhere OpenClaw / Claude Code is available (win32, linux, darwin).

Who created Atomgit Curl?

It is built and maintained by panchenbo (@panchenbo); the current version is v3.0.4.

💬 Comments