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★ 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).localhostis 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_PATinpackages/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-copilotand friends) follow env vars instead. - Env vars:
set_env(restarts services, ~20 s); stored secrets come fromrainbow.toml[secrets]. - Database:
psqlin the guest with thePG*values fromrainbow.toml[env];execdoes not load them for you. - Logs:
logswith servicedev. - Outbound calls fail by policy unless
rainbow.tomlegress.allowadmits the host;egresslists 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 (spacesEmulator scenariosandEmulator private, their charts,Emulated scenarios agentwith SQL approval on), setscomposer-chartsas 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.... resetrestoresscripts/rainbow/emulate-ai.yamlreplies and the flag;--cleanalso 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"}. PollGET /api/v1/schedulers/job/<jobId>/statusuntilcompleted.results.details.urlis the file: an env URL for images, a presigned bucket URL for PDFs. - Chart image:
POST /api/v1/saved/<chartUuid>/exportreturns the image URL. - Scheduled delivery: create one with an email target (any address), then "Send now" in the
Установить 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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic