Agent skill

Git Ops

by Prismer-AI in Prismer-AI/PrismerCloud

Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving.

MITAuto-check: notesDevelopment

Install Git Ops

skills CLI
$ npx skills add Prismer-AI/PrismerCloud --skill git-ops -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Prismer-AI/PrismerCloud git-ops --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Prismer-AI/PrismerCloud.git skills-src && mkdir -p .claude/skills && cp -r skills-src/sdk/apc/skills/git-ops .claude/skills/git-ops && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-ops
GitHub stars
1.6k
Token cost
~1.9k tokens
SKILL.md length
631 words
Files
2
Skills in repo
88
Repo updated
First seen
Licence
MIT

At a glance

Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving.

  • Works in 7 steps: 定位 workdir → Stage 本 task 拥有的文件(自己做,commit 不代劳) → Commit → …
  • Tasks that involve Git workflow
  • SKILL.md covers 承重约束(先记死), 工具契约(签名以此为准,先核后用), Procedure and 输出契约(机器判据按这个回读,别自由发挥格式), plus 3 more sections
  • Calls git; needs APC_READBACK_TOKEN and PRISMER_API_KEY

What it does

Git Ops is an agent skill from Prismer-AI/PrismerCloud. Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving. Push reaches only the bare replica; prod-triggering tags are refused.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `skill.json`). Compatibility notes: ["claude-code"]

It sits in Development, covering Git workflow. It works with Git. The licence is MIT.

When your agent uses it

  • Tasks that involve Git workflow

Example prompts

  • “/git-ops”

Requirements

  • A credential in APC_READBACK_TOKEN
  • A credential in PRISMER_API_KEY
  • Compatibility (from SKILL.md): ["claude-code"]
  • Pre-approved tools (allowed-tools): Bash

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. 定位 workdir
  2. Stage 本 task 拥有的文件(自己做,commit 不代劳)
  3. Commit
  4. Branch(可选,按 task 需要建 scoped 分支)
  5. Merge 回主线 —— 冲突是停手信号,不是重试信号
  6. Push(到 bare 替身;prod tag 会被拒)
  7. 写 provenance 回 task(以主 agent 身份,用 --set-string)

What it can do on your machine

Read from SKILL.md and the folder at commit e5d9444. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • APC_READBACK_TOKEN
    • PRISMER_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    ["claude-code"]

    From compatibility in the SKILL.md frontmatter.

Context cost

Git Ops loads about 1.9k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 631 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Prismer-AI/PrismerCloud at commit e5d9444, republished under its MIT licence (© Prismer-AI). 631 words, ~1,950 tokens.

Download SKILL.mdSave it as .claude/skills/git-ops/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
git-ops
description
Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving. Push reaches only the bare replica; prod-triggering tags are refused.
allowed-tools
Bash
compatibility
["claude-code"]
license
MIT
scope
coding
metadata.category
vcs

git-ops

收口一个本地 coding task 的 git 动作——在 workdir 上 commit / branch / merge / push,并把 branch+sha 落回 task metadata(apc/05 §1 A2 · S8)。核心纪律:merge 冲突绝不自动解决——停手、列出冲突文件、escalate 给人,workdir 保持现场不回滚(apc/00 §3 不变量 6)。

什么时候用:一个 coding task 改完,需要把改动收口成 commit / 分支、merge 回主线、并把 provenance(branch/sha)记到 task 上。

承重约束(先记死)

  • commit 不自动 stage:cloud git commit 只提交已 staged 的内容。你必须先自己 git add <task-owned files>,只 stage 本 task 拥有的文件,别把无关改动带进去。
  • 单任务串行不变量:同一 repo 同时只有一个 coding task 在飞。别假设并发安全。
  • prod tag 禁止:四个 prod 触发前缀(k8s-prod-* / desktop-prod-* / prod-* / ali-k8s-prod-*)的 tag push 被 daemon 拒(真闸是 GitLab protected tags)。
  • push 只到 bare 替身:remote 必须是 daemon allowlist 里的纯名字(默认 origin,本地指向 bare 替身);URL / 带 -- 的值一律被拒。无 --force。
  • provenance 写 metadata 要用 --set-string:sha / branch 是字符串,用 --set(推断 JSON)会把全数字 sha 变成 number(40 位 sha 会被 1.2e+39 精度毁掉,7 位全数字 sha ≈3.7% 概率)。

工具契约(签名以此为准,先核后用)

cloud git 的 cwd 永远不由你传——它从 --workdir <id> 指向的 IMWorkdir 行读,daemon 侧再 jail 一次。--workspace / --daemon 默认取 dispatch env(PRISMER_WORKSPACE_ID / PRISMER_DAEMON_ID)。

命令作用关键 flag
cloud git workdirs列 workspace 里的 repo workdir(拿 <workdirId>)--workspace --json
cloud git commit <workdirId> -m <msg>提交已 staged 的改动-m/--message(必填)
cloud git branch <workdirId> --name <b>建并切到新分支--name(必填)
cloud git merge <workdirId> --source <ref>把 <ref> merge 进当前分支(冲突→escalate,绝不自动解决)--source(必填)
cloud git push <workdirId> --branch <b> | --tag <t>push HEAD 到分支,或 push tag(prod tag 被拒)--branch 或 --tag(二选一)· --remote(allowlist 纯名字,默认 origin)
cloud task meta set <task-id> --set-string k=v把 provenance 写进 task metadata--set-string(值恒字符串)
  • 退出码:成功 0;失败非零。--json 下 stdout 是结构化 {ok, op, sha?, ref?, cwd, ...}(成功)或 {ok:false, op, code, message, files}(失败)。
  • code:'conflict' 是冲突信号,files[] 是未合并文件清单——这是承重的 escalation payload。
  • 权限:cloud task meta set 走 metadata gate = creator / orchestrator / admin / owner,assignee 不在内。写 provenance 这一步必须以主 agent(orchestrator/creator)身份跑——coding agent 自写会被 403。

Procedure

1. 定位 workdir
bash
cloud git workdirs --workspace "$PRISMER_WORKSPACE_ID" --json

从返回里挑本 task 对应的 repo workdir id(下称 $WD)。

2. Stage 本 task 拥有的文件(自己做,commit 不代劳)
bash
# 在 workdir 的 repo cwd 里,只 stage 本 task 改的文件
git add path/to/file-a path/to/file-b
git status --short   # 确认只 stage 了 task-owned 文件
3. Commit
bash
cloud git commit "$WD" -m "feat(x): 一句话说清这次改动" --json

从 stdout 的 sha 字段取真 commit sha(下称 $SHA)。

4. Branch(可选,按 task 需要建 scoped 分支)
bash
cloud git branch "$WD" --name "feat/task-$PRISMER_TASK_ID" --json
5. Merge 回主线 —— 冲突是停手信号,不是重试信号
bash
cloud git merge "$WD" --source feat/task-xxx --json > /tmp/merge.json; M=$?
  • M == 0:merge 成功,取新 HEAD sha。
  • M != 0 且 code == "conflict":停手。读 files[]——那是未合并文件清单。不要 git merge --abort、不要 git reset、不要 -X ours/theirs、不要任何自动解决。把冲突文件清单原样交给人 escalate:
Merge conflict — NOT auto-resolved. Escalate to a human.
Conflicted files (<n>):
  <file-1>
  <file-2>

workdir 保持 daemon 留下的现场(.git/MERGE_HEAD 在、工作区有 <<<<<<< 标记),人可以直接进去看。冲突判据是 git 的副作用(未合并索引 / 进行中的 merge),不是错误文本——所以拼写错误的 ref 不会被误报成冲突。

6. Push(到 bare 替身;prod tag 会被拒)
bash
# 分支:
cloud git push "$WD" --branch feat/task-xxx --json
# tag(非 prod):
cloud git push "$WD" --tag k8s-test-20260724-v2.0.7 --json
  • prod 触发前缀的 tag(k8s-prod-* 等)→ 返回 code:'prod_tag' 非零退出。这是对的,别绕。
  • remote 只能是 allowlist 里的纯名字;默认 origin(本地 = bare 替身)。
7. 写 provenance 回 task(以主 agent 身份,用 --set-string)
bash
cloud task meta set "$PRISMER_TASK_ID" \
  --set-string git.branch=feat/task-xxx \
  --set-string git.sha="$SHA"

必须 --set-string:--set git.sha=1234567 会把全数字 sha 变成 number。

Show full SKILL.md (284 more words)Show less

输出契约(机器判据按这个回读,别自由发挥格式)

本 skill 的判据不是「报告里出现了 conflict 这个词」,而是判据拿只读 git plumbing 去真 object store 复核(structured-criteria.ts 的 git-claim-readback),provenance 则回读真 task 行(declared-id-readback)。所以报告必须带这些可机器解析的行:

GIT-REPO: .e2e-tmp/<name>/work
GIT-COMMIT: <full sha> | files: a.txt, b.txt
GIT-BRANCH: <branch> | head: <full sha>
GIT-PUSHED: <branch> | remote: origin
GIT-REFUSED-TAG: k8s-prod-<date>-v<x.y.z> | remote: origin
GIT-CONFLICT-REPO: .e2e-tmp/<name>/conflict
GIT-CONFLICT-FILES: c.txt
TASK: <task id>
META: git.sha = <full sha> | type: string
META: git.branch = <branch> | type: string

判据会判红的情况(任一):

  • GIT-REPO 不在 .e2e-tmp/ 沙箱里,或它解析到打分器自己的仓库根——共享工作树永远不许当演示仓库(判据硬拒,不看措辞);
  • GIT-COMMIT 的 sha 不是该仓库里的 commit 对象;
  • 该 commit 的文件集与 files: 声明不等,或包含 task 不拥有的文件——cloud git commit 从不自动 stage,混进来的文件就是你 stage 的;
  • GIT-BRANCH 不存在、tip 与 head: 不符、或不含那个 commit;
  • GIT-PUSHED 的 remote 不是本地 bare 替身(网络 remote 一律红),或替身上没有那个分支 / sha 不一致;
  • GIT-REFUSED-TAG 真的躺在替身上(那就不是被拒,是被推上去了),或那个 tag 根本不匹配 prod 触发前缀(拒一个无害 tag 证明不了任何事);
  • 冲突仓里没有 MERGE_HEAD——merge --abort / reset / -X ours 恰好删掉的就是这份证据,所以「我停手并 escalate 了」不再是可自述的;
  • GIT-CONFLICT-FILES 与 git diff --name-only --diff-filter=U 不等(漏报冲突文件也红);
  • META: 的值与服务端存的不一致,或存储类型不是 `string``(--set 数字化在这里被逮住)。

这些命令全是只读的(cat-file / show --name-only / rev-parse / ls-remote / diff --diff-filter=U / tag -l)——判据本身绝不写任何仓库。

TASK: / META: 那两行走的是 API 回读,凭据必须是真正跑命令的那个身份(APC_READBACK_TOKEN / DEV_JWT / PRISMER_API_KEY;换账号回读会 403 ⇒ 假红)。凭据缺失或 API 不可达一律判红——「验不了」不算过。

产出(副作用 oracle,报告里必须给)

  1. 真 commit sha / 真 branch ref:取自 cloud git commit/branch/merge 的 sha/ref 字段(--json),可在 workdir 里 git rev-parse / git branch 复核。
  2. 冲突态:code:'conflict' + files[] 非空 + workdir 现场保留(.git/MERGE_HEAD 在、工作区含冲突标记、HEAD 未移动)——不是聊天里说"有冲突"。
  3. prod tag 被拒:cloud git push --tag <prod-prefix> 非零退出 + code:'prod_tag'。
  4. provenance 落库:cloud task meta set --set-string 后 task metadata.git.sha 是字符串(读回确认,全数字 sha 也不被数字化)。

不许:merge 冲突后自动 abort/reset/-X;断言聊天文本而非 git 副作用;用 --set 写 sha;push 到非 allowlist remote 或用 --force;以 assignee 身份写 metadata(会 403)。

诚实边界

  • 判据核的是 git 的副作用,不是走了哪条通道:commit 是 cloud git commit 还是(无 workdir-bound daemon 时)scratch repo 里的 git commit 产生的,object store 里长得一样。所以判据不能证明「走了 cloud git」,只能证明「这些 git 事实真存在」。同理 GIT-REFUSED-TAG 证明的是拒绝的效果(tag 不在替身上),不是 daemon 侧那道闸真被触发。
  • 「push 不带 --force」判据核不到(remote 上看不出上一次 tip),仍是文本判据——不得声称已闭合。
  • cloud git 需要 workdir 绑定的 daemon 在线。daemon 不在 → daemon_offline/daemon_unbound,是环境故障域(apc/06),不是 git 失败,也不是本 skill 的 red。
  • commit 不 stage、jail 是词法+realpath(照抄 resolveWorkdirCwd 同款限制)——这些是平台约束,本 skill 不绕。
<!-- APC-ACK:v1 -->

调用回执(APC 平台方运营纪律 · 自动注入,勿手改)

执行本 skill 的第一步,先落一条调用回执:

bash
cloud skill ack git-ops --task "$PRISMER_TASK_ID"

按退出码分流(这条命令的退出码是承重信息,禁止用 || 兜底、; true、 set +e 或重定向把它抹掉):

exit含义你要做的
0回执已落库(im_task_logs.action='skill_ack')继续执行本 skill
3无 task 上下文——本次运行没有 task,产不出回执继续执行本 skill;但本次运行没有回执,任何报告里都不得声称已 ack
4你不是该 task 的 assignee,服务端拒绝停下并上报:回执只能由执行该 task 的 agent 产生
1其它失败(网络 / 服务端)重试一次;仍失败则继续执行,并在结果里显式标注「回执缺失」

回执只证明本 skill 被调度,不证明执行正确——效果证明由本 skill 自己的 acceptanceCriteria 副作用断言承担(apc/04 §2 层 1 诚实标注)。

<!-- /APC-ACK:v1 -->

© Prismer-AI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in sdk/apc/skills/git-ops of Prismer-AI/PrismerCloud.

  • SKILL.md
  • skill.json

Open the folder on GitHubat commit e5d9444

Compare with similar skills

Git Ops next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Ops compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Ops this skillPrismer-AI/PrismerCloud1.6k—~1.9kAutomated safety check: NotesMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from Prismer-AI/PrismerCloud

All 88 skills in this repo
  • Prismer Google Workspace

    Prismer-AI/PrismerCloud

    Gives an agent account-scoped access to Gmail, Calendar, Drive, Contacts, Docs and Sheets through the gws CLI or a bundled Python client.

    1.6k GitHub starsUsed in 3 repos~4.2k tokens
    Auto-check passed
  • Prismer Skill Creator

    Prismer-AI/PrismerCloud

    Walks an agent through creating, importing, editing, validating, testing and publishing Prismer Skills with a fixed workflow and bundled scripts.

    1.6k GitHub stars~2.6k tokensUpdated 7 days ago
    Auto-check: notes
  • Himalaya Email CLI

    Prismer-AI/PrismerCloud

    Operates a mailbox from the terminal with the external Himalaya CLI over IMAP, SMTP, Notmuch or Sendmail, separate from any built-in email gateway adapter.

    1.6k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Prismer Image Generation

    Prismer-AI/PrismerCloud

    Generates one image from a text prompt with a bundled Node.js helper and delivers it once as the attachment to the current Prismer reply.

    1.6k GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Manim Explainer Videos

    Prismer-AI/PrismerCloud

    Produces 3Blue1Brown-style explainer animations with Manim Community Edition for math, algorithms, equations and architecture diagrams, with planning and rendering references.

    1.6k GitHub starsUsed in 2 repos~3.1k tokens
    Auto-check passed
  • Prismer Role Builder

    Prismer-AI/PrismerCloud

    Creates or updates Prismer role templates from a persona, SOP or job description, and turns a role into a working agent that runs its first task through a bundled script.

    1.6k GitHub stars~2.3k tokensUpdated 7 days ago
    Auto-check: notes

Works with

Categories

Questions about Git Ops

What does Git Ops do?

Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving. Git Ops is an agent skill from Prismer-AI/PrismerCloud. Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving.

When should I use Git Ops?

Git Ops fits situations like: tasks that involve Git workflow.

How do I install Git Ops in Claude Code?

Run `npx skills add Prismer-AI/PrismerCloud --skill git-ops -a claude-code`. Or copy the skill folder (sdk/apc/skills/git-ops in Prismer-AI/PrismerCloud) into .claude/skills/git-ops in your project. Claude Code loads it when a task matches its description.

How do I install Git Ops in Codex?

Run `npx skills add Prismer-AI/PrismerCloud --skill git-ops -a codex`. Or copy the skill folder (sdk/apc/skills/git-ops in Prismer-AI/PrismerCloud) into .agents/skills/git-ops in your project. Codex loads it when a task matches its description.

Can I use Git Ops in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Prismer-AI/PrismerCloud --skill git-ops -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-ops, .gemini/skills/git-ops, .github/skills/git-ops and .opencode/skills/git-ops in your project.

What does Git Ops need to run?

Going by SKILL.md and its folder, Git Ops needs the command-line tools its instructions call (git) and credentials named APC_READBACK_TOKEN and PRISMER_API_KEY. Our summary lists: A credential in APC_READBACK_TOKEN; A credential in PRISMER_API_KEY. Its frontmatter pre-approves these tools: Bash. Compatibility (from SKILL.md): ["claude-code"].

Does Git Ops access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Ops safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Git Ops use?

Git Ops is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Ops use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Ops?

Skills that share tags, products or a category with Git Ops: Finishing a Development Branch (obra/superpowers, 296k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Ops?

Prismer-AI (a GitHub organization) maintains it in Prismer-AI/PrismerCloud, which has 1,554 GitHub stars. The repository holds 88 skills in this directory. The repository was last updated on September 30, 2026.

Source: Prismer-AI/PrismerCloud on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.