Skip to content

metalbear-co/mirrord / skills/skills/mirrord-prev-env

mirrord-prev-env

Verified

Help users create and manage mirrord preview environments — running a modified service as an isolated pod in a shared Kubernetes cluster, scoped by an environment key and HTTP/queue traffic filtering, so teams can validate and review changes against real traffic without affecting live services. Use when a developer wants to run "mirrord preview" ad hoc, share a preview via a link (mirrord-share-ingress), or wire preview environments into CI with the metalbear-co/mirrord-preview GitHub Action (e.g. per-PR previews, least-privilege cluster access).

FileKindSize
README.mdmarkdown3.6 KB
SKILL.mdskill md43.7 KB
# mirrord-prev-env

Create and manage mirrord **preview environments** — run a modified service as an isolated pod in a shared Kubernetes cluster, scoped by an environment key and traffic filter, to validate and review changes against real traffic without affecting live services.

## What it does

This skill helps AI agents:
- **Run** preview environments ad hoc with `mirrord preview start` / `status` / `stop`
- **Wire** preview environments into CI with the `metalbear-co/mirrord-preview` GitHub Action (e.g. per-PR previews), or by calling the CLI directly, including least-privilege cluster access via the `mirrord-operator-ci` ClusterRole
- **Share** a preview via a plain HTTPS link with `mirrord-share-ingress`, optionally with a stable (pre-existing) host
- **Target** a CronJob, not just a Deployment/StatefulSet/Rollout
- **Build** the `mirrord.json` that drives a preview (target, traffic filter, TTL, timeout)
- **Build the preview pod from manifests** instead of the live target, with `--resource`/`spec_resources`, and preview the diff first with `mirrord preview diff`
- **Explain** traffic isolation via the environment `key` + `header_filter`, and header propagation across HTTP / gRPC / Kafka / SQS
- **Troubleshoot** preview-specific issues (licensing, registry/image pulls, `--force` replacement, traffic routing, the never-Ready readinessGate, teardown)

## Two modes

1. **Ad-hoc (developer)** — `mirrord preview start -f mirrord.json -i <image> -k <key>`, `mirrord preview status`, `mirrord preview logs --key <key>` (see why a preview failed), `mirrord preview stop --key <key>`.
2. **CI (GitHub Action)** — `metalbear-co/mirrord-preview` starts/stops previews across a PR lifecycle (or drive the CLI directly in CI).

## Example prompts

```
"How do I run a mirrord preview environment?"

"Set up per-PR preview environments with mirrord in GitHub Actions"

"What config and flags does `mirrord preview start` need?"

"How do I route only my traffic to the preview pod?"

"Check and stop a preview session"
```

## Key commands

```bash
# Ad-hoc
mirrord preview start -f mirrord.json -i myrepo/myapp:tag -k pr-123
mirrord preview status
mirrord preview logs --key pr-123   # what the preview's pods wrote (requires mirrord 3.255.0+, operator+chart 3.205.0+)
mirrord preview stop --key pr-123
```

```yaml workflow
# CI
- uses: metalbear-co/mirrord-preview@main
  with:
    action: start          # or: stop
    target: deployment/my-app
    image: myrepo/myapp:${{ github.sha }}
    filter: 'baggage: mirrord-session={{ key }}'
    key: pr-${{ github.event.pull_request.number }}
```

## Prerequisites

- mirrord **Operator 3.142.0+** deployed with `operator.previewEnv: true` (default on recent chart versions; set it explicitly on older ones)
- mirrord **CLI 3.189.0+** (the Action installs the latest automatically)
- **Enterprise** plan (a free trial is minted as Enterprise; an agent with no license can start one itself — see the `mirrord-operator` skill)
- Reachable kubeconfig (laptop or CI runner)
- A **built and pushed** container image for the preview pod — pushed to the **same registry/repository the target already pulls from** (the preview pulls with the target's credentials)

## Learn more

- [mirrord Preview Environments docs](https://metalbear.com/mirrord/docs/use-cases/preview-environments)
- [Preview Environments in CI docs](https://metalbear.com/mirrord/docs/use-cases/preview-environments/preview-environments-in-ci)
- [mirrord-preview GitHub Action](https://github.com/metalbear-co/mirrord-preview)
- [Reference workflow (playground)](https://github.com/metalbear-co/playground/blob/main/.github/workflows/preview-shop-pr.yml)
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 323kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall