ai-git-commiter: Instructions file for Claude Code

CLAUDE.md

ai-git-commiter CLAUDE.md is an instructions file for Claude Code from zdt1013/ai-git-commiter. It costs 1,619 tokens per session, scanned A, original, MIT.

A guide to a VS Code extension that uses AI models to create Git commit messages from the changes in a repository. It describes its Git integration, supported AI providers, model switching, and editable prompt templates.

In plain words
What is it for?
Use it when developing the extension, changing commit-message generation, adding AI providers, or editing commands for prompt templates and model settings.
Why use it?
It gives an agent the structure and commands needed to change the extension without breaking its provider selection, settings, or prompt management.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is zdt1013/ai-git-commiter's own configuration. It tells Claude Code how to work on ai-git-commiter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-git-commiter configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/zdt1013/ai-git-commiter/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/zdt1013/ai-git-commiter

Made for: Claude Code.

Wrote 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.

agentmods badge for ai-git-commiter CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zdt1013/ai-git-commiter/claude-md/github.svg)](https://agentmods.dev/instructions/zdt1013/ai-git-commiter/claude-md)
Your own site
<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.

agentmods 80×15 button for ai-git-commiter CLAUDE.md

Your own site · 80×15
<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>
Per session 1,619 This file is loaded in full into every session.
When invoked 1,619 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.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

Measured 2mo ago against content hash cb4e3e4bf5d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

CLAUDE.md · 118 lines

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() 重置

Read the full file on GitHub · 118 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. 2mo ago First seen · 118 lines · 1,619 tokens per session scan A cb4e3e4bf5d9

Subscribe to this mod's changes

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.

Related

ai-git-commiter CLAUDE.md compared with instructions from other repositories

ai-git-commiter CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ai-git-commiter CLAUDE.mdzdt1013/ai-git-commiterInstructions file562mo agoMITA1,619Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode