Borrowing it
Nothing to install: this file belongs to zdt1013/ai-git-commiter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zdt1013/ai-git-commiter/main/CLAUDE.mdgit clone --depth 1 https://github.com/zdt1013/ai-git-commiterWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/zdt1013/ai-git-commiter/claude-md)<a href="https://agentmods.dev/instructions/zdt1013/ai-git-commiter/claude-md"><img src="https://agentmods.dev/badge/instructions/zdt1013/ai-git-commiter/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/zdt1013/ai-git-commiter/claude-md"><img src="https://agentmods.dev/badge/instructions/zdt1013/ai-git-commiter/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01619 | $0.01619 |
| Opus 5.5 | $0.00648 | $0.00648 |
| Sonnet 5.5 | $0.00324 | $0.00324 |
| Haiku 4.5 | $0.00162 | $0.00162 |
Grade A, and why
ai-git-commiter CLAUDE.md 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 2mo 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Git Commiter
VSCode 插件,使用 AI 大模型根据 git diff 自动生成规范的 Commit 消息。
项目结构
src/
├── extension.ts # 插件入口(activate/deactivate)
├── config.ts # 配置服务(单例,监听 VSCode 设置变更)
├── constants.ts # 所有常量定义
├── git.ts # Git 操作封装(diff、仓库识别、变更统计)
├── ai/
│ ├── ai-service.interface.ts # AI 服务接口定义
│ ├── ai-service.factory.ts # AI 服务工厂(按 provider 分发)
│ ├── openai.ts # OpenAI 及兼容服务商
│ ├── gemini.ts # Google Gemini
│ ├── anthropic.ts # Anthropic 及兼容服务商(智谱等)
│ └── prompt.service.ts # 提示词模板管理(CRUD、远程下载、XML 解析)
├── commands/
│ ├── command.registry.ts # 命令注册中心
│ ├── commit.command.ts # 核心:生成 commit 消息
│ ├── switch-model.command.ts # 切换 AI 模型
│ ├── open-settings.command.ts # 打开设置页
│ └── prompt/
│ ├── base-prompt.command.ts # 提示词命令基类
│ ├── add-prompt.command.ts # 添加模板
│ ├── edit-prompt.command.ts # 编辑模板(XML 文件编辑)
│ ├── delete-prompt.command.ts # 删除模板
│ ├── select-prompt.command.ts # 选择使用模板
│ ├── download-prompt.command.ts # 下载远程模板
│ └── manual-polish.command.ts # 手动润色
├── types/
│ ├── config.ts, model.ts, prompt.ts, types.ts # 类型定义
│ └── git.d.ts # VSCode Git API 类型声明
└── utils/
├── logger.ts # 输出频道日志
└── text-utils.ts # 文本处理(base64 过滤、代码块清理)
技术栈
- TypeScript + VSCode Extension API
- 构建:Vite(输出 CJS,target node20)
- 依赖:openai、@google/genai、@anthropic-ai/sdk、simple-git、xml2js、axios
- 引擎要求:VSCode >= 1.75,Node >= 20
常用命令
# 安装依赖
npm install
# 类型检查
npx tsc --noEmit
# 开发构建
npx vite build --mode development
# 生产构建
npx vite build --mode production
# 打包 VSIX(需要 vsce)
npx vite build --mode production && npx vsce package --no-dependencies
架构要点
AI 服务层
IAIService接口定义了generateCommitMessage和polishCommitMessage,均返回AsyncGenerator<string>(流式输出)- 三个实现类(OpenAI/Gemini/Anthropic)都是单例,通过
AIServiceFactory获取 - 配置变更时通过
AIServiceFactory.resetInstance()重置
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.
- 2mo ago First seen · 118 lines · 1,619 tokens per session scan A cb4e3e4bf5d9
ai-git-commiter CLAUDE.md is an instructions file published in the GitHub repository zdt1013/ai-git-commiter (56 stars, last pushed 2mo ago), licensed MIT. It adds 1,619 tokens to every session, about $0.0065 per session on Opus 5.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.
ai-git-commiter CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ai-git-commiter CLAUDE.mdzdt1013/ai-git-commiter | Instructions file | 56 | 2mo ago | MIT | A | 1,619 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |