miro-multi-env-setup
Configure Miro REST API v2 across development, staging, and production with separate OAuth apps, isolated test boards, and secret management. Trigger with phrases like "miro environments", "miro staging", "miro dev prod", "miro environment setup", "miro multi env".
Best use case
miro-multi-env-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Miro REST API v2 across development, staging, and production with separate OAuth apps, isolated test boards, and secret management. Trigger with phrases like "miro environments", "miro staging", "miro dev prod", "miro environment setup", "miro multi env".
Teams using miro-multi-env-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/miro-multi-env-setup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How miro-multi-env-setup Compares
| Feature / Agent | miro-multi-env-setup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Miro REST API v2 across development, staging, and production with separate OAuth apps, isolated test boards, and secret management. Trigger with phrases like "miro environments", "miro staging", "miro dev prod", "miro environment setup", "miro multi env".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Miro Multi-Environment Setup
## Overview
Configure separate Miro app credentials, OAuth scopes, and board access for development, staging, and production. Miro does not provide a sandbox API; all environments use `https://api.miro.com/v2/` — isolation is achieved through separate apps and dedicated boards.
## Environment Strategy
| Environment | Miro App | Boards | Scopes | Token Storage |
|-------------|----------|--------|--------|---------------|
| Development | `MyApp (Dev)` | 1 dedicated test board | `boards:read`, `boards:write` | `.env.local` |
| Staging | `MyApp (Staging)` | Staging workspace boards | All required scopes | Secret Manager |
| Production | `MyApp (Production)` | Production boards | Minimum required scopes | Secret Manager + rotation |
**Key insight:** Create a separate Miro app at https://developers.miro.com for each environment. This gives you independent client IDs, secrets, and OAuth redirect URIs.
## Configuration Structure
```
config/
├── miro.base.ts # Shared settings (timeouts, retry policy)
├── miro.development.ts # Dev overrides
├── miro.staging.ts # Staging overrides
└── miro.production.ts # Prod overrides
```
### Base Configuration
```typescript
// config/miro.base.ts
export const miroBaseConfig = {
apiBase: 'https://api.miro.com/v2',
tokenEndpoint: 'https://api.miro.com/v1/oauth/token',
timeout: 30000,
retries: 3,
backoff: { baseMs: 1000, maxMs: 32000, jitterMs: 500 },
cache: { ttlSeconds: 120 },
rateLimit: { maxConcurrency: 5, requestsPerSecond: 10 },
};
```
### Environment Configs
```typescript
// config/miro.development.ts
import { miroBaseConfig } from './miro.base';
export const miroDevConfig = {
...miroBaseConfig,
clientId: process.env.MIRO_CLIENT_ID!,
clientSecret: process.env.MIRO_CLIENT_SECRET!,
redirectUri: 'http://localhost:3000/auth/miro/callback',
testBoardId: process.env.MIRO_TEST_BOARD_ID, // Dedicated dev board
cache: { ttlSeconds: 10 }, // Short TTL for dev
logLevel: 'debug',
};
// config/miro.staging.ts
export const miroStagingConfig = {
...miroBaseConfig,
clientId: process.env.MIRO_CLIENT_ID_STAGING!,
clientSecret: process.env.MIRO_CLIENT_SECRET_STAGING!,
redirectUri: 'https://staging.myapp.com/auth/miro/callback',
cache: { ttlSeconds: 60 },
logLevel: 'info',
};
// config/miro.production.ts
export const miroProdConfig = {
...miroBaseConfig,
clientId: process.env.MIRO_CLIENT_ID_PROD!,
clientSecret: process.env.MIRO_CLIENT_SECRET_PROD!,
redirectUri: 'https://myapp.com/auth/miro/callback',
retries: 5, // More retries in prod
cache: { ttlSeconds: 120 },
logLevel: 'warn',
};
```
### Config Loader
```typescript
// config/index.ts
type Environment = 'development' | 'staging' | 'production';
export function loadMiroConfig() {
const env = (process.env.NODE_ENV ?? 'development') as Environment;
switch (env) {
case 'production': return miroProdConfig;
case 'staging': return miroStagingConfig;
default: return miroDevConfig;
}
}
```
## Secret Management
### Development: .env.local
```bash
# .env.local (git-ignored)
MIRO_CLIENT_ID=3458764500000001
MIRO_CLIENT_SECRET=dev_secret_here
MIRO_ACCESS_TOKEN=dev_access_token
MIRO_REFRESH_TOKEN=dev_refresh_token
MIRO_TEST_BOARD_ID=uXjVN_dev_board
MIRO_WEBHOOK_SECRET=dev_webhook_secret
```
### Staging/Production: Secret Manager
```bash
# GCP Secret Manager
gcloud secrets create miro-client-secret-staging --data-file=<(echo -n "staging_secret")
gcloud secrets create miro-client-secret-prod --data-file=<(echo -n "prod_secret")
# AWS Secrets Manager
aws secretsmanager create-secret \
--name miro/staging/client-secret \
--secret-string "staging_secret"
aws secretsmanager create-secret \
--name miro/production/client-secret \
--secret-string "prod_secret"
# HashiCorp Vault
vault kv put secret/miro/staging client_secret=staging_secret
vault kv put secret/miro/production client_secret=prod_secret
```
### CI/CD Secrets (GitHub Actions)
```bash
# Per-environment secrets
gh secret set MIRO_CLIENT_ID_DEV --body "dev_client_id"
gh secret set MIRO_CLIENT_SECRET_DEV --body "dev_client_secret"
gh secret set MIRO_CLIENT_ID_STAGING --body "staging_client_id"
gh secret set MIRO_CLIENT_SECRET_STAGING --body "staging_client_secret"
gh secret set MIRO_CLIENT_ID_PROD --body "prod_client_id"
gh secret set MIRO_CLIENT_SECRET_PROD --body "prod_client_secret"
```
## Environment Guards
Prevent production-dangerous operations in development:
```typescript
const config = loadMiroConfig();
function guardProduction(operation: string): void {
if (config.environment === 'development') {
throw new Error(`${operation} blocked in development — use staging or production`);
}
}
function guardDestructive(operation: string, boardId: string): void {
const protectedBoards = process.env.MIRO_PROTECTED_BOARDS?.split(',') ?? [];
if (protectedBoards.includes(boardId)) {
throw new Error(`${operation} blocked on protected board ${boardId}`);
}
}
// Prevent accidental deletion of production boards
async function deleteBoard(boardId: string): Promise<void> {
guardDestructive('deleteBoard', boardId);
await api.fetch(`/v2/boards/${boardId}`, 'DELETE');
}
```
## OAuth Redirect URI per Environment
Each Miro app must have its redirect URI configured to match the environment:
| Environment | Redirect URI | Where to Configure |
|-------------|-------------|-------------------|
| Development | `http://localhost:3000/auth/miro/callback` | Miro app "Dev" settings |
| Staging | `https://staging.myapp.com/auth/miro/callback` | Miro app "Staging" settings |
| Production | `https://myapp.com/auth/miro/callback` | Miro app "Production" settings |
Miro requires exact redirect URI match. No wildcards.
## Board Isolation Strategy
```typescript
// Development: Use a single dedicated test board
// Clean up after each test run
async function cleanupDevBoard(): Promise<void> {
const testBoardId = config.testBoardId;
if (!testBoardId) return;
const items = await api.fetchAll(`/v2/boards/${testBoardId}/items`);
for (const item of items) {
await api.fetch(`/v2/boards/${testBoardId}/items/${item.id}`, 'DELETE');
}
console.log(`Cleaned ${items.length} items from dev board`);
}
// Staging: Use a separate Miro workspace or team
// Production: Real user boards — never clean up automatically
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Wrong redirect URI | Env mismatch | Check Miro app settings for this environment |
| Staging token on prod board | Mixed credentials | Use separate Miro apps per env |
| Secret not found | Wrong secret path | Verify secret manager key for this env |
| Dev board full | No cleanup between runs | Run `cleanupDevBoard()` in test teardown |
## Resources
- [Miro App Settings](https://developers.miro.com)
- [GCP Secret Manager](https://cloud.google.com/secret-manager)
- [AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/)
- [12-Factor App Config](https://12factor.net/config)
## Next Steps
For observability setup, see `miro-observability`.Related Skills
windsurf-multi-env-setup
Configure Windsurf IDE and Cascade AI across team members and project environments. Use when onboarding teams to Windsurf, setting up per-project Cascade configuration, or managing Windsurf settings across development, staging, and production contexts. Trigger with phrases like "windsurf team setup", "windsurf environments", "windsurf multi-project", "windsurf team config", "cascade rules per env".
webflow-multi-env-setup
Configure Webflow across development, staging, and production environments with per-environment API tokens, site IDs, and secret management via Vault/AWS/GCP. Trigger with phrases like "webflow environments", "webflow staging", "webflow dev prod", "webflow environment setup", "webflow config by env".
vercel-multi-env-setup
Configure Vercel across development, preview, and production environments with scoped secrets. Use when setting up per-environment configuration, managing environment-specific variables, or implementing environment isolation on Vercel. Trigger with phrases like "vercel environments", "vercel staging", "vercel dev prod", "vercel environment setup", "vercel env scoping".
veeva-multi-env-setup
Veeva Vault multi env setup for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva multi env setup".
vastai-multi-env-setup
Configure Vast.ai GPU cloud across dev, staging, and production environments. Use when isolating GPU pools per team, managing API key separation by env, or implementing spending controls per deployment tier. Trigger with phrases like "vastai environments", "vastai staging", "vastai dev prod", "vastai multi-env".
supabase-multi-env-setup
Configure Supabase across development, staging, and production with separate projects, environment-specific secrets, and safe migration promotion. Use when setting up multi-environment deployments, isolating dev from prod data, configuring per-environment Supabase projects, or promoting migrations through environments. Trigger: "supabase environments", "supabase staging", "supabase dev prod", "supabase multi-project", "supabase env config", "database branching".
speak-multi-env-setup
Configure Speak across dev, staging, and production with separate API keys and mock modes. Use when implementing multi env setup, or managing Speak language learning platform operations. Trigger with phrases like "speak multi env setup", "speak multi env setup".
snowflake-multi-env-setup
Configure Snowflake across dev, staging, and production with account-level isolation, zero-copy clones, and environment-specific RBAC. Trigger with phrases like "snowflake environments", "snowflake staging", "snowflake dev prod", "snowflake clone", "snowflake environment setup".
windsurf-workspace-setup
Initialize Windsurf workspace with project-specific AI rules. Activate when users mention "create windsurfrules", "setup workspace", "configure project ai", "initialize windsurf workspace", or "migrate to windsurf". Handles workspace configuration and team standardization. Use when working with windsurf workspace setup functionality. Trigger with phrases like "windsurf workspace setup", "windsurf setup", "windsurf".
windsurf-multi-file-editing
Manage multi-file edits with Cascade coordination. Activate when users mention "multi-file edit", "edit multiple files", "cross-file changes", "refactor across files", or "batch modifications". Handles coordinated multi-file operations. Use when working with windsurf multi file editing functionality. Trigger with phrases like "windsurf multi file editing", "windsurf editing", "windsurf".
shopify-multi-env-setup
Configure Shopify apps across development, staging, and production environments with separate stores, API credentials, and app instances. Trigger with phrases like "shopify environments", "shopify staging", "shopify dev vs prod", "shopify multi-store", "shopify environment setup".
salesforce-multi-env-setup
Configure Salesforce across Developer, Sandbox, and Production environments with proper org management. Use when setting up multi-environment deployments, configuring per-environment credentials, or implementing sandbox-to-production promotion flows. Trigger with phrases like "salesforce environments", "salesforce sandbox", "salesforce dev prod", "salesforce org management", "salesforce sandbox types".