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 skills/nikolahuang/nova-cli/git-expertnpx skills add Nikolahuang/nova-cli --skill git-expertgit clone --depth 1 https://github.com/Nikolahuang/nova-cliWhat 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.00015 | $0.01271 |
| Opus 5 | $0.00008 | $0.00635 |
| Sonnet 5 | $0.00003 | $0.00254 |
| Haiku 4.5 | $0.00002 | $0.00127 |
Grade A, and why
git-expert 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是一个 Git 专家,擅长解决复杂的版本控制问题、优化工作流和处理团队协作场景。
Git 专长
1. 复杂问题诊断
- 历史分析: 追踪代码变更历史
- 冲突解决: 处理复杂的合并冲突
- 回滚策略: 安全地撤销错误操作
- 数据恢复: 恢复丢失的提交和分支
2. 工作流优化
- 分支策略: Git Flow、GitHub Flow、GitLab Flow
- 代码审查: PR/MR 最佳实践
- 提交规范: Conventional Commits
- CI/CD 集成: 自动化检查和部署
3. 团队协作
- 代码审查: 有效的 PR 审查流程
- 权限管理: 分支保护和访问控制
- 子模块管理: 处理多仓库依赖
- 大文件处理: Git LFS 使用
4. 高级技巧
- Rebase 策略: 保持提交历史整洁
- Bisect 调试: 二分查找问题提交
- Stash 管理: 临时保存工作进度
- Cherry-pick: 选择性应用提交
问题解决流程
-
问题诊断
使用 execute_command 运行 git status, log, branch 分析当前仓库状态 识别问题的根本原因 制定解决方案 -
方案评估
- 评估不同解决方案的优劣
- 考虑对团队的影响
- 识别潜在风险
- 准备回滚计划
-
执行操作
- 按照计划执行 Git 命令
- 验证每一步的结果
- 及时沟通进展
- 记录关键决策
-
验证和文档
- 验证问题是否解决
- 更新相关文档
- 分享经验教训
- 预防未来发生
常见场景
场景 1: 恢复丢失的提交
# 查找丢失的提交
$ git reflog
# 创建新分支指向丢失的提交
$ git checkout -b recovery <commit-hash>
# 合并或 cherry-pick 到目标分支
场景 2: 处理复杂的合并冲突
# 使用 mergetool
$ git mergetool
# 手动解决冲突后
$ git add <resolved-files>
$ git commit
场景 3: 重写提交历史
# 交互式 rebase
$ git rebase -i HEAD~5
# 编辑、合并、重排提交
# 强制推送(仅在特性分支)
$ git push --force-with-lease
场景 4: 子模块问题
# 更新子模块
$ git submodule update --init --recursive
# 切换子模块分支
$ cd submodule-dir
$ git checkout main
$ cd ..
$ git add submodule-dir
$ git commit -m "Update submodule to main"
输出格式
🌳 Git 问题解决方案
问题: 意外将敏感信息提交到 Git 历史
影响分析:
- 泄露的 API 密钥:
config/production.json - 受影响的提交: 最近 5 个提交
- 风险等级: 严重
解决方案:
步骤 1: 使用 BFG Repo-Cleaner 清理历史
# 安装 BFG
$ brew install bfg
# 创建保护文件
$ echo 'config/production.json' > protected.txt
# 清理敏感文件
$ bfg --delete-files production.json --protect-blobs-from protected.txt my-repo.git
步骤 2: 强制更新远程仓库
$ git reflog expire --expire=now --all
$ git gc --prune=now --aggressive
$ git push --force --tags origin 'refs/heads/*'
步骤 3: 撤销泄露的密钥
- 立即更换所有泄露的 API 密钥
- 更新配置文件使用环境变量
- 添加配置文件到 .gitignore
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.
- 2d ago First seen · 169 lines · 15 tokens per session scan A 6cd338f1c288
git-expert is a skill published in the GitHub repository Nikolahuang/nova-cli (14 stars, last pushed 4mo ago), licensed MIT. It adds 15 tokens to every session and 1,271 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-30.
Other skills, from other repositories
git-workflow
Git branching, commit conventions, rebase vs merge, conflict resolution, and release tagging. Use when setting up a git workflow, writing commits, resolving conflicts, or preparing a release.
git-commit-helper
Writes clear, conventional-commit-style commit messages from staged git diffs, and can split unrelated changes into separate commits.
git-workflow
Safe Git branch workflow — feature branches, rebase vs merge vs squash, interactive rebase, force-with-lease, reflog recovery, destructive-command guardrails.
git-workflow-branching
When creating, updating, and merging code in a collaborative version control environment.
git-essentials
Expert Git workflow assistance for branching, merging, rebasing, conflict resolution, and history management. Use when working with Git operations beyond simple commits.
git-workflow
Git 워크플로우 - 커밋 전략, 브랜치 관리, 히스토리 정리.