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.svg" alt="Measured on agentmods" 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 | $0.00809 | $0.00809 |
| Sonnet 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 8d 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.
- 8d 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 (54 stars, last pushed today), licensed MIT. It adds 1,619 tokens to every session, about $0.0081 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 instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.