mirrord-prev-env

mirrord-prev-env is a skill for Claude Code from metalbear-co/mirrord. It costs 122 tokens per session (10,740 once invoked), scanned A, original, MIT.

A guide for creating preview environments: isolated copies of changed services running as pods in a shared Kubernetes cluster. Traffic can be limited to a chosen environment, so the change can be checked against real service dependencies without changing the live service.

In plain words
What is it for?
Use it to start, inspect, and stop developer previews, route selected HTTP or queue traffic to them, and create or remove previews automatically when pull requests change.
Why use it?
It lets developers and reviewers test a change without deploying it to everyone. It also supports connecting previews to pull requests through a GitHub Actions workflow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is mirrord preview start -t deployment/app -i myrepo/app:pr-123 -k pr-123 --resource ./k8s/.

Part of the mirrord plugin — 13 skills shipped together

Good fit Use it to start, inspect, and stop developer previews, route selected HTTP or queue traffic to them, and create or remove previews automatically when pull requests change.

Compare 6 skills from other repositories ↓
About the project

mirrord lets a program running on a developer’s machine behave as though it were running inside a selected pod in a Kubernetes cluster, by routing the pod’s environment, files, network, and traffic to the local process. Developers and AI coding agents use it to build and test against live cluster services without deploying or disrupting other users; the catalogue entries provide instructions for using it.

metalbear-co/mirrord · 5,434 stars · on GitHub · metalbear.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/metalbear-co/mirrord
agentmods
npx agentmods add skills/metalbear-co/mirrord/mirrord-prev-env

Made for: Claude Code.

Or install mirrord, the plugin that ships this one along with the rest of its 13 skills.

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 mirrord-prev-env

README.md
[![agentmods](https://agentmods.dev/badge/skills/metalbear-co/mirrord/mirrord-prev-env/github.svg)](https://agentmods.dev/skills/metalbear-co/mirrord/mirrord-prev-env)
Your own site
<a href="https://agentmods.dev/skills/metalbear-co/mirrord/mirrord-prev-env"><img src="https://agentmods.dev/badge/skills/metalbear-co/mirrord/mirrord-prev-env/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 mirrord-prev-env

Your own site · 80×15
<a href="https://agentmods.dev/skills/metalbear-co/mirrord/mirrord-prev-env"><img src="https://agentmods.dev/badge/skills/metalbear-co/mirrord/mirrord-prev-env.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,740 The whole file, excluding the scripts and references it only reads on demand.
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.00122 $0.10740
Opus 5.5 $0.00049 $0.04296
Sonnet 5.5 $0.00024 $0.02148
Haiku 4.5 $0.00012 $0.01074

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

Security

Grade A, and why

mirrord-prev-env 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 2d 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.

- **Reaching a preview** requires sending the filter header (e.g. `baggage: mirrord-session=<key>`). Developers can inject it with the [mirrord Browser Extension](https://metalbear.com/mirrord/docs/using-mirrord/incoming
skills/skills/mirrord-prev-env/SKILL.md · 591 lines

How it starts

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

Mirrord Preview Environment Skill

Purpose

Help users create and manage mirrord preview environments. A preview environment runs only the modified service(s) as isolated pods in a shared cluster, while their dependencies reach the rest of the main cluster through mirrord. Traffic is scoped by an environment key and a filter, so a change can be collaborated on, validated, and reviewed against real traffic without affecting live services.

This skill covers two modes:

  1. Ad-hoc (developer) mode — a developer runs the mirrord preview CLI (start / status / stop) directly.
  2. CI mode — the metalbear-co/mirrord-preview GitHub Action wires previews into a PR lifecycle (start on open/push, stop on close).

When to Use This Skill

Trigger on questions like:

  • "How do I run a mirrord preview environment?"
  • "Set up per-PR preview environments with mirrord"
  • "How do I use the mirrord-preview GitHub Action?"
  • "mirrord preview start — what config and flags do I need?"
  • "How do I route only my traffic to the preview pod?"
  • "How do I check / stop a preview session?"

Security (must follow)

Preview environments deploy an image into a shared cluster and route live traffic to it, so the security bar is higher than for config generation. Always:

  • Never instruct or generate remote pipe-to-shell installs (downloading a script and executing it via the shell) or similar patterns to install mirrord. If the user needs the CLI, point them to the official mirrord installation docs and their org's approved install path. In CI, pre-install mirrord in a trusted runner image or pin a verified release.
  • Only deploy images you trust. A preview runs an arbitrary container image inside your cluster. In CI, do not auto-start previews for pull requests from forks — that would execute untrusted contributor code against your real cluster. Gate start on same-repo PRs (e.g. check pull_request.head.repo.full_name == <owner>/<repo>) or trusted authors, as the reference playground workflow does.
  • Scope the traffic filter narrowly. steal mode intercepts matching requests away from the real target. Key the header_filter to a unique environment key so a preview can never capture another session's or production's traffic. Prefer the more conservative mirror mode when you only need to observe.
  • Target staging, not production. Previews are for shared staging/dev clusters; do not point them at production targets.
  • Use short-lived cluster credentials. Prefer cloud OIDC / Workload Identity Federation and least-privilege RBAC for the CI service account over long-lived kubeconfig secrets. Never hardcode kubeconfigs, tokens, or registry credentials in workflow files — use the CI platform's secret store.
  • Always set a TTL (ttl_mins/ttl_secs) so an exposed preview environment tears itself down and cannot linger unattended on a shared cluster.

Read the full file on GitHub · 591 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago Changed 15b7e5a5b6eb
  2. 17d ago Changed 058a417fbad5
  3. 19d ago Changed c2ae3f0fc80d
  4. 27d ago Changed · +36 lines 3446c3009b6f
  5. 1mo ago Changed · +44 lines 8093f5e9dcc9
  6. 1mo ago Changed · +2 lines cc578ca0229e
  7. 1mo ago First seen · 509 lines · 122 tokens per session scan A a003d0037a46

Subscribe to this mod's changes

mirrord-prev-env is a skill published in the GitHub repository metalbear-co/mirrord (5,434 stars, last pushed today), licensed MIT. It adds 122 tokens to every session and 10,740 once invoked, about $0.0005 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-10-09.

Related

mirrord-prev-env compared with skills from other repositories

mirrord-prev-env next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mirrord-prev-envmetalbear-co/mirrordSkill5.4ktodayMITA122Claude Code
scanning-kubernetes-manifests-with-kubesecxalgorix/xalgorixSkill1.5ktodayApache-2.0A41Claude Code, Codex
cc-devops-skillsseaworld008/Commonly-used-high-value-skillsSkill75yesterdayMITA37Claude Code, Codex
railwayashish7802/awesome-api-skillsSkill1311d agoMITA0Claude Code, Codex
terraform-skillaws-samples/sample-apex-skillsSkill1053d agoMIT-0A51Claude Code, Codex
b01-gbrain--devopsslayerassassinjack/b01-gbrain-devopsSkill487mo agononeA54Claude Code, Codex
r00-GetBindu-awesome-claude-code-and-skills--devopszeptostagetrap88/r07-getbindu-awesome-claude-code-and-skills-devopsSkill467mo agononeA73Claude Code, Codex