Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

lightdashот lightdash★ 6 265 звёзд на GitHub

Об этом скилле

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.
  • Live sources: previews have Hydra, a test integration that needs no credentials or egress. How to add and drive one: packages/backend/src/services/QuerySourceService/live/integrations/hydra/AGENTS.md.

Emulated model scenarios

emulate-ai (rainbow.toml) stands in for the model with fixed replies, so an agent turn calls the same tools every run. It proves what the app does with given tool calls, not what a real model would choose. Opt the env in once: set_env with AI_DEFAULT_PROVIDER=openai and OPENAI_BASE_URL=http://localhost:4014/v1; unset both to opt out.

Each file in scripts/rainbow/emulate-ai-scenarios/ is one scenario: its prompt, persona, approval decision and expected outcome, plus the replies. Replies are keyed on step order and tool names, never on prompt text. In the guest, from /usr/app:

  • python3 scripts/rainbow/emulate-ai-scenarios/scenario.py list
  • ... install <name> rebuilds the fixtures (spaces Emulator scenarios and Emulator private, their charts, Emulated scenarios agent with SQL approval on), sets composer-charts as the scenario needs, loads its replies and prints the prompt. Then send the prompt in the UI as the named persona.
  • ... run <name> installs and drives the turn through the API as the persona, answering any approval as the scenario says, and prints the tool calls and answer.
  • ... reset restores scripts/rainbow/emulate-ai.yaml replies and the flag; --clean also removes the fixtures.

Install again before every run: replies fire once each, and edits change the fixtures. A new scenario copies an existing file; {{name}} placeholders take the fixture uuids install prints.

Exports

Image and PDF exports, chart images and deliveries with images use the headless-browser service: browserless, the version production runs, on localhost:3001. It loads the app from http://localhost:8080. Read its log with logs and service headless-browser; the backend logs captures in dev.

  • Dashboard image or PDF: the UI's export menu, or POST /api/v2/dashboards/<uuid>/exports?projectUuid=<uuid> with {"format": "image"} or {"format": "pdf"}. Poll GET /api/v1/schedulers/job/<jobId>/status until completed. results.details.url is the file: an env URL for images, a presigned bucket URL for PDFs.
  • Chart image: POST /api/v1/saved/<chartUuid>/export returns the image URL.
  • Scheduled delivery: create one with an email target (any address), then "Send now" in the
Полный SKILL.md на GitHub

Установить rainbow-env в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл 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.

Как установить скилл rainbow-env?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rainbow-env запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rainbow-env с