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.
npx agentmods add commands/qinye6/pi-ccg/rollbackgit clone --depth 1 https://github.com/qinye6/pi-ccgWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00022 | $0.00769 |
| Opus 5 | $0.00011 | $0.00385 |
| Sonnet 5 | $0.00004 | $0.00154 |
| Haiku 4.5 | $0.00002 | $0.00077 |
Grade A, and why
rollback 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.
This is a copy
100% identical to rollback — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
Rollback - 交互式 Git 回滚
安全地将分支回滚到指定历史版本,默认 dry-run 模式。
使用方法
/rollback [options]
选项
| 选项 | 说明 |
|---|---|
--branch <branch> |
要回滚的分支 |
--target <rev> |
目标版本(commit/tag/reflog) |
--mode reset|revert |
回滚模式 |
--depth <n> |
列出最近 n 个版本(默认 20) |
--dry-run |
只预览,不执行(默认) |
--yes |
跳过确认直接执行 |
执行工作流
🔍 阶段 1:同步远端
[模式:准备]
git fetch --all --prune
📋 阶段 2:选择分支
[模式:选择]
- 列出本地 + 远端分支
- 过滤受保护分支
- 用户选择或使用
--branch参数
📜 阶段 3:选择版本
[模式:选择]
- 显示最近 N 个版本(
git log --oneline) - 显示相关 tags(
git tag --merged) - 用户选择或使用
--target参数
⚙️ 阶段 4:选择模式
[模式:决策]
| 模式 | 说明 | 推送方式 |
|---|---|---|
reset |
硬回滚,改变历史 | --force-with-lease |
revert |
生成反向提交,保留历史 | 普通 push |
⛔ 阶段 5:最终确认
[模式:确认]
显示即将执行的命令,等待用户确认(除非 --yes)。
✅ 阶段 6:执行回滚
[模式:执行]
reset 模式:
git switch <branch>
git reset --hard <target>
revert 模式:
git switch <branch>
git revert --no-edit <target>..HEAD
安全护栏
- 备份:执行前自动记录当前 HEAD 到 reflog
- 保护分支:
main/master/production需额外确认 - dry-run 默认:防止误操作
- 禁止 --force:如需强推,手动执行
示例
# 全交互模式(dry-run)
/rollback
# 指定分支
/rollback --branch dev
# 完整指定,一键执行
/rollback --branch main --target v1.2.0 --mode reset --yes
# 生成反向提交
/rollback --branch release/v2.1 --target v2.0.5 --mode revert
注意事项
- reset vs revert:reset 改变历史,需强推;revert 更安全
- LFS/子模块:回滚前确保状态一致
- CI 触发:回滚后可能自动触发流水线
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.
- 3d ago First seen · 117 lines · 22 tokens per session scan A 26734c16106e
rollback is a command published in the GitHub repository qinye6/pi-ccg (10 stars, last pushed 9d ago), licensed MIT. It adds 22 tokens to every session and 769 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to rollback, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
commit-all
Group all changes semantically and commit each group separately.
commit
Create a local git commit for source skills without pushing.
commit-claude-config
Version the Solana AI Kit config in git (un-ignores .claude/, CLAUDE.md, .mcp.json, .gitmodules and commits them).
commit
智能生成 Git 提交信息并提交.
commit
Create a Conventional Commit with signoff.
session-report
Capture what changed this session and why, scoped to the current branch. Read by ship verbs when synthesizing the commit message; deleted after a successful commit.