mcp-git-commit-generator AGENTS.md

An AGENTS.md instruction file for an MCP server that generates Git commit messages. It documents how to run tests and the server, and records implementation rules for Git commands, paths, diff previews, and the Inspector interface.

In plain words
What is it for?
Use it when developing or testing the commit-message MCP server, running its SSE service and Inspector UI, resolving paths, generating commit messages from diffs, or checking changes with pytest.
Why use it?
It gives the coding agent the repository-specific commands and constraints needed to make safe changes and avoid common setup errors, such as running Git commands in the wrong directory.

Instructions file for CodexOpenCode

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/theoklitosbam7/mcp-git-commit-generator/agents-md
Clone the repo
git clone --depth 1 https://github.com/theoklitosBam7/mcp-git-commit-generator

Made for: Codex, OpenCode.

Per session 410 This file is loaded in full into every session.
When invoked 410 The same file — it is already loaded in full.
Security scan A 1 finding. 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.00410 $0.00410
Opus 5 $0.00205 $0.00205
Sonnet 5 $0.00082 $0.00082
Haiku 4.5 $0.00041 $0.00041

Measured 3d ago against content hash 44e675c075b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-git-commit-generator AGENTS.md scanned grade A with 1 finding 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 3d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Git commands MUST use `cwd=cwd` parameter in subprocess.run() to target the correct repository
AGENTS.md · 27 lines

What it actually says

AGENTS.md

This file provides guidance to agents when working with code in this repository.

Build/Test Commands

  • uv run pytest - Run all tests (uses pytest with pythonpath=src)
  • uv run pytest tests/test_server.py - Run specific test file
  • uv run pytest -v - Run tests with verbose output
  • uv run pytest --cov=src/mcp_git_commit_generator - Run tests with coverage
  • uv sync --group dev - Install dependencies with dev tools
  • uv run mcp-git-commit-generator --transport sse - Run server with SSE transport (required for Inspector UI)
  • cd inspector && npm install && npm run dev:inspector - Start Inspector UI (requires SSE server running on port 3001)

Critical Implementation Details

  • Git commands MUST use cwd=cwd parameter in subprocess.run() to target the correct repository
  • Path resolution uses os.path.realpath(os.path.expanduser()) to handle tilde and symlinks
  • Diff preview is truncated to 1500 characters in generate_commit_message for analysis
  • Inspector UI requires SSE transport (stdio won't work) - server runs on port 3001, inspector on port 5173
  • pytest config has pythonpath = ["src"] - critical for imports to work in tests
  • Build backend is uv_build (not standard setuptools) - requires uv for building
  • Tests need git config setup in CI: git config --global user.email "[email protected]" && git config --global user.name "CI Runner"
  • Server uses FastMCP framework from mcp.server.fastmcp - tools decorated with @mcp.tool()
  • LOG_LEVEL env var overrides logging (DEBUG/INFO/WARNING/ERROR/CRITICAL)
  • Two MCP tools: generate_commit_message (analyzes staged changes) and check_git_status (reports repo state)
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. 3d ago First seen · 27 lines · 410 tokens per session scan A 44e675c075b9

Subscribe to this mod's changes

mcp-git-commit-generator AGENTS.md is an instructions file published in the GitHub repository theoklitosBam7/mcp-git-commit-generator (8 stars, last pushed 7mo ago), licensed MIT. It adds 410 tokens to every session, about $0.0020 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.