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/amonstack/gitea_mcp/agents-mdgit clone --depth 1 https://github.com/amonstack/gitea_mcpWhat 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.04472 | $0.04472 |
| Opus 5 | $0.02236 | $0.02236 |
| Sonnet 5 | $0.00894 | $0.00894 |
| Haiku 4.5 | $0.00447 | $0.00447 |
Grade C, and why
gitea_mcp AGENTS.md scanned grade C 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 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
- The Gitea credential (token or git credential) is sent ONLY inside the `Authorization` header of `GiteaClient.request`, in one of two schemes: `Authorization: token <token>` (for `[gitea]` config tokens and `GITEA_TOKE How it starts
The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Uppercase MUST, MUST NOT, and MAY are binding directives; lowercase forms are ordinary words (RFC 2119/8174 convention). FIRST and EXACTLY denote strict precedence and exactness.
This file constrains AI design and development process, rules, and boundaries only; it contains no project description. Project capabilities, deployment, and the MCP client setup guide live in README.md / README.zh-CN.md; the concrete architecture (tech stack, module layout, dependency relationships, core patterns) lives in docs/architecture.md (see §5 Appendix).
1. Agent Guidelines
This section defines how the agent operates on this repository — the workflow to follow and the rules that bind edits and commits.
1.1 Before Running Any Command
- MUST verify the target file or directory exists before operating on it.
- MUST NOT assume
make,npm run, or other scripts work until the corresponding target exists; check theMakefileandpackage.jsonscripts before invoking. - The project is an installed ESM workspace —
node_modules/already holds dependencies. Prefer existing tooling over installing new tooling.
1.2 Branch and Worktree Workflow
This project uses a two-remote model: origin is the personal fork (ake131998/gitea_mcp) and upstream is the canonical repo (amonstack/gitea_mcp). Each change MUST follow an isolated branch + worktree workflow:
- MUST NOT edit, stage, commit, merge, rebase, or cherry-pick on
master/main. The localmasteris a read-only integration branch that mirrorsupstreamand is synchronized only fromupstream; the sole permitted advance isgit fetch upstream && git merge --ff-only upstream/master. No branch — feature, fix, the working branch, or anyorigin/*ref — is ever merged intomaster;masteris never the merge target, only the fast-forward target fromupstream. It MUST stay free of direct work — not "just this once", not even for a one-line fix. masteraccepts no merges. A branch reachesmasterexclusively through the upstream round-trip: squash to one commit → push toorigin→ PR againstupstreammaster→ upstream merges → localmasterfast-forwards fromupstream. Assemblingmasterby merging local ororiginbranches is forbidden.- Before the first edit of any task, MUST verify the current branch with
git branch --show-current; if it ismaster/main, MUST stop and switch to a feature branch (or a worktree) FIRST, then begin. - Branch from the latest
masteras<type>/<name>(feat/...,fix/...,chore/...,docs/...,refactor/...,test/...) + short kebab-case name (e.g.feat/user-issues). - Work in an isolated git worktree at
.opencode/worktrees/<name>, not in the primary checkout; the primary checkout MUST stay clean. - Before committing, show the full diff and wait for explicit approval; commit only after approval (per 1.6).
- When shipping: squash the branch to a single clean commit, push to
origin(the fork), and open a PR againstupstreammaster. Pushing tooriginand opening a PR are both user-gated — do neither unless explicitly requested. - After the PR merges: fetch
upstream, advance localmasterwithgit merge --ff-only upstream/master, remove the worktree, and delete the branch.
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 · 177 lines · 4,472 tokens per session scan C d6600b6307ab
gitea_mcp AGENTS.md is an instructions file published in the GitHub repository amonstack/gitea_mcp (1 stars, last pushed 8d ago), licensed MIT. It adds 4,472 tokens to every session, about $0.0224 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
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.
buildNext
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).
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.
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).
spec-kit 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.
langchain 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.