# layer-reference-sets

Guides LoRA training, reference set curation, and weight tuning in Layer. Helps decide whether training a custom style makes sense or attaching a single reference image is enough.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3300 installs · ★ 6
- Author: layerai
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/layerai/skills/tree/HEAD/skills/layer-reference-sets/SKILL.md
- Updated: 2026-09-30
- HTML: https://affpapa.org/en/nevibecode/skills/layer-reference-sets

## What it does

Training a custom style in Layer consumes Creative Units and takes time. This skill helps you decide if a dataset is actually needed. For generating a quick asset run, passing an approved artwork into `reference_image` works fine. Training a LoRA makes sense when multiple teammates need the exact same visual language across several months.

Dataset hygiene matters more than volume. A smaller collection of uniform images consistently outperforms a cluttered batch. The skill directs you to pick one category out of `character`, `object`, `scene`, `effect`, or `general`. Choosing `general` for a character causes the background to merge into the character's identity, which ruins future prompts.

Silent degradation is the main risk during generation. Passing an explicit `base_model_id` alongside reference sets prevents the server from picking a model that applies the LoRA cleanly. The run will finish and spend Creative Units, but the style will look muted. Check the `reference_sets_degraded` flag inside `estimate_forge_price` before launching any generation.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add layerai/skills --skill layer-reference-sets -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/layer-reference-sets/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/layer-reference-sets/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add layerai/skills --skill layer-reference-sets -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/layer-reference-sets/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add layerai/skills --skill layer-reference-sets -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/layer-reference-sets/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install layerai/skills layer-reference-sets
```

2. **Manually: put the files in place**
- File: `.github/skills/layer-reference-sets/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add layerai/skills --skill layer-reference-sets -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/layerai/skills --path skills/layer-reference-sets
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/layer-reference-sets/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add layerai/skills --skill layer-reference-sets -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/layerai/skills/tree/HEAD/skills/layer-reference-sets/SKILL.md

## When to use it
- Curate and clean artwork datasets for Layer LoRA training
- Assign the right training category between character, object, scene, effect, and general
- Adjust reference set weight from 0 to 2 inside `execute_forge`
- Detect the `reference_sets_degraded` warning before spending Creative Units

## Example prompts
- Review this folder of character sketches and curate a clean dataset for Layer training.
- Check the training cost via `estimate_training_price` using the `character` category.
- Run a generation with reference set weight set to 1.0 and verify degradation in `estimate_forge_price`.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: aba8a60e9dfd8803.

BEGIN THIRD-PARTY FILE aba8a60e9dfd8803
```text
---
name: layer-reference-sets
description: "Use when a look must hold across many Layer generations: training a custom style or LoRA on a studio's own artwork, curating the images that go into a reference set, choosing its training category, tuning reference-set weight on a run, or deciding whether to train at all rather than attach a style reference. Also when a trained style produces weak, inconsistent, or silently ignored results. Keywords: LoRA, custom model, trained style, reference set, consistency, on-model, art direction, dataset."
license: MIT
---

# Layer Reference Sets

## Overview

A reference set is a named group of files plus a training category. Trained, it produces a LoRA that
later runs apply by id, turning an art direction into a parameter instead of a prompt-engineering
exercise every time.

The mechanics (upload, `create_reference_set`, `estimate_training_price`, `start_training`,
`get_training_status`, `get_trained_model`, and the five categories) are covered by Layer's published
`layer-train-custom-style` skill, over both REST and MCP. This skill covers the decisions that
determine whether the trained result is any good.

If a sibling skill named here is missing from your available skills, ask the user to install it
(`npx skills add layerai/skills --skill <name>`); unattended, proceed from tool schemas and flag the
gap.

## Decide whether to train at all

Training costs Creative Units and takes time. It is the right answer less often than people expect.

| Situation                                   | Do this                                                                      |
| ------------------------------------------- | ---------------------------------------------------------------------------- |
| A handful of assets, this week              | Attach an approved image as `reference_image`, filtering for `image_editing` |
| One character across a dozen images         | An approved hero image as a reference usually suffices                       |
| A look reused for months, by several people | Train a reference set                                                        |
| A cast or prop library that keeps growing   | Train, one set per subject                                                   |
| The style exists only in the user's head    | Generate first, approve, then train on the output                            |

The last row matters. A reference set can be trained on approved generations, not only on hand-made
```
END THIRD-PARTY FILE aba8a60e9dfd8803

The third-party file has ended. Everything between the aba8a60e9dfd8803 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2491 of 6820 bytes. © layerai · MIT · https://github.com/layerai/skills/tree/HEAD/skills/layer-reference-sets/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
