mockserver-monorepo: Instructions file for Codex

AGENTS.md

mockserver-monorepo AGENTS.md is an instructions file for Codex, OpenCode from mock-server/mockserver-monorepo. It costs 8,403 tokens per session, scanned A, original, Apache-2.0.

Project instructions for MockServer, an open-source Java tool that imitates HTTP services and can act as a proxy for testing.

In plain words
What is it for?
It helps work on MockServer's Java, client, user-interface, documentation, Docker, Maven, and multi-module repository tasks.
Why use it?
It gives coding agents the project's rules, structure, supported technologies, local setup, and development expectations.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

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

About the project

MockServer is a testing server and proxy that imitates APIs, records and changes network traffic, and deliberately introduces failures. It is for developers testing applications against unavailable dependencies, debugging requests, and checking how systems handle degraded services across several network protocols. The catalogue add-ons help operate, configure, and test MockServer.

mock-server/mockserver-monorepo · 4,999 stars · on GitHub · mock-server.com

Reuse

Borrowing it

Nothing to install: this file belongs to mock-server/mockserver-monorepo. 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/mock-server/mockserver-monorepo/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/mock-server/mockserver-monorepo

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 mockserver-monorepo AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mock-server/mockserver-monorepo/agents-md"><img src="https://agentmods.dev/badge/instructions/mock-server/mockserver-monorepo/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,403 This file is loaded in full into every session.
When invoked 8,403 The same file — it is already loaded in full.
Security scan A 1 finding. 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.08403 $0.08403
Opus 5.5 $0.03361 $0.03361
Sonnet 5.5 $0.01681 $0.01681
Haiku 4.5 $0.00840 $0.00840

Measured 4d ago against content hash b21481f150a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mockserver-monorepo 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Use the API token (via `aws secretsmanager get-secret-value` + `curl`) only for build state, creating builds, and retrying jobs. Driving the Buildkite UI through the `chrome-devtools` MCP does **not** work for logs: that
AGENTS.md · 399 lines

How it starts

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

MockServer — Agent Instructions

Instruction Priority

  1. Direct user instructions (highest)
  2. Rules in .opencode/rules/
  3. This file (AGENTS.md)
  4. Skills in .opencode/skills/

Project Overview

MockServer is an open-source HTTP(S) mock server and proxy for testing, written in Java. It uses Netty as the HTTP server framework, Maven for builds, and is deployed as Docker containers, JARs, and WARs.

Tech stack: Java 17+ (minimum supported), Netty 4.2, Jackson 2.22, Maven (multi-module), Node.js/TypeScript (UI + client), Python 3.9+ (client), Ruby 3.0+ (client), Docker, Helm, Jekyll (documentation site) CI/CD: Buildkite (primary CI — including all Docker image builds), GitHub Actions (CodeQL, scheduled hygiene jobs such as certificate-expiry, and issue/label automation) Infrastructure: AWS (Buildkite build agents, documentation site hosting), Docker Hub (container images) Repository: GitHub (github.com)

Local Development Environment

Docker is available locally. Docker Desktop runs on the developer Mac, so Docker is available to agents in this environment (not only in CI). This means:

  • Docker-gated tests CAN and SHOULD be run locally, not just in CI. Tests that guard on Assume.assumeTrue(DockerAvailability.isAvailable(...)) (Testcontainers live-broker tests, NET_ADMIN transparent-proxy e2e, QUIC/HTTP-3 client tests, etc.) will actually execute here — validate them by running and passing them, not merely by confirming they skip.
  • Keep the Docker-gating in place anyway. The assumeTrue(...) guard is still the correct design so the suite degrades gracefully on any CI agent or machine without Docker. Docker being present locally changes how we validate, not how we write the tests.
  • org.mockserver.test.DockerAvailability (in mockserver-testing) is the canonical availability probe. NEVER call DockerClientFactory.instance().isDockerAvailable() directly. Despite its javadoc ("true if Docker is available, false if not") that method converts only IllegalStateException into false — it throws for everything else, because it also starts the Ryuk reaper and runs version/mount checks. A BadRequestException (privileged Ryuk rejected by a user-namespace-remapped daemon), a ContainerFetchException, or an Error such as NoClassDefFoundError from an incomplete test classpath all escape it, turning "no usable Docker" into a hard ERROR and defeating the assume guard — and Testcontainers caches that failure and rethrows it for the rest of the JVM. Write:
    Assume.assumeTrue("Docker is not available",
        DockerAvailability.isAvailable(() -> DockerClientFactory.instance().isDockerAvailable()));
    
    Pass a lambda, not a method reference — instance() must be evaluated inside the wrapper's try/catch. Testcontainers is the preferred harness, and works with Testcontainers 1.21.4+ (docker-java 3.4.2) on Docker Desktop 4.67 / Engine 29.x / API 1.54. (Earlier versions — Testcontainers 1.20.6 / docker-java 3.4.1 — got a 400 on the info endpoint and the probe returned false even though Docker worked.)
  • A Docker-gated suite that runs in CI needs a fail-closed assertion too. A fail-safe probe means an unusable Docker SKIPS rather than errors, which is right off-CI but is a silent false positive in CI. Pair it with .buildkite/scripts/steps/assert-suite-ran.sh over the suite's surefire reports so a skip fails the build loudly.
  • docker CLI commands (docker build, docker run) are also available for Dockerfile smoke checks in the commit workflow.

Read the full file on GitHub · 399 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. 4d ago Changed · +1 lines · +46 tokens per session b21481f150a1
  2. 12d ago Changed · +1 lines · +30 tokens per session c665e89a79ab
  3. 25d ago Changed · +5 lines · +112 tokens per session 9dc79dcca19a
  4. 27d ago Changed · +2 lines · +51 tokens per session b531d83c10b3
  5. 1mo ago Changed · +3 lines · +61 tokens per session 9961e00d04d0
  6. 1mo ago Changed · +22 lines · +390 tokens per session 58ad16acfd03
  7. 1mo ago Changed · +17 lines · +208 tokens per session cb2fc68fd9f7
  8. 1mo ago Changed · +2 lines · +107 tokens per session c3166118bf17
  9. 1mo ago First seen · 346 lines · 7,398 tokens per session scan A 6bbd38303265

Subscribe to this mod's changes

mockserver-monorepo AGENTS.md is an instructions file published in the GitHub repository mock-server/mockserver-monorepo (4,999 stars, last pushed today), licensed Apache-2.0. It adds 8,403 tokens to every session, about $0.0336 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

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).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,786 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens