浏览器

gitee

试用

Gitee operations via OpenAPI and git: repositories, pull requests, issues, comments, and file contents. Use when: (1) inspecting or creating Gitee pull reque...

它能做什么

Use for clone, fetch, branch, and push operations. Use + for structured Gitee API calls.

技能文档

Gitee Skill

Use git for clone, fetch, branch, and push operations. Use curl + jq for structured Gitee API calls.

When to Use

✅ USE this skill when:

  • Checking Gitee pull requests, branches, or repository metadata
  • Listing or creating issues on a Gitee repository
  • Reading repository files through the Gitee API
  • Automating Gitee workflows from the terminal when no dedicated CLI is available

When NOT to Use

❌ DON'T use this skill when:

  • Working with GitHub repositories → use the github skill
  • Doing local-only git work with no Gitee interaction → use git directly
  • Handling browser-only flows such as login, captcha, or SSO approval

Setup

  1. Create a Gitee personal access token with the repository permissions you need.
  2. Export the API base URL and token:
export GITEE_API="https://gitee.com/api/v5"
export GITEE_ACCESS_TOKEN="..."
  1. Never print, commit, or paste the token into chat. Keep it in environment/config only.

Remote Patterns

Common Gitee remotes:

https://gitee.com/owner/repo.git
git@gitee.com:owner/repo.git

Inspect the current repo:

git remote -v
git remote get-url origin

API Conventions

  • Gitee OpenAPI examples commonly pass OAuth2 credentials as access_token.
  • Prefer curl -fsS so HTTP failures surface clearly.
  • Prefer jq -nc to build JSON request bodies instead of hand-escaped strings.
  • Repository issue APIs differ from GitHub: many issue routes use /repos/{owner}/issues and pass the repo name as a repo field.

Common Commands

Pull Requests

List open pull requests:

OWNER=owner
REPO=repo

curl -fsS --get "$GITEE_API/repos/$OWNER/$REPO/pulls" \
  --data-urlencode "access_token=$GITEE_ACCESS_TOKEN" \
  --data-urlencode "state=open" |
  jq '.[] | {number, title, state, author: .user.login}'

View one pull request:

PR_NUMBER=12

curl -fsS --get "$GITEE_API/repos/$OWNER/$REPO/pulls/$PR_NUMBER" \
  --data-urlencode "access_token=$GITEE_ACCESS_TOKEN"

Create a pull request:

HEAD_BRANCH="feature-branch"
BASE_BRANCH="main"
TITLE="feat: add gitee support"
BODY="Summary of the change"

curl -fsS -X POST "$GITEE_API/repos/$OWNER/$REPO/pulls" \
  -H "Content-Type: application/json" \
  -d "$(jq -nc \
    --arg access_token "$GITEE_ACCESS_TOKEN" \
    --arg title "$TITLE" \
    --arg head "$HEAD_BRANCH" \
    --arg base "$BASE_BRANCH" \
    --arg body "$BODY" \
    '{access_token: $access_token, title: $title, head: $head, base: $base, body: $body}')" |
  jq '{number, title, html_url, state}'

Issues

List issues for a repository:

curl -fsS --get "$GITEE_API/repos/$OWNER/issues" \
  --data-urlencode "access_token=$GITEE_ACCESS_TOKEN" \
  --data-urlencode "repo=$REPO" \
  --data-urlencode "state=open" |
  jq '.[] | {number, title, state}'

Create an issue:

TITLE="Bug: unexpected failure"
BODY="Steps to reproduce..."

curl -fsS -X POST "$GITEE_API/repos/$OWNER/issues" \
  -H "Content-Type: application/json" \
  -d "$(jq -nc \
    --arg access_token "$GITEE_ACCESS_TOKEN" \
    --arg repo "$REPO" \
    --arg title "$TITLE" \
    --arg body "$BODY" \
    '{access_token: $access_token, repo: $repo, title: $title, body: $body}')" |
  jq '{number, title, state, html_url}'

Repository Contents

Read a file:

FILE_PATH="README.md"

curl -fsS --get "$GITEE_API/repos/$OWNER/$REPO/contents/$FILE_PATH" \
  --data-urlencode "access_token=$GITEE_ACCESS_TOKEN"

Create or update file contents use the same path with POST or PUT. Build the JSON body with jq -nc and include the commit message plus content fields required by the endpoint.

Git Transport

Clone from Gitee:

git clone "https://gitee.com/$OWNER/$REPO.git"

Push the current branch:

git push origin HEAD

Add a dedicated Gitee remote:

git remote add gitee "git@gitee.com:$OWNER/$REPO.git"
git push gitee HEAD

Useful jq Filters

Open PR titles:

jq -r '.[] | "#\(.number) \(.title)"'

Issue numbers and links:

jq -r '.[] | "#\(.number) \(.html_url)"'

Notes

  • Prefer API calls when you need structured metadata, filtering, or automation.
  • Prefer git when you need branch, commit, clone, fetch, or push behavior.
  • Gitee OpenAPI docs: https://gitee.com/api/v5/swagger
  • If an operation is missing here, look it up in the OpenAPI docs and keep the same access_token + curl pattern.

相关技能

执行 Git 操作(提交、分支、合并、变基、冲突解决与恢复)时强制套用安全规则。

作者 Iván535 次安装31 星标

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai22 次安装8 星标

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván559 次安装18 星标

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。

作者 Iván855 次安装69 星标

jvy 的更多技能

浏览全部技能

面向中文办公场景的 WPS 文档、表格与演示处理及格式兼容。

作者 jvy142 次安装4 星标

Create Apache ECharts option JSON, standalone HTML chart pages, and export-ready chart artifacts from CSV, TSV, JSON tables, or existing option configs. Use...

作者 jvy23 次安装

Write, explain, adapt, and debug practical shader code for GLSL, WebGL, Three.js ShaderMaterial, React Three Fiber, postprocess-style full-screen effects, an...

作者 jvy24 次安装1 星标

Build, debug, and integrate OpenLayers web maps, including map/view setup, XYZ and OSM base layers, vector sources, GeoJSON overlays, Web Mercator and WGS84...

作者 jvy17 次安装

Research public holidays, bank holidays, observed days, school breaks, and make-up workdays for any country or region. Use when the user asks whether a speci...

作者 jvy18 次安装

Explain and work with the CGCS2000 coordinate reference system for China geospatial workflows, including EPSG:4490 interpretation, projected CRS selection, G...

作者 jvy18 次安装