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.
npx agentmods add instructions/surajfale/git-mcp-server/copilot-instructionsgit clone --depth 1 https://github.com/surajfale/git-mcp-serverWhat 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 | $0.01125 | $0.01125 |
| Opus 5 | $0.00562 | $0.00562 |
| Sonnet 5 | $0.00225 | $0.00225 |
| Haiku 4.5 | $0.00112 | $0.00112 |
Grade A, and why
git-mcp-server copilot-instructions.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.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copilot / AI agent instructions — git-commit-mcp-server
Overview
- This project is an MCP server that automates conventional Git commits. The runtime entry points live in
src/git_commit_mcp/server.pyandsrc/git_commit_mcp/__main__.py. - High-level components:
server.py: MCP tool definitions and orchestration (uses FastMCP). Key functions:git_commit_and_pushandgenerate_commit_message.change_tracker.py: Detects added/modified/deleted/renamed files with GitPython.message_generator.py: Heuristics-based Conventional Commit generator (types, scope, bullets). Look atTYPE_PATTERNSandCOMMIT_TYPE_PRIORITYfor rules.ai_client.py: Thin OpenAI wrapper; readsOPENAI_API_KEYfrom the environment and supportsai_base_urlfor OpenAI-compatible endpoints.git_operations.py: Stages, commits, and pushes using GitPython; follow its error handling for expected failure modes.changelog_manager.py: Writes aCHANGELOG.mdentry before the commit (placeholder hash) then replaces it after commit (amend flow).
Important conventions & behaviors (do not change without updating callers)
- Configuration is read from environment variables via
ServerConfig.from_env()(seesrc/git_commit_mcp/config.py). Examples:ENABLE_AI,OPENAI_API_KEY,AI_PROVIDER,AI_MODEL,WORKSPACE_DIR,FORCE_SSH_ONLY. - AI usage:
- If
ENABLE_AI=truethe code will instantiateAIClientwhich requiresOPENAI_API_KEYin the process environment. If the key is missing, AI calls raise a clear error and the code falls back to the heuristic generator. - To test AI locally, export
$env:OPENAI_API_KEY = "sk-..."in PowerShell before launching the server/process.
- If
- Remote repo handling: remote URLs must use SSH by default when
FORCE_SSH_ONLYis true. When working with remote repos,RepositoryManagerclones intoWORKSPACE_DIR. - Changelog update flow: the server writes a placeholder entry, stages CHANGELOG.md, creates the commit, replaces the placeholder with the real hash, then amends the commit to include the updated CHANGELOG. Changelog errors are non-fatal; commits still succeed.
Developer workflows (commands you can run)
- Run tests:
pytest(project uses standard pytest tests undertests/). - Run the server locally (stdio MCP transport):
- Development:
uv run python -m git_commit_mcp.server(orpython -m git_commit_mcp.__main__) - Production (uvx):
uvx git-commit-mcp-server
- Development:
- Quick environment setup (PowerShell):
# temporary for current shell $env:OPENAI_API_KEY = 'sk-REPLACE' # run server in same shell so it inherits env uvx git-commit-mcp-server
Patterns & heuristics to preserve
- Commit type detection: see
CommitMessageGenerator._detect_commit_type— it usesTYPE_PATTERNS, file extension and path heuristics, and counts to prioritize types. When adding new file categories, updateTYPE_PATTERNSand unit tests. - Scope extraction: the scope is inferred from first-level directories but skips common prefixes like
src/orlib/. Keep this behaviour if you change message structure. - Message generation fallback: AI is preferred but any AI failure must gracefully fall back to
CommitMessageGenerator.
Integration points & dependencies
- FastMCP: MCP server framework; tools are declared with
@mcp.tool()inserver.py. - GitPython: used across change detection and Git operations. Use
Repoobjects passed around — do not re-instantiate unexpectedly. - OpenAI SDK: optional; code expects the
openaipackage and environment key. The config supportsai_base_urlfor alternate endpoints.
Where to look for examples and tests
- End-to-end behavior:
tests/test_integration.py. - Message logic:
tests/test_message_generator.pyandsrc/git_commit_mcp/message_generator.py. - Change detection:
tests/test_change_tracker.pyandsrc/git_commit_mcp/change_tracker.py.
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.
- yesterday First seen · 64 lines · 1,125 tokens per session scan A 4cb6bf784997
git-mcp-server copilot-instructions.md is an instructions file published in the GitHub repository surajfale/git-mcp-server (2 stars, last pushed 9mo ago), licensed MIT. It adds 1,125 tokens to every session, about $0.0056 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-31.
Other instructions, from other repositories
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.
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).
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).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.