CodeGPT CLAUDE.md

Repository instructions for CodeGPT, a Go command-line tool that creates Git commit messages and code reviews with AI services.

In plain words
What is it for?
Use them when changing CodeGPT, running its tests or linters, building the binary, or installing it globally.
Why use it?
They document how to build, install, test, format, and lint the project, helping contributors follow its required development checks.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/appleboy/codegpt/claude-md
Clone the repo
git clone --depth 1 https://github.com/appleboy/CodeGPT
Per session 1,261 This file is loaded in full into every session.
When invoked 1,261 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01261 $0.01261
Opus 5 $0.00630 $0.00630
Sonnet 5 $0.00252 $0.00252
Haiku 4.5 $0.00126 $0.00126

Measured yesterday against content hash fab53c4405b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

CodeGPT 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 yesterday.

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 · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

CodeGPT is a CLI tool written in Go that generates git commit messages and code reviews using AI. It supports multiple AI providers (OpenAI, Azure OpenAI, Gemini, Anthropic, Ollama, Groq, OpenRouter) and integrates with git prepare-commit-msg hooks.

Build and Development Commands

# Build the binary
make build              # outputs to bin/codegpt

# Install globally
make install

# Run all tests with coverage
make test               # or: go test -v -cover -coverprofile coverage.txt ./...

# Run a single test
go test -v -run TestName ./path/to/package

# Format go files (auto-installs golangci-lint if missing)
make fmt

# Lint (auto-installs golangci-lint v2 if missing)
make lint

Development Guidelines

IMPORTANT: When making changes to this codebase, you MUST:

  1. Write Tests - Always write corresponding tests for any new functionality or bug fixes
  2. Pass Linting - All code must pass make lint validation before submission
  3. Format Code - Always run make fmt to ensure consistent coding style

Architecture

Core Design Pattern

CodeGPT uses a provider pattern where all AI services implement the core.Generative interface:

type Generative interface {
    Completion(ctx context.Context, content string) (*Response, error)
    GetSummaryPrefix(ctx context.Context, content string) (*Response, error)
}

This allows adding new AI providers without changing core logic.

Package Structure

  • cmd/ - CLI commands using Cobra

    • cmd.go - Root command setup with Viper config initialization (supports env vars with CI platform prefixes like GITHUB_ and DRONE_)
    • commit.go - Generate commit messages (codegpt commit)
    • review.go - Generate code reviews (codegpt review)
    • hook.go - Git hook management (codegpt hook install/uninstall)
    • provider.go - Factory functions for instantiating AI providers (NewOpenAI, NewGemini, NewAnthropic)
    • config.go, config_set.go, config_list.go - Configuration management

Read the full file on GitHub · 130 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. yesterday First seen · 130 lines · 1,261 tokens per session scan A fab53c4405b9

Subscribe to this mod's changes

CodeGPT CLAUDE.md is an instructions file published in the GitHub repository appleboy/CodeGPT (1,503 stars, last pushed 2d ago), licensed MIT. It adds 1,261 tokens to every session, about $0.0063 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.

Related

Other instructions, from other repositories

openai-cookbook AGENTS.md

Instructions for openai/openai-cookbook, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.

openai/openai-cookbook · 1,165 tokens

all-api-hub AGENTS.md

AGENTS.md instructions for qixing-jk/all-api-hub, covering repository guidelines, agent skills, issue tracker, triage labels and domain docs.

qixing-jk/all-api-hub · 7,103 tokens

NeuroAPI AGENTS.md

Instructions for neurogen-dev/NeuroAPI, a project described as: NeuroAPI: российский AI API для Codex CLI и Claude Code — безопасные one-click установщики для Windows и macOS.

neurogen-dev/NeuroAPI · 148 tokens

glowbom-oss AGENTS.md

Instructions for glowbom/glowbom-oss, covering workspace instructions, public repository boundary and commit messages.

glowbom/glowbom-oss · 151 tokens

all-api-hub CLAUDE.md

Claude Code instructions for qixing-jk/all-api-hub, a project described as: All-in-one New-API/Sub2API account hub: balance/usage dashboard, auto check-in, one-click keys, price comparison, health checks, plus advanced channel management | 一站式 New-API/Sub2API 等中转站账号管理:余额/用量看板、自动签到、密钥一键使用、价格对比、可用性测试,另提供高级渠道管理.

qixing-jk/all-api-hub · 4 tokens

azure-search-openai-demo AGENTS.md

Instructions for Azure-Samples/azure-search-openai-demo, covering instructions for coding agents, overall code layout, adding new data, adding a new azd environment variable and adding a new setting to "developer settings" in rag app.

Azure-Samples/azure-search-openai-demo · 5,202 tokens