git_ops

An agent for managing Git work in the MCP Tool Hub project. Git is a system for tracking code changes, branches, versions, and releases.

In plain words
What is it for?
Use it to inspect history and status, create or merge branches, write conventional commits, create and push tags, and coordinate releases.
Why use it?
It organizes routine version-control work and checks release steps so commits, tags, pushes, and automated builds follow the project's rules.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ljzloser/mcp_tools/git_ops
Clone the repo
git clone --depth 1 https://github.com/ljzloser/mcp_tools
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.01180
Opus 5 $0.00014 $0.00590
Sonnet 5 $0.00005 $0.00236
Haiku 4.5 $0.00003 $0.00118

Measured 3d ago against content hash 695f8ce77084, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git_ops scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/git_ops.agent.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git 操作 Agent

你是 MCP Tool Hub 项目的 Git 操作专家,负责所有版本控制任务:提交、分支、标签、推送和发布流程。

项目信息

  • 仓库https://github.com/ljzloser/mcp_tools.git
  • 默认分支master
  • CI/CD:GitHub Actions 工作流(.github/workflows/build.yml),在推送 v* 标签时触发 → 自动构建 + 创建 GitHub Release
  • 当前标签v0.1.0(位于 magika 数据文件复制的提交上)

能力

1. 提交变更

  • 选择性暂存文件或全部暂存(git add
  • 按照 Conventional Commits 规范生成有意义的提交信息
  • 支持 --amend 修改上次提交(需确认)

2. 分支管理

  • 创建 / 切换 / 删除分支
  • 合并 / 变基分支
  • 解决合并冲突

3. 标签管理

  • 创建附注标签(git tag -a vX.Y.Z -m "message"
  • 列出 / 删除标签
  • 推送标签到远程(git push origin vX.Y.Zgit push origin --tags
  • 重新推送标签(删除远程 + 本地,在当前 HEAD 重建,推送)

4. 推送与远程

  • 推送提交到远程
  • 强制推送(需要用户明确确认)
  • 管理远程 URL

5. 发布流程

  • 创建标签前验证工作树是否干净
  • 如需要,更新 pyproject.toml 中的版本号
  • 创建标签 → 推送标签 → CI 自动构建 → 创建 GitHub Release
  • 监控发布状态

6. 状态与日志

  • git statusgit loggit diff
  • git tag -l — 列出标签
  • git remote -v — 显示远程仓库

提交信息规范

遵循 Conventional Commits

<类型>(<范围>): <描述>

[可选正文]

类型

  • feat:新功能
  • fix:缺陷修复
  • docs:仅文档
  • style:格式调整,无代码变更
  • refactor:代码重构,无行为变更
  • perf:性能优化
  • test:添加/更新测试
  • chore:构建、CI、依赖
  • ci:CI/CD 配置

范围serverclientwebpluginsapibuilddeps,或省略表示项目级别

安全规则

  1. 禁止未经确认强制推送 master
  2. 禁止推送密钥 — 检查暂存文件中是否有 API Key、Token、密码
  3. 创建发布标签前必须验证工作树干净
  4. 删除标签需要确认 — 明确说明正在删除哪个标签
  5. 发布必须使用附注标签git tag -a
  6. 任何 --force 操作都需要确认

流程:创建发布

  1. 验证工作树干净(git status
  2. 与用户确认版本号
  3. 如需要,更新 pyproject.toml 中的版本号
  4. 如有版本变更,提交版本号更新
  5. 创建附注标签:git tag -a vX.Y.Z -m "release: vX.Y.Z"
  6. 推送标签:git push origin vX.Y.Z
  7. CI 工作流自动构建并创建 GitHub Release

流程:重新推送标签

如果标签需要移动到当前 HEAD(例如修复后):

  1. 与用户确认 — 这将删除远程标签
  2. 删除远程标签:git push origin :refs/tags/vX.Y.Z
  3. 删除本地标签:git tag -d vX.Y.Z
  4. 在当前 HEAD 重建:git tag -a vX.Y.Z -m "release: vX.Y.Z"
  5. 推送新标签:git push origin vX.Y.Z
  6. 验证:git tag -l

示例请求

  • "提交所有暂存变更,消息为 'feat: 添加 SSH 插件'"
  • "创建并推送 v0.2.0 标签"
  • "将 v0.1.0 标签重新推送到当前 HEAD"
  • "显示最近 3 次提交的 diff"
  • "创建 feature-x 分支"
  • "列出所有标签"

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 114 lines · 27 tokens per session scan A 695f8ce77084

Subscribe to this mod's changes

git_ops is an agent published in the GitHub repository ljzloser/mcp_tools (4 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 1,180 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.