⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
dataset-doctor
Audit and repair a kohya-style LoRA dataset before training. Use when the user asks to check, validate, inspect, fix, clean, 体检, or 修 a dataset, captions, or tags. Inspect image count, repeats and step budget, resolution and aspect buckets, duplicates, corrupt or non-RGB images, missing or empty captions, trigger consistency, and tag-frequency hygiene. Return a structural PASS, WARN, or FAIL report and apply only confirmed fix_dataset.py actions, dry-run first with displaced originals quarantined.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
LoRA Training Skill Suite
Bring a folder of images. Leave with a trained LoRA.
Or bring just a name — lora-pipeline collects, curates, tags, trains, validates,
and stages a Civitai draft for you to review and publish manually.
A small family of agent skills (open SKILL.md format)
that turns LoRA training on the lora-scripts-next
trainer (a.k.a. Next Trainer / SD-Trainer) into a guided, quality-gated training
workflow with separate approval for dataset repairs and manual publishing —
Anima-first, with SD1.5 / SDXL / Flux support.
Built for Claude Code, and works in any SKILL.md-compatible agent — OpenCode, Codex CLI, OpenClaw — see Compatibility.
📖 New here? Start with docs/WALKTHROUGH.md — the full process from empty folder to published LoRA, including what to check at each stage and the captioning mistake that ruins most first attempts. For command reference and the agent contract, see GUIDE.md (English + 简体中文).
The full process at a glance
Three skills, three jobs. lora-pipeline runs all of them in order, or enter at any
stage with what you already have.
┌──────────────┐ ┌───────────────┐ ┌──────────────┐
│ 1. MAKE │──▶│ 2. VERIFY │──▶│ 3. TRAIN │
│ lora-pipeline│ │dataset-doctor │ │ lora-trainer │
└──────────────┘ └───────────────┘ └──────────────┘
collect · curate PASS/WARN/FAIL confirm card
build · caption + one-line fixes → train → snapshots
│ │ │
│ ⛔ FAIL blocks here ▼
│ (seconds, offline, 4. VALIDATE fixed-seed
│ before the GPU) gallery per checkpoint
│ │
└──────────── bring your own images ───▶ ▼
5. PUBLISH Civitai draft
🛑 you click Publish
| Stage | Skill | The question it answers |
|---|---|---|
| Make | lora-pipeline | Where do images come from, and how are they captioned? |
| Verify | dataset-doctor | Is this trainable, or will it waste 40 minutes of GPU? |
| Train | lora-trainer | What parameters — and did it actually work? |
The point of the middle stage: dataset problems are cheap to find and expensive to discover after training. The doctor is offline, takes seconds, and exits non-zero on FAIL so you can gate on it.
Why this exists
The trainer's GUI has ~80 knobs, but whether a LoRA turns out well is mostly decided before training starts:
- Dataset & caption quality — corrupt/duplicate images, missing or inconsistent captions, a diluted trigger word. The trainer never checks any of this; it only checks that the folder exists and has images.
- The step budget — repeats × images × epochs. Too low: nothing is learned. Too high: a fried, overfitted LoRA.
This suite automates both while keeping decisions explicit: reversible dataset repairs are confirmed after a dry-run, training has one plain-language confirmation card, and publishing remains a separate manual click.
What it feels like
You: Train a character LoRA from D:/data/mychar.
Agent: (detects your GPU · proposes trigger "mych4r" · organizes the folder into
kohya <repeats>_<concept> form · auto-tags with WD14 · runs the doctor ·
fixes findings with your OK · picks repeats/epochs for ~1500 steps)
📋 Confirm card — character LoRA "mych4r"
30 images × 5 repeats × 10 epochs = 1500 steps · RTX 4070 12GB → low-VRAM preset
Output: ./output/mych4r-anima-v1/ Reply "confirm" to start.
You: confirm.
Agent: (POSTs /api/run, tails the live log, then tells you which
.safetensors snapshot to try first)
Dataset repairs are dry-run first, confirmed, and reversible. Pipeline build outputs are derived artifacts: they are rebuilt from the manifest so stale files cannot leak into a run.
The skill family
| Skill | What it does |
|---|---|
lora-pipeline | End-to-end conductor. From just a character/concept name: collect images (Danbooru) → curate + build the dataset → auto-tag (WD14) and review → doctor gate → train (via lora-trainer) → validate a sample gallery (ComfyUI) → package + fill the Civitai upload wizard and stop at Draft for you to click Publish. Never trains without the confirm card; never auto-publishes. |
lora-trainer | Training-orchestration entry. Quick path needs only a folder of images: auto-organize → auto-tag → doctor gate → auto-pick params from image count + detected VRAM → one confirm card → launch & monitor via the trainer's HTTP API. An expert path accepts explicit presets/dims/LRs. |
dataset-doctor | Dataset + caption audit → PASS / WARN / FAIL verdict with prioritized fixes. Every finding maps to a one-line fix_dataset.py command — dry-run by default, originals quarantined, never deleted. |
references/ | Shared knowledge the skills cite: trainer API contract, Anima parameters, caption guide, presets, plus the collect-and-tag and validate-and-publish contracts for the full pipeline. |
lora-training-skill/
├── lora-pipeline/ # end-to-end: name → collect → … → Civitai draft
│ ├── SKILL.md # the 7-phase conductor (explicit human approvals)
│ └── scripts/
│ ├── collect.py # Danbooru download (2-tag-safe config)
│ ├── curate.py # drop multi/comic/tiny/corrupt → keep/drop manifest
│ ├── build_dataset.py # copy keeps → <repeats>_<concept>/, RGB-normalize
│ ├── tag_dataset.py # Anima WD14 tagging (section order + reviewable trait audit)
│ ├── validate.py # ComfyUI Anima+LoRA sample gallery
│ └── make_civitai_pack.py # assemble model card + *.civitai.json + samples/
├── lora-trainer/
│ └── SKILL.md # quick path (folder → confirm card → train) + expert path
├── dataset-doctor/
│ ├── SKILL.md # audit & fix playbook
│ ├── scripts/
│ │ ├── _common.py # shared helpers (layout, captions, severity, io)
│ │ ├── scan_dataset.py # image-level scan (resolution, dupes, modes, steps)
│ │ ├── check_captions.py # caption-level audit (trigger, tags, JSON, hygiene)
│ │ ├── doctor.py # orchestrator → PASS/WARN/FAIL verdict
│ │ └── fix_dataset.py # safe fixer: organize/dedupe/to-rgb/add-trigger/strip-tags
│ └── tests/ # dataset-doctor behavior tests
├── lora-pipeline/tests/ # focused pipeline integration tests
├── tests/ # public skill package and metadata tests
└── references/
├── trainer-api.md # mikazuki HTTP API (/api/run, /api/interrogate, SSE)
├── anima-params.md # params, defaults, VRAM table, step-budget math
├── caption-guide.md # verified caption format, trigger words, tag hygiene
├── presets.md # /api/run body templates (character / style / low-VRAM)
├── collect-and-tag.md # Danbooru + sd-image-sorter WD14 contracts (pipeline front half)
└── validate-and-publish.md # ComfyUI validation + civitai-uploader contract (back half)
How a run flows
Training-only (lora-trainer, when you already have images):
image folder
│ organize (<repeats>_<concept>) fix_dataset.py · dry-run → confirm → --apply
│ auto-caption (Anima) tag_dataset.py + sd-image-sorter
▼
dataset-doctor gate doctor.py → PASS / WARN / FAIL
│ fix findings (dedupe, to-rg
// HOW IT'S BUILT
KEY FILES