xiaohongshu
xiaohongshu
clay-multi-env-setup
Configure Clay across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific Clay configurations. Trigger with phrases like "clay environments", "clay staging", "clay dev prod"...
Full skill instructions
Configure Clay across development, staging, and production environments.
| Environment | Purpose | API Keys | Data |
|---|---|---|---|
| Development | Local dev | Test keys | Sandbox |
| Staging | Pre-prod validation | Staging keys | Test data |
| Production | Live traffic | Production keys | Real data |
config/
├── clay/
│ ├── base.json # Shared config
│ ├── development.json # Dev overrides
│ ├── staging.json # Staging overrides
│ └── production.json # Prod overrides
{
"timeout": 30000,
"retries": 3,
"cache": {
"enabled": true,
"ttlSeconds": 60
}
}
{
"apiKey": "${CLAY_API_KEY}",
"baseUrl": "https://api-sandbox.clay.com",
"debug": true,
"cache": {
"enabled": false
}
}
{
"apiKey": "${CLAY_API_KEY_STAGING}",
"baseUrl": "https://api-staging.clay.com",
"debug": false
}
{
"apiKey": "${CLAY_API_KEY_PROD}",
"baseUrl": "https://api.clay.com",
"debug": false,
"retries": 5
}
// src/clay/config.ts
import baseConfig from '../../config/clay/base.json';
type Environment = 'development' | 'staging' | 'production';
function detectEnvironment(): Environment {
const env = process.env.NODE_ENV || 'development';
const validEnvs: Environment[] = ['development', 'staging', 'production'];
return validEnvs.includes(env as Environment)
? (env as Environment)
: 'development';
}
export function getClayConfig() {
const env = detectEnvironment();
const envConfig = require(`../../config/clay/${env}.json`);
return {
...baseConfig,
...envConfig,
environment: env,
};
}
# .env.local (git-ignored)
CLAY_API_KEY=sk_test_dev_***
env:
CLAY_API_KEY: ${{ secrets.CLAY_API_KEY_${{ matrix.environment }} }}
# AWS Secrets Manager
aws secretsmanager get-secret-value --secret-id clay/production/api-key
# GCP Secret Manager
gcloud secrets versions access latest --secret=clay-api-key
# HashiCorp Vault
vault kv get -field=api_key secret/clay/production
// Prevent production operations in non-prod
function guardProductionOperation(operation: string): void {
const config = getClayConfig();
if (config.environment !== 'production') {
console.warn(`[clay] ${operation} blocked in ${config.environment}`);
throw new Error(`${operation} only allowed in production`);
}
}
// Usage
async function deleteAllData() {
guardProductionOperation('deleteAllData');
// Dangerous operation here
}
const featureFlags: Record<Environment, Record<string, boolean>> = {
development: {
newFeature: true,
betaApi: true,
},
staging: {
newFeature: true,
betaApi: false,
},
production: {
newFeature: false,
betaApi: false,
},
};
Set up the base and per-environment configuration files.
Add logic to detect and load environment-specific config.
Store API keys securely using your secret management solution.
Implement safeguards for production-only operations.
| Issue | Cause | Solution |
|---|---|---|
| Wrong environment | Missing NODE_ENV | Set environment variable |
| Secret not found | Wrong secret path | Verify secret manager config |
| Config merge fails | Invalid JSON | Validate config files |
| Production guard triggered | Wrong environment | Check NODE_ENV value |
const env = getClayConfig();
console.log(`Running in ${env.environment} with ${env.baseUrl}`);
For observability setup, see clay-observability.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience