/mirrord:mirrord-beyondfrom mirrord
Guides setup and use of mirrord Beyond to run local processes against Amazon ECS workloads outside Kubernetes. Covers ECS platform-team wiring (Secrets Manager, task definition) and developer sessions (login, config, mirrord up).
Ships in mirrord. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
mirrord Beyond lets a developer run a service locally while it takes over the network and environment of the same service deployed outside Kubernetes, such as an Amazon ECS task. Requests that carry the developer's session header reach the local process, its outgoing connections leave from the ECS task (so it reaches private databases and internal APIs), and it gets the task's environment variables. Nothing is built, pushed or redeployed per session.
Three parts make a session: the developer's local mirrord up; the mirrord remote bootstrap, loaded into the ECS task's existing application container, which registers the task under a service name and environment; and sessions-manager, which pairs the two. Both sides only make outbound HTTPS connections to sessions-manager.
Names: the product is mirrord Beyond. The docs section is "Beyond Kubernetes". The CLI, dashboard, config and error messages say "serverless": target.path: serverless/<service>, the "serverless agent API key", "serverless targets". They're all the same thing; keep the literal terms in config and commands.
This skill covers the MetalBear Cloud deployment mode end to end: sessions-manager is hosted by MetalBear, no Kubernetes cluster or Operator is needed, and it's available on every plan, including Free, while in alpha. Amazon ECS (Fargate and EC2, Linux) is the supported platform. For other platforms (Lambda, Batch, Windows containers), say support isn't available yet and suggest contacting MetalBear.
orders ECS service locally with mirrord" / "Write a mirrord-up.yaml for a serverless target"timed out connecting to the serverless target's agent" / "unable to pull secrets after adding mirrord"serverless/ targets, sessions-manager or MIRRORD_REMOTE_SERVICETrack 1 changes a running ECS service and handles a secret that authenticates the whole organization. Treat it as high-impact.
MIRRORD_API_KEY variable the user exports in their own terminal before starting you. Check it with test -n "$MIRRORD_API_KEY" && echo set. Never print, echo or read its value, write it to a file, put it in a task definition's environment or an environment file, or commit it. Never ask the user to paste it into the chat. If it's not set, offer the two ways on in Store the API key.get-secret-value that prints SecretString). To check that it holds a MetalBear key, use the query in troubleshooting, which prints only true or false.mirrord/sessions-manager-api-key secret, the mirrord-sessions-manager-api-key inline policy on the execution role (plus kms:Decrypt when the secret uses a customer-managed key), a new task definition revision (plus a /tmp volume when the root filesystem is read-only), and the revision the service runs. Ask before changing an existing secret's value.aws ecs update-service, tell the user the cluster, service and new revision, and wait for an explicit go-ahead.~/.mirrord/auth.json. It holds the developer's login token.MIRRORD_API_KEY, so never let such values run as shell code: before interpolating a service, environment, cluster or container name into a command, check it against ^[A-Za-z0-9._-]+$ (container names: ^[A-Za-z0-9_-]{1,255}$), stop and ask if it doesn't match, and keep it single-quoted in the command.references/ecs-setup.md — every Track 1 command: preflight checks, storing the key, the tested jq merge for the task definition, deploying, verifying, key rotation, and variants (EC2 memory, private registry, read-only root filesystem, environment files, Terraform)references/troubleshooting.md — symptoms grouped by where they show up (ECS task events, application container logs, mirrord output), and how to tell which side a failure is on| The user wants to… | Track |
|---|---|
| Make an ECS service targetable, onboard another service, rotate the key, fix a task that won't start after adding mirrord | Track 1: ECS setup |
Run or debug their service locally against an ECS service, write mirrord-up.yaml, use the IDE, fix a session that won't connect | Track 2: developer session |
A developer without AWS access can't tell whether their ECS service is set up yet. If it isn't, and they have AWS access and want to, do Track 1 first. Otherwise give them this message for their platform team; it covers both cases:
I'd like to run <SERVICE> locally against our ECS deployment with mirrord Beyond.
If it's already set up, please send me:
- the exact value of MIRRORD_REMOTE_SERVICE on the task
- the exact value of MIRRORD_REMOTE_ENVIRONMENT on the task, or "not set"
- which MetalBear organization its API key belongs to
If it isn't set up yet, it needs a one-time change to the ECS service: a setup container
and a few variables in the task definition, and the organization's serverless agent
API key in Secrets Manager. Guide:
https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes/ecs
Both tracks depend on these, and most failures come from one of them not matching:
MIRRORD_REMOTE_SERVICE on the task = the part after serverless/ in the developer's target.path. Free-form, no spaces or slashes. Often the ECS service's name, but not necessarily.MIRRORD_REMOTE_ENVIRONMENT on the task = target.namespace for the developer. Optional on both sides: unset means default. Leave it unset unless the user wants named environments.mirrord login must be to the same organization.ghcr.io/metalbear-co/mirrord-remote-bootstrap:3.229.0 or later, pinned to a release tag.The user needs the AWS CLI with permission to manage Secrets Manager secrets, IAM role policies, ECS task definitions and the service. Work through these steps; the commands are in references/ecs-setup.md.
/tmp, platform or agent version, outbound HTTPS, no LD_PRELOAD other than mirrord's own, no Operator-mode variables). Report anything unmet instead of continuing. Agree on the service name (and environment, if any) with the user.mirrord/sessions-manager-api-key already exists in the region, reuse its ARN; no key is needed. Otherwise an organization admin generates the key at app.metalbear.com (onboarding wizard or Settings), and the user exports it as MIRRORD_API_KEY in their terminal and starts you from there. If the organization has a live key that nobody kept, the admin rotates it in Settings with a grace window (rotation)."$MIRRORD_API_KEY" (only if it didn't exist), then grant the service's execution role secretsmanager:GetSecretValue on it. Run the grant for every service, since each may have its own execution role. Verify both.jq filter on the current task definition. It appends mirrord's volume, setup container, dependency, mount, variables and secret without touching anything else, and refuses to overwrite an LD_PRELOAD other than mirrord's. Show the user the diff, then register the new revision.aws ecs update-service to the new revision, then aws ecs wait services-stable.<SERVICE_NAME> on ECS is ready for mirrord Beyond.
1. Install mirrord 3.288.0 or later, then run: mirrord login
(pick the <ORGANIZATION> organization in the browser)
2. Save this as mirrord-up.yaml in your project, with your local start command:
common:
operator: false
services:
<SERVICE_NAME>:
target:
path: serverless/<SERVICE_NAME>
run:
command: ["<your>", "<start>", "<command>"]
3. Run: mirrord up --key <your-name>
Requests with the header "baggage: mirrord-session=<your-name>" reach your machine.
Docs: https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes
If the task sets MIRRORD_REMOTE_ENVIRONMENT, add namespace: <ENVIRONMENT> under target in the message.
To upgrade the bootstrap later, rerun the merge with the new image tag and redeploy. To remove mirrord, register the previous revision again and deploy it.
mirrord version. mirrord --version must be 3.288.0 or later. If it isn't installed or is older, follow the install docs (or the mirrord-quickstart skill). Never pipe a downloaded script into a shell.
Sign in. Run mirrord login. It prints Approve the login in your browser. If it does not open, visit: and a URL, tries to open the browser, and waits up to 5 minutes. Run it so that the wait doesn't hit your tool's timeout (in the background, or with a timeout above 5 minutes), relay the URL from its output, and tell the user to approve and pick the organization that owns the ECS service's API key (if they don't know which, the platform team does). It finishes with Logged in as <email>. The login is valid until <time>. It doesn't show the organization, and there's no command that does: if in doubt, ask the user which one they picked. The sign-in isn't renewed automatically; when it expires, run mirrord login again.
Names. Get the service name and environment from the platform team, or, with AWS read access, from the task definition (MIRRORD_REMOTE_SERVICE, MIRRORD_REMOTE_ENVIRONMENT, in the container's environment or in an S3 file listed in its environmentFiles; see troubleshooting). mirrord can't list mirrord Beyond targets yet. Never guess. The environment is the exact MIRRORD_REMOTE_ENVIRONMENT value on the task, not the name of an ECS cluster, AWS account or stage: if the platform team says "staging", confirm that's the variable's value. If the variable isn't set, leave namespace out.
Run command. Work out how the service starts locally from the project (package.json scripts, Makefile, Procfile, pyproject.toml, README) and confirm it with the user.
Write mirrord-up.yaml in the project root. common.operator: false is required for MetalBear Cloud: without it, mirrord goes through the Operator if ~/.mirrord/mirrord.json has "operator": true from an earlier Operator session, and fails with Feature `target.path` requires a mirrord Enterprise plan.
common:
operator: false
services:
payments:
target:
path: serverless/payments
run:
command: ["npm", "start"]
With a named environment, set namespace (it's the mirrord Beyond environment, not a Kubernetes namespace):
common:
operator: false
services:
payments:
target:
path: serverless/payments
namespace: staging
run:
command: ["npm", "start"]
The key under services (payments here) is a free-form label for the local service; what pairs it with the ECS task is target.path and target.namespace. The service runs in split mode by default: only requests with baggage: mirrord-session=<KEY> reach the local process. default_mode: mirror on the service (or mirrord up --mode mirror) copies traffic instead of taking it. To change the filter, set http_filter on the service (see the mirrord-up skill). A serverless/ service can sit in the same file as services that target Kubernetes workloads.
Run it. In the directory of mirrord-up.yaml: mirrord up --key <KEY> (without --key, the OS username is the session key). The key goes into a regex filter, so pick one of letters, digits, - and _. mirrord up's default filter also matches longer keys that start with yours (alice matches alice2), so agree on keys within the team that aren't prefixes of each other, or set a stricter http_filter like the one in the IDE example below. Check that mirrord prints connecting through the MetalBear Cloud sessions-manager at https://sm-aws-use1.app.metalbear.com/sm; if it names another sessions-manager, see troubleshooting. Then send a request through the service's normal entry point (load balancer, API gateway) with the header: curl -H "baggage: mirrord-session=<KEY>" <URL>. In a browser, the mirrord browser extension can add the header.
From the IDE. The VS Code and IntelliJ extensions don't run mirrord up. Use this as the extension's active mirrord.json instead. It starts the kind of session split mode does (steal with a header filter on the session key), with a filter that matches the whole mirrord-session baggage member, so alice doesn't also take alice2's requests. If the task sets MIRRORD_REMOTE_ENVIRONMENT, add "namespace": "<ENVIRONMENT>" under target:
{
"operator": false,
"target": {
"path": "serverless/payments"
},
"key": "alice",
"feature": {
"network": {
"incoming": {
"mode": "steal",
"http_filter": {
"header_filter": "^baggage:\\s*(.*,\\s*)?mirrord-session={{ key }}\\s*([,;].*)?$"
}
}
}
}
}
Tell the developer the limits up front:
serverless/ targets: the local process reads and writes the same databases and queues as the ECS task. feature.split_queues, feature.kafka_branch, feature.db_branches or feature.copy_target in a config_patch make mirrord refuse to start.split or mirror only. replace mode fails.us-east-1 (services in other regions work, with added latency). Don't load-test through it. When MetalBear restarts it, sessions end; rerun mirrord up.On the Enterprise plan, sessions-manager can run inside the mirrord Operator instead (Operator 3.223.0 or later, Helm value operator.sessionsManager: true). Everything goes through the cluster's API server: the ECS task authenticates with its task role, mapped into an EKS cluster with an access entry and RBAC, and sets MIRRORD_OPERATOR_API_URL, MIRRORD_OPERATOR_EKS_CLUSTER_NAME and MIRRORD_OPERATOR_API_CA_DATA instead of an API key, and developers use common.operator: true with their kubeconfig. Never mix the two modes' variables on a task. Point users at Operator-Hosted Sessions-Manager and Connecting ECS to the Operator rather than improvising the IAM setup.
The three most common failures:
timed out connecting to the serverless target's agent through sessions-manager: names or organization don't match, or the task isn't registered. See Which side is it?Feature `target.path` requires a mirrord Enterprise plan.: the session went through the Operator. Set common.operator: false.ResourceInitializationError: unable to pull secrets when the task starts: the execution role can't read the secret. Redo the grant on the role in executionRoleArn.Everything else: references/troubleshooting.md.
references/troubleshooting.md before changing anything.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mirrord, ecs, fargate, serverless-targets, local-remote-development
npx claudepluginhub metalbear-co/skills --plugin mirrord13 skills in this plugin
/mirrord-chaosHelp users chaos test their app with mirrord: inject artificial latency or connection errors into a mirrord session's outgoing traffic via per-session chaos rules managed with the `mirrord chaos` CLI. Use when a user wants to add latency or delay to outgoing connections or a dependency (e.g. a slow database), simulate connection failures (reset, timed out, refused), test app behavior under degraded network conditions, or wire chaos rules into CI test runs. Always use this skill instead of the deprecated _experimental_.latency mirrord config option./mirrord-ciHelp users set up mirrord in CI pipelines for testing against real Kubernetes environments. Use when users want to run end-to-end tests, integration tests, or automated tests in CI using mirrord to connect to staging/shared clusters./mirrord-configHelps users generate, edit, and validate mirrord.json configuration files for mirrord (MetalBear). Use when the user runs mirrord from the VS Code or IntelliJ extension or with `mirrord exec`, needs feedback on or changes to an existing mirrord.json, or needs mirrord.json options (env/fs/network) for a mirrord-up.yaml `config_patch`. For a new config to run a local process against a Kubernetes cluster from the CLI, use the mirrord-up skill instead. Always ensures output JSON is valid and schema-conformant./mirrord-db-branchingHelps users configure mirrord.json for database branching, enabling isolated database copies for safe development and testing. Use when the user wants to set up MySQL, MariaDB, PostgreSQL, MSSQL, MongoDB, Redis, DynamoDB, ClickHouse, Google Spanner, Amazon S3, turbopuffer, or generic branches, configure copy modes, connection sources, schema migrations, IAM authentication, or manage database branches./mirrord-header-propagationMakes a codebase propagate W3C baggage (the `baggage` header carrying `mirrord-session=<key>`) end to end, so mirrord HTTP filters, preview environments, and queue splitting can route a whole request chain to one developer's session. Detects existing OpenTelemetry, Datadog, or other tracing that can already propagate baggage and enables it; otherwise adds a small propagation layer. Covers inbound/outbound HTTP and gRPC, publishing to and consuming from Kafka, RabbitMQ, SQS/SNS, GCP Pub/Sub, Azure Service Bus, NATS, Redis Pub/Sub, BullMQ and Temporal, per-message context restore in consumers, and storage hand-offs such as a GCS signed URL upload that triggers Pub/Sub or an S3 presigned upload that triggers SQS. Ends with a report of every flow found and which ones still drop the header. Use when the user asks to propagate headers, baggage, tracestate, the mirrord session key, or trace context across services or queues, or when a mirrord filter matches the first service but not downstream services or queue consumers.
/mirrord-kafkaHelps DevOps engineers configure mirrord Operator's Kafka queue splitting feature end-to-end. Generates the MirrordSplitConfig and MirrordPropertyList Kubernetes CRD YAMLs (the current resources; MirrordKafkaTopicsConsumer + MirrordKafkaClientConfig are deprecated but still supported), the matching mirrord.json split_queues section with message_filter and jq_filter, and Helm value guidance. Use this skill whenever the user mentions Kafka splitting with mirrord, MirrordSplitConfig, MirrordPropertyList, MirrordKafkaClientConfig, MirrordKafkaTopicsConsumer, Kafka queue/topic splitting, configuring mirrord with Kafka, Kafka Streams splitting, MSK IAM auth, or troubleshooting Kafka splitting sessions. Also trigger on split_queues with queue_type Kafka, or connecting mirrord to a Kafka cluster. This is a Team/Enterprise feature of mirrord.
Other plugins' skills for the same job