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/mongodb/mongo-java-driver/agents-mdgit clone --depth 1 https://github.com/mongodb/mongo-java-driverWhat 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.00997 | $0.00997 |
| Opus 5 | $0.00498 | $0.00498 |
| Sonnet 5 | $0.00199 | $0.00199 |
| Haiku 4.5 | $0.00100 | $0.00100 |
Grade A, and why
mongo-java-driver 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 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 — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md - MongoDB Java Driver
All changes require human review.
Breaking changes to public API require a major version bump — always warn if binary compatibility is affected.
Also consult .AGENTS.md / ~/.AGENTS.md if present for local agent settings.
Architecture: Multi-module Gradle project: bson → driver-core → driver-sync/driver-reactive-streams → language wrappers (driver-kotlin-sync, driver-kotlin-coroutine, driver-scala).
See .agents/references/project-guide for module structure and dependency graph.
Each module has its own AGENTS.md.
Git
The default branch is main (not master). Always use main when comparing, diffing, or creating branches.
- Branch naming:
JAVA-XXXXmatching the Jira ticket (e.g.,JAVA-6143) - Commits: Keep commits logical and reviewable — each commit should be a coherent unit of change
- TODO comments: Must reference a Jira ticket if the work belongs to a different ticket:
// TODO JAVA-XXXX reasoning for the todo
Core Rules
- Read before modifying — understand existing code and patterns first
- Minimal changes only — no drive-by refactoring or unrelated changes
- Preserve existing comments — only remove if provably incorrect
- No rewrites without explicit permission
- When stuck or uncertain: stop, explain, propose alternatives, ask
Build
Gradle with Kotlin DSL. Build JDK: 17+. Source baseline: Java 8. Versions in gradle/libs.versions.toml.
- Java 8 baseline: no Java 9+ language features unless the module raises
sourceCompatibility. - Kotlin 1.8 with JVM target 1.8; all Kotlin modules enforce
explicitApi().
Details for both are in .agents/references/style-reference.
./gradlew check # Full validation (format + static checks + tests)
./gradlew :driver-core:test # Single module tests
./gradlew integrationTest -Dorg.mongodb.test.uri="mongodb://localhost:27017"
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 · 99 lines · 997 tokens per session scan A 084be397b8d7
mongo-java-driver AGENTS.md is an instructions file published in the GitHub repository mongodb/mongo-java-driver (2,660 stars, last pushed 3d ago), licensed Apache-2.0. It adds 997 tokens to every session, about $0.0050 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.
Other instructions, from other repositories
embabel-agent CLAUDE.md
Instructions for embabel/embabel-agent, covering claude.md, important, coding style, working approach and advice for documentation in embabel-agent-docs.
fixture-monkey CLAUDE.md
Instructions for naver/fixture-monkey, covering fixture monkey - claude code 가이드, 절대 규칙, 프로젝트 구조, 빌드 및 테스트 and 코드 스타일.
spring-plugin AGENTS.md
Instructions for explyt/spring-plugin, covering agents.md — contributor guide, project structure, build, test, run, code style and conventions and commits and pull requests.
toBeBetterJavaer AGENTS.md
AGENTS.md instructions for itwanger/toBeBetterJavaer, covering 工具权限设置, 工具使用规则, 获取网页内容 and 图片生成 / 文章配图.
toBeBetterJavaer CLAUDE.md
Claude Code instructions for itwanger/toBeBetterJavaer, covering claude.md, 你的形象, 项目概况, 目录地图 and 写作工作流.
EDDI CLAUDE.md
Instructions for labsai/EDDI: Read and follow all instructions in @AGENTS.md.