git_mcp_server: Instructions file for Codex

AGENTS.md

git_mcp_server AGENTS.md is an instructions file for Codex, OpenCode from redgreat/git_mcp_server. It costs 1,253 tokens per session, scanned A, original, MIT.

Repository instructions for an AI coding assistant working on a Git management server. The project includes a Python web backend, a Svelte administration interface, and a PostgreSQL database.

In plain words
What is it for?
Use it when developing the Git repository management service, its login and administration features, frontend pages, database code, Docker setup, or Git operations.
Why use it?
It records the project's technologies, directory structure, setup commands, and development rules so changes are made in the right part of the system.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

This is redgreat/git_mcp_server's own configuration. It tells Codex and OpenCode how to work on git_mcp_server 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 git_mcp_server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to redgreat/git_mcp_server. 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/redgreat/git_mcp_server/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/redgreat/git_mcp_server

Made for: Codex, OpenCode.

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 git_mcp_server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/redgreat/git_mcp_server/agents-md/github.svg)](https://agentmods.dev/instructions/redgreat/git_mcp_server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/redgreat/git_mcp_server/agents-md"><img src="https://agentmods.dev/badge/instructions/redgreat/git_mcp_server/agents-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 git_mcp_server AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/redgreat/git_mcp_server/agents-md"><img src="https://agentmods.dev/badge/instructions/redgreat/git_mcp_server/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,253 This file is loaded in full into every session.
When invoked 1,253 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.01253 $0.01253
Opus 5.5 $0.00501 $0.00501
Sonnet 5.5 $0.00251 $0.00251
Haiku 4.5 $0.00125 $0.00125

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

Security

Grade A, and why

git_mcp_server AGENTS.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.

AGENTS.md · 76 lines

How it starts

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

AGENTS.md — AI 辅助开发规则

本文件为 AI 编码助手(Claude Code / Codex / Cursor / Copilot 等)提供在本仓库中工作的行为准则。详细版见 docs/ai-coding-rules.md。

项目概览

Git MCP Server:基于 MCP (Model Context Protocol) 的 Git 仓库管理服务。

  • 后端:Python 3.11 + FastAPI + SQLAlchemy(原生 Table/MetaData 风格,无 ORM Model 类)+ JWT + bcrypt
  • 前端:Svelte 5(runes 语法)+ Tailwind CSS v4 + daisyUI 5 + Vite(adapter-static,SPA)
  • 数据库:PostgreSQL 16
  • 部署:Docker Compose

常用命令

make test          # 运行全部后端测试(test/run_all.py)
make build         # 构建前端(cd frontend && npm install && npm run build)
make dev           # 构建前端并启动后端服务
make setup         # 初始化(复制 config.yml + 安装依赖)
make docker-up     # Docker 生产环境启动

后端启动:python -m src.server;前端开发服务器:cd frontend && npm run dev(端口 5174)。

目录结构

config/          # 配置文件(config.yml / config.yml.example)
docker/          # Docker 相关(含 docker-compose-local.yml)
frontend/src/    # Svelte 5 管理后台
  routes/        #   页面路由(+layout.svelte 为鉴权布局,login/ 为独立登录页)
script/          # 工具脚本(dockerrebuid.ps1、start.sh)
src/
  admin/         # 管理后台 API(web.py 路由、auth.py 认证、models.py 建表)
  ai/            # 大模型集成(LLM 分析/审查)
  gitops/        # Git 操作封装(repo_manager、git_operations)
  mcp/           # MCP 协议处理(tools.py、permissions.py、server.py)
  security/      # 安全(secret.py 加密、ip_whitelist.py、client_ip.py)
  services/      # 外部服务
  server.py      # FastAPI 入口(挂载 /admin 静态资源与 API 路由)
  config.py      # 配置加载(pydantic + yaml)
test/            # 后端测试(run_all.py 汇总)

关键架构约定

  1. 路由挂载:/api/* 为后端 API(src/admin/web.py 的 build_admin_router);/admin/* 为前端 SPA(server.py 中 StaticFiles + 回退 index.html)。前端构建产物输出到 src/static/。
  2. 认证:Authorization header 直接传 JWT 裸 token(无 Bearer 前缀),后端 verify_token 解析。token 存 localStorage。
  3. 鉴权布局:frontend/src/routes/+layout.svelte 检查 token。登录页 /admin/login 必须跳过布局拦截(通过 $page.url.pathname 判断 isLoginPage),否则登录表单永远无法显示。
  4. 凭据加密:Git 密码/Token、LLM API Key 用 src/security/secret.py 的 encrypt_text/decrypt_text(master_key 派生加密)存储,禁止明文入库。
  5. 权限模型:Access Key → 仓库 → 分支正则 + 路径正则三级权限,见 src/mcp/permissions.py。
  6. 数据库:src/admin/models.py 的 ensure_schema() 启动时建表;操作使用 SQLAlchemy Table + insert/select/update/delete 表达式,不用 ORM Model 类。

Read the full file on GitHub · 76 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 · 76 lines · 1,253 tokens per session scan A 1bfcc8d9fd25

Subscribe to this mod's changes

git_mcp_server AGENTS.md is an instructions file published in the GitHub repository redgreat/git_mcp_server (0 stars, last pushed yesterday), licensed MIT. It adds 1,253 tokens to every session, about $0.0050 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-31.

Related

git_mcp_server AGENTS.md compared with instructions from other repositories

git_mcp_server AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git_mcp_server AGENTS.mdredgreat/git_mcp_serverInstructions file0yesterdayMITA1,253Codex, OpenCode
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