Configure Agents to Use mirrord
In this guide, we'll cover how to configure mirrord with Cursor, Claude Code, GitHub Copilot, Codex, and Windsurf. Each tool reads instructions differently, but the setup is the same: a mirrord config, an instructions file, and optionally a helper script.
Tip: You can use mirrord to test AI-generated code locally with Kubernetes context, without needing to build or deploy each time. If you're new to mirrord, start with the Quick Start.

Common setup: mirrord config
Before configuring any AI tool, create a mirrord config at .mirrord/mirrord.json:
For repos with multiple services, create one config per service: .mirrord/mirrord-<service>.json.
Tip: You can auto-generate configs and agent instructions for your entire repo using the mirrord skills package for Claude Code, or the meta-prompt in Using mirrord with AI Agents for any tool. The sections below show what to set up manually if you prefer.
Claude Code
Claude Code reads instructions from CLAUDE.md at the repo root. It also reads AGENTS.md if present.
Fast path: install mirrord skills
MetalBear publishes a skills package that gives Claude Code mirrord capabilities out of the box, config generation, quickstart, CI setup, operator installation, and database branching:
Or with npx:
Once installed, Claude Code can generate mirrord configs, run services against staging, and set up your repo without manual instructions. If you want more control over the instructions, create a CLAUDE.md manually instead.
Manual setup
Create CLAUDE.md:
Usage
Cursor
Cursor reads project-level instructions from .cursor/rules/ directory. Each file in this directory is loaded as a rule.
Setup
Create .cursor/rules/mirrord.mdc:
Using with Cursor Agent
When using Cursor's Agent mode for multi-file changes, Cursor reads rules from .cursor/rules/ automatically. Ask it to test:
Cursor will generate the code, run mirrord exec, and verify the result.
GitHub Copilot
GitHub Copilot and the Copilot Coding Agent read instructions from .github/copilot-instructions.md.
Setup
Create .github/copilot-instructions.md:
Codex
OpenAI Codex reads from AGENTS.md.
Setup
Use the same AGENTS.md format as Claude Code above. Codex follows the same conventions.
Windsurf
Windsurf reads from .windsurfrules.
Setup
Create .windsurfrules:
Using the meta-prompt for any tool
Instead of writing configs manually, you can paste the meta-prompt from Using mirrord with AI Agents into any AI tool. It will:
Scan your repo to discover services
Ask you which deployments to target
Generate
.mirrord/mirrord-<service>.jsonconfigsGenerate an
AGENTS.mdwith instructions for your specific setup
This works with Claude Code, Cursor, Copilot CLI, and Gemini CLI.
IDE plugin integration
If you use mirrord's IDE plugins (VS Code or JetBrains), your AI agent's code runs with mirrord context automatically when you hit Run or Debug, no mirrord exec needed.
VS Code, Cursor, Windsurf, and other forks
The mirrord extension works for VS Code and all its forks like Cursor, Windsurf, etc.
Install the mirrord extension
Enable mirrord from the status bar
When your AI agent says "run the service", use the Run/Debug button, mirrord is already active
JetBrains (IntelliJ, GoLand, PyCharm, etc.)
Install the mirrord plugin
Enable mirrord and select your config
Run/Debug your application, mirrord handles the cluster connection
This is useful when you're pair-programming with an AI agent in the IDE rather than letting it run autonomously via CLI.
Verifying the setup
After configuring any tool, test the integration:
Ask the agent to make a trivial change (e.g., add a log line)
Ask it to test the change using mirrord
Verify the agent runs
mirrord execand checks the outputConfirm the agent reports real responses from staging, not mock data
If the agent skips the mirrord step, strengthen the language in your instructions file, use "MUST", "ALWAYS", "NEVER" instead of "should" or "please".
Next steps
How to Test AI-Generated Code with mirrord: test AI-generated code against your Kubernetes cluster step by step
Autonomous AI Workflows with mirrord: the full agent loop with E2E guardrails and AGENTS.md setup
Using mirrord with AI Agents: the meta-prompt and detailed setup reference
Last updated
Was this helpful?

