add-ecosystem
Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model…
Wire an existing ecosystem into the LoRA training system so it appears as a trainable base model in the training form. Adds the base-model entry, schema enums, orchestrator validation, feature flag, and per-ecosystem default params. Use when a model family (already in
$ npx -y skills add civitai/civitai --skill add-training-support --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/add-training-supportContext preview
The summary Claude sees to decide when to auto-load this skill.
Wire an existing ecosystem into the LoRA training system so it appears as a trainable base model in the training form. Adds the base-model entry, schema enums, orchestrator validation, feature flag, and per-ecosystem default params. Use when a model family (already in
name: add-training-support description: Wire an existing ecosystem into the LoRA training system so it appears as a trainable base model in the training form. Adds the base-model entry, schema enums, orchestrator validation, feature flag, and per-ecosystem default params. Use when a model family (already in basemodel.constants.ts) needs training support — e.g. AI-Toolkit ecosystems like Anima, HiDream, Boogu. Always checks @civitai/client for the ecosystem's training input type first.
Wires an existing ecosystem into the **training** form (the "Train a LoRA" flow), distinct from the generation form. After this, the ecosystem shows up as a selectable base model in Training Step 1 and submits a valid `training` step to the orchestrator.
Training is a **separate subsystem from generation**. The generation handlers/graphs in `src/server/services/orchestrator/ecosystems/*` and `src/shared/data-graph/generation/*` are NOT part of this — do not touch them. The files below are the training path.
The ecosystem, base model, family and license must already exist in [basemodel.constants.ts](src/shared/constants/basemodel.constants.ts) (`ECO.<Name>`, an `EcosystemRecord`, a `BaseModelRecord`). If any are missing, run **add-ecosystem** first.
Almost every ecosystem added recently is **AI-Toolkit-based** (engine `'ai-toolkit'`, mandatory). The worked reference is **`anima`** — it is the simplest complete example (image, AI-Toolkit-only, no `modelVariant`). The single highest-leverage move when adding a new ecosystem: **grep every file below for `anima` and add a parallel entry.**
**Always** confirm the SDK ships the ecosystem's training type before wiring. It tells you the exact field shape, whether `modelVariant` is required, and any fixed fields.
grep -niE "<Name>AiToolkitTrainingInput|ecosystem: '<name>'" \ node_modules/@civitai/client/dist/generated/types.gen.d.ts
Note from the type:
for this ecosystem". Honor these in the UI param bounds.
computed; never send them.
If the type is missing in the installed version, check the latest (`npm view @civitai/client versions --json | tail`) and bump with `pnpm add @civitai/client@<v>`. If still absent, the orchestrator dispatch (`training.orch.ts`) already casts `ecosystem as any`, so it works — but prefer a typed SDK.
Get these from the user, the model card, or an orchestrator `whatif` sample request:
sample as a placeholder and leave a comment to swap in `urn:air:<eco>:checkpoint:civitai:<modelId>@<versionId>` once uploaded. For AI-Toolkit-only ecosystems this AIR is NOT sent to the orchestrator (it resolves the base model from the ecosystem); it's used for UI display / `getTrainingFields.getModel`.
Pick a stable **base-model key** (the `trainingModelInfo` key, e.g. `boogu`) and a **baseType** (the `TrainingBaseModelType`, e.g. `'boogu'`). They can differ (SD has `sd_1_5`/`anime`/… keys all mapping to baseType `sd15`), but for a single-checkpoint ecosystem keep them the same.
Adding training support for: <Name> (baseType: <baseType>, key: <key>) Engine: ai-toolkit (mandatory) Variant: <none | enum> Defaults: steps <n>, lr <n>, dim/alpha <n>/<n>, scheduler <x>, batch <n> (max <n>), res <n> AIR: <placeholder|civitai urn> Feature flag: <name>Training / <name>-training (Flipt)
Wait for confirmation, then make all edits in one pass.
1. **`trainingBaseModelTypesImage`** (or `…Video` / `…Audio`) — add `'<baseType>'`. 2. **`aiToolkitStepDefault`** — add a branch returning the ecosystem's default steps if it differs from 2000. 3. **`aiToolkitBatchMax`** — add a branch only if max batch > 1 (default returns 1). 4. **`trainingModelInfo`** — add the `<key>: { label, pretty, type: '<baseType>', description, air, baseModel: '<BaseModelName>', isNew: true, aiToolkit: { ecosystem: '<eco>' [, modelVariant] } }` entry. `baseModel` MUST match the `BaseModelRecord.name` / ecosystem `key` in basemodel.constants.ts exactly (a mismatch produces a malformed AIR on training completion and fails the post-train scan with 400 — see the inline comment on the `hidream_o1` entry). 5. **`baseTypeToEcosystem`** — add `<baseType>: '<eco>'`. 6. **`isAiToolkitSupported`** `supportedTypes` — add `'<baseType>'`. 7. **`isAiToolkitMandatory`** `mandatoryTypes` — add `'<baseType>'` (for AI-Toolkit-only ecosystems). This auto-enables sample-prompt requirements and AI-Toolkit gating. 8. **`getDefaultEngine`** — add `if (baseType === '<baseType>') return 'ai-toolkit';`.
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…
Deterministically drive a first-party Civitai App Block in the operator's browser and produce…
Take a first-party Civitai App Block from functional to considered — the repeatable…