openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > GitCode API

Fetch and query data from GitCode platform via its REST API: repositories, branches, issues, pull requests, commits, tags, users, organizations, search, webh...

开发与 DevOps

作者:do_while_true @autoxj

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.3.0

统计:⭐ 1 · 225 · 1 current installs · 1 all-time installs

1

安装量(当前) 1

🛡 VirusTotal :良性 · OpenClaw :可疑

Package:autoxj/gitcode

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :可疑

OpenClaw 评估

The skill mostly matches a GitCode API client, but there are coherence issues (missing homepage/source, contradictory dependency claims, and unclear/misleading guidance about token scopes) that you should resolve before trusting it with credentials.

目的

The skill's name/description match its artifacts: SKILL.md, reference and examples are all GitCode API documentation. However the package lacks a source/homepage (origin unknown). The reference includes destructive endpoints (create/update/delete repos, add members) but the token guidance only recommends read scopes, which is inconsistent with the full capability surface.

说明范围

SKILL.md stays within API usage: it documents base URL, headers, token locations, and expected status codes. It does not instruct reading arbitrary system files. One oddity: it documents multiple places to read an env var (including PowerShell/.NET user/system variables) — that expands where an agent may look for the token but is still within the token retrieval context.

安装机制

No install spec (instruction-only) which is low-risk. But SKILL.md claims 'Python 3.7+ standard library only' while examples use the third-party 'requests' library — that's an inconsistency (the skill expects a dependency but doesn't declare/install it).

证书

The only declared credential is GITCODE_TOKEN which is appropriate for a GitCode client. However: (1) examples and reference include write/destructive APIs (create PR, create/delete files, delete repo, add members) that require broader scopes than the token creation guidance implies; (2) the skill encourages pasting tokens directly in prompts (user-provided token), which is risky; (3) the SKILL.md suggests reading user/system env entries on Wi…

持久

No elevated persistence requested (always:false). The skill is instruction-only and does not request to modify other skills or system settings.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「GitCode API」。简介:Fetch and query data from GitCode platform via its REST API: repositories, bran…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/autoxj/gitcode/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: gitcode
description: "Fetch and query data from GitCode platform via its REST API: repositories, branches, issues, pull requests, commits, tags, users, organizations, search, webhooks, members, releases and more. 查询 GitCode 上的仓库、分支、议题、PR、提交、标签、用户、组织等数据。Python 3.7+ standard library only."
metadata: {"openclaw": {"requires": {"env": ["GITCODE_TOKEN"]}, "primaryEnv": "GITCODE_TOKEN", "optional": true}}
---

# GitCode API

## 何时使用

查仓库/分支/议题/PR/提交/标签、用户与组织、搜索、Webhook、成员、发布等 GitCode 数据。**全量 API 一览**(每个接口的功能说明与可获取信息)见 **[reference.md](reference.md)**,为本 skill 唯一 API 说明文档。

## 请求与认证

- **Base URL**:`https://api.gitcode.com/api/v5`
- **认证**:以下接口须带 Token(否则可能 400/401):pulls、issues、branches、commits、仓库详情与文件列表、tags、releases、members、webhooks 等。
- **Token 获取方式**(按优先级):
  1. **用户直接提供**:用户可在问题中直接提供 token,如"获取 gitcode 上 owner/repo 仓库的 star 数量,token 是 xxxxx"
  2. **环境变量**:从 `GITCODE_TOKEN` 读取,顺序:(1) 当前进程 `$env:GITCODE_TOKEN`(PowerShell)或 `$GITCODE_TOKEN`(bash);(2) Windows 用户变量 `[Environment]::GetEnvironmentVariable('GITCODE_TOKEN','User')`;(3) Windows 系统变量 `[Environment]::GetEnvironmentVariable('GITCODE_TOKEN','Machine')`
- **请求头**:使用 `PRIVATE-TOKEN: {token}` 或 `Authorization: Bearer {token}`,或查询参数 `access_token={token}`
- **未配置时**:提示用户到 [GitCode 个人访问令牌](https://gitcode.com/setting/token-classic) 创建 Token(勾选 read_api、read_repository 等),并设置环境变量 `GITCODE_TOKEN`。

## 状态码与限流

| Code | 含义 |
|------|------|
| 200/201/204 | 成功 |
| 400 | 缺少参数或未带认证(部分接口) |
| 401 | Token 无效或缺失 |
| 403/404/409/422 | 禁止/未找到/冲突/校验失败 |
| 429 | 限流(默认 50/分钟、4000/小时) |

## 接口与示例

- **全量接口**:所有 v5 接口的 Method / Path / 功能说明 / 可获取信息 / 官方文档链接见 **[reference.md](reference.md)**(含 Repositories、Branch、Issues、Search、PR、Commit、Tag、Labels、Milestone、Users、Orgs、Webhooks、Member、Release 等)。
- **调用示例**:见 [examples.md](examples.md)。
- **官方文档**:<https://docs.gitcode.com/docs/apis/>(每接口单独页含参数与响应)。