Skip to content
Skills Library
DevOps & cloud · Tool integration

rainbow-env

/rainbow-env

Interact with Rainbow Machine PR preview environments for Lightdash (`rainbow.toml`, rainbowmachine MCP). Use when an agent needs to create or redeploy a preview env, run commands or call the API or database inside one, or verify a change on it.

Repository
lightdash ↗
Licence
MIT
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Interact with Rainbow Machine PR preview environments for Lightdash (`rainbow.toml`, rainbowmachine MCP). Use when an agent needs to create or redeploy a preview env, run commands or call the API or database inside one, or verify a change on it.

Original author description

Interact with Rainbow Machine PR preview environments for Lightdash (`rainbow.toml`, rainbowmachine MCP). Use when an agent needs to create or redeploy a preview env, run commands or call the API or database inside one, or verify a change on it.

How it works

  1. Outside vs inside
  2. Pick the env
  3. Redeploy
  4. Talk to the app
  5. Verify
  6. Guest limits
Original SKILL.md headings · 47 lines, 507 words
SKILL.md preview
---
name: rainbow-env
metadata:
  internal: true
description: Interact with Rainbow Machine PR preview environments for Lightdash (`rainbow.toml`, rainbowmachine MCP). Use when an agent needs to create or redeploy a preview env, run commands or call the API or database inside one, or verify a change on it.
---

# Rainbow environments

`rainbow.toml` is the recipe: services, build tiers, `[env]`, egress. Read it when a step below needs a detail it doesn't give.

## Outside vs inside

Each env is a VM (the **guest**) running the dev stack in `/usr/app`. You reach it two ways:

- **Outside**, through the env URL: anything a user does (UI, API calls, screenshots). Requests pass the HTTPS ingress, as in production.
- **Inside**, through `exec`, `logs`, `verify`, `set_env`: anything only a server-side developer could do (database, logs, env vars, scripts against the live stack). `localhost` is the guest itself, over plain http.
- **Code** changes go through git only: push, then redeploy.

## Pick the env

- An open PR already has one: routing name `lightdash--pr-<N>`. Use it.
- Before/after: keep the PR env as "after"; `create_env({repo: "lightdash/lightdash", branch: "main", name: "lightdash-main-base"})` is "before".
- Any other pushed branch: `create_env({repo: "lightdash/lightdash", branch, name})`.

Tools take the routing name or env id as `env`.

## Redeploy

The env serves pushed commits only. To ship a change: push, then `create_env` with the same name; it updates in place at the same URL. Frontend, common, visualization or formula changes rerun the `frontend-build` tier, because 8080 serves the prebuilt bundle in `packages/frontend/build`, not the Vite dev server. `/usr/app` in the guest is not a git checkout.

A `create_env` that changes the dependency layer rebuilds the parent and takes minutes. A call that returns "still running", a task handle, or an error after a long wait is usually still working: check `list_envs`, then repeat the same call. Keep one env per name.

## Talk to the app

- API: authenticate with the seed PAT (`SEED_PAT` in `packages/common/src/index.ts`): `curl -H "Authorization: ApiKey $PAT" http://localhost:8080/api/v1/...` inside the guest, or the env URL from outside. Session login sets a secure cookie, so plain-http requests from the guest get none.
- Feature flags: the API in `docs/preview-feature-flags.md`. Config-derived flags (`ai-copilot` and friends) follow env vars instead.
- Env vars: `set_env` (restarts services, ~20 s); stored secrets come from `rainbow.toml` `[secrets]`.
- Database: `psql` in the guest with the `PG*` values from `rainbow.toml` `[env]`; `exec` does not load them for you.
- Logs: `logs` with service `dev`.
- Outbound calls fail by policy unless `rainbow.toml` `[[egress.allow]]` admits the host; `egress` lists what was refused.

## Verify

UI proof is the real product on the env with seed data: open the env URL in a browser on your side. Storybook is for exploring variants; label any Storybook capture as such. Prefer text snapshots; screenshot only for visual checks, at device scale 1, cropped to the element.

Done when every claim you report names the env, the commit it served (`list_envs` sha), and the artifact (snapshot, screenshot, response, log line) that shows it.

## Guest limits

- `exec` stdout is clipped at 64 KB: write large output to a file and read it in slices.
- The guest cannot reach its own public URL. To pull a file out, write it under `packages/frontend/build/<dir>/`, fetch it from the env URL, then delete it.

Versions

The database has no other skills named rainbow-env.

Database snapshot: 13.11.2026 · package version 6721cbec8bae (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100preview-env
    Spin up, observe, and tear down Matrix OS preview environments — per-PR preview VPSes, platform Cloud Run preview revisions, HMR staging slots — and query their centralized logs. Use when a change needs to be seen running (shell/gateway/onboarding/CLI/macOS features), when asked…
  • 90infra-preview
    Creates, resets, cleans up or audits per-change preview environments through the project's preview lifecycle, keeping each instance isolated, bounded by capacity and removed when its change ends. Use for any preview operation and to find orphaned previews.
  • 100algolia-multi-env-setup
    Design isolated Algolia development, staging, preview, and production targets with explicit promotion rules. Use when environments share credentials or index names, or previews need bounded search data. Trigger with "Algolia environments", "Algolia staging setup", or "preview index".
  • 100developing-in-lightdash
    Use when reading, creating, and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.
  • 100session-env
    Explain and verify how a Claude session pins itself (and all its n8nac workflow/instance commands) to exactly ONE n8n environment without clobbering other sessions' global active env. Use when the user asks "which env am I on", "how does session env pinning work", "pin this…
  • 95mirrord-prev-env
    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…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.