add-ecosystem
Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model…
Set up and manage RGB mode for local development — test green, blue, and red domains simultaneously.
$ npx -y skills add civitai/civitai --skill rgb-proxy --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/rgb-proxyContext preview
The summary Claude sees to decide when to auto-load this skill.
Set up and manage RGB mode for local development — test green, blue, and red domains simultaneously.
Set up and manage RGB mode for local development — test green, blue, and red domains simultaneously.
Use when the user asks to "set up RGB mode", "enable RGB proxy", "test green/blue/red domains", or "run RGB mode".
RGB mode lets you test all three Civitai domain colors (green, blue, red) locally by running a reverse proxy that maps:
The Next.js app reads the `Host` header to determine which domain color is active, enabling domain-specific feature flags and theming.
Run these steps in order. The skill handles everything except the hosts file (which requires user action).
Check if the repo exists at a reasonable location. Common spots:
If not found, clone it:
git clone https://github.com/civitai/rgb-proxy.git <chosen-path>
cd <proxy-path> && npm install
Detect the OS and provide the right instructions:
**Windows:**
Edit C:\Windows\System32\drivers\etc\hosts (run editor as Administrator) Add these lines: 127.0.0.1 civitai-dev.green 127.0.0.1 civitai-dev.red 127.0.0.1 civitai-dev.blue
**macOS/Linux:**
sudo nano /etc/hosts Add these lines: 127.0.0.1 civitai-dev.green 127.0.0.1 civitai-dev.red 127.0.0.1 civitai-dev.blue
Ask the user to confirm they've done this before proceeding.
In the model-share `.env` file, ensure these values are set (comment out the non-RGB defaults):
# Non-RGB defaults (comment these out) # NEXTAUTH_URL=http://localhost:3000 # SERVER_DOMAIN_BLUE=localhost:3000 # RGB Mode AUTH_TRUST_HOST=true NEXTAUTH_URL=https://civitai-dev.blue NEXTAUTH_URL_INTERNAL=http://localhost:3000 SERVER_DOMAIN_GREEN=civitai-dev.green SERVER_DOMAIN_BLUE=civitai-dev.blue SERVER_DOMAIN_RED=civitai-dev.red # Optional alias hosts (comma-separated). Resolve to the same color on inbound # requests but never appear in outbound URLs. Use to test multi-host-per-color # behavior locally. # SERVER_DOMAIN_BLUE_ALIASES=civitai-dev.cyan
To exercise the alias-host code path locally:
1. Add a fourth hostname to your hosts file (e.g. `127.0.0.1 civitai-dev.cyan`). 2. Set `SERVER_DOMAIN_BLUE_ALIASES=civitai-dev.cyan` in `.env`. 3. Add a matching `proxy.register('civitai-dev.cyan', 'http://localhost:3000', { ssl: { ... } })` entry to `rgb-proxy/index.mjs` (and generate certs if needed). 4. Restart the proxy and dev server. 5. `https://civitai-dev.cyan` resolves to color `blue` but uses its own host header — verify the login page hides any provider that lacks an alias-keyed credential, and shows a "Continue on civitai-dev.blue" fallback button.
To test alias-keyed OAuth credentials: set `DISCORD_AUTH_civitai_dev_cyan=clientid,secret` (slug is the host with non-alphanumeric characters replaced by `_`). Providers without an `<UPPER>_AUTH_<slug>` env var are hidden on the alias.
cd <proxy-path> && npm start
Run this with `run_in_background=true` so it stays running.
The proxy requires ports 80 and 443. On Windows, run the terminal as Administrator. On macOS/Linux, use `sudo npm start`.
The env var changes require a dev server restart. Use the `/dev-server` skill to restart it.
The browser will warn about self-signed certificates — accept/bypass the warning.
To go back to normal single-domain development:
1. Stop the proxy process 2. In `.env`, swap back to non-RGB defaults:
NEXTAUTH_URL=http://localhost:3000 SERVER_DOMAIN_BLUE=localhost:3000 # Comment out or remove the RGB-specific lines
3. Restart the dev server
Repo: civitai/civitai
Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model…
Wire an existing ecosystem into the generation system. Adds generation support to…
Author a prompt-enhancement system prompt for a new ecosystem and register/update it on the…
Add a new trainable base model to BOTH trainers end-to-end — the in-app trainer (main Next.js…
Wire an existing ecosystem into the LoRA training system so it appears as a trainable base…
Deterministically drive a first-party Civitai App Block in the operator's browser and produce…