К основному содержанию
скилл CX Codex

layer-image-editing — скилл для Claude Code: правка готовых картинок

Скилл для редактирования уже существующих изображений на Layer: инпейнтинг, расширение кадра, смена ракурса, апскейл.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add layerai/skills --skill layer-image-editing -a claude-code
Открыть на GitHub

Что делает layer-image-editing

Скилл учит агента выбирать правильный filter.use_case под задачу. Изменить одну область и не тронуть остальное — inpainting с init_image и маской. Переписать всю картинку по инструкции — image_editing. Расширить кадр или подогнать под другой формат — reframing. Показать тот же объект с другого ракурса — multi_angle с параметром camera. Разложить на слои, вырезать фон, увеличить разрешение — отдельные сценарии.

Главное правило: каждая правка — это новая генерация, которая перерисовывает изображение целиком. Цвета уезжают, лицо теряет сходство, логотип разваливается. Поэтому если правка вышла неудачной, скилл советует вернуться к исходнику и переписать инструкцию, а не чинить поверх. Исключение — независимые области: маска на левую лампу и маска на правую не пересекаются и складываются чисто.

Апскейл идёт через filter.use_case: "upscaling", а не через генеративную модель: перерисовка в большем размере даёт новую картинку, лишь похожую на утверждённую. Для ракурсов нужна модель с camera_transform. Скилл опирается на соседний layer — если его нет среди доступных, попросит поставить: npx skills add layerai/skills --skill <name>.

Какие задачи решает

  • изменить одну область картинки и сохранить остальное нетронутым
  • расширить кадр за текущие границы
  • подогнать изображение под другой формат
  • показать персонажа с другого ракурса
  • вырезать фон или разложить арт на слои

Примеры запросов агенту

  • расширь этот портрет до 9:16, персонажа и свет не трогай
  • убери фон у этого изображения
  • покажи этого персонажа со спины

Как установить layer-image-editing

1Через Skills CLI (Vercel)

npx skills add layerai/skills --skill layer-image-editing -a claude-code

2Вручную: положить файлы

~/.claude/skills/layer-image-editing/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/layer-image-editing/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о layer-image-editing

Как установить layer-image-editing в Claude?

Выполните npx skills add layerai/skills --skill layer-image-editing -a claude-code. Скилл встанет в ~/.claude/skills/layer-image-editing/SKILL.md.

Что делает layer-image-editing?

Подбирает нужный use_case для правки существующего изображения: инпейнтинг, редактирование по инструкции, расширение кадра, смена ракурса, апскейл, вырезание фона, разбор на слои.

Почему нельзя править поверх предыдущей правки?

Каждый проход перерисовывает изображение целиком, поэтому правки накапливают искажения. Скилл советует возвращаться к исходнику и переписывать инструкцию.

Исходный текст

SKILL.md · MIT
---
name: layer-image-editing
description: "Use when changing an image that already exists on Layer rather than generating a new one: editing or replacing part of it, inpainting with a mask, outpainting or extending the frame, reframing to another aspect ratio, relighting, restyling, re-rendering from another camera angle, splitting into layers, removing a background, vectorising, or upscaling. Keywords: img2img, edit, inpaint, outpaint, mask, expand, turnaround, upscale, background removal, PSD, layers."
license: MIT
---

# Layer Image Editing

## Overview

Editing is not generation with an image attached. Each intent maps to its own `use_case`, and picking
the wrong one is the usual reason an edit changes things it should not have touched.

| The user wants                         | `filter.use_case`    | Attach                            |
| -------------------------------------- | -------------------- | --------------------------------- |
| Change one region, keep the rest exact | `inpainting`         | `init_image` plus a `mask`        |
| Change the whole image by instruction  | `image_editing`      | `init_image`                      |
| Extend past the current frame          | `reframing`          | `init_image`                      |
| Fit another aspect ratio               | `reframing`          | `init_image`                      |
| The same subject from another angle    | `multi_angle`        | `init_image` or `reference_image` |
| Separate, editable layers              | `split_into_layers`  | `init_image`                      |
| Cut the subject out                    | `background_removal` | `init_image`                      |
| More pixels, same picture              | `upscaling`          | `init_image`                      |
| Clean line art into finished art       | `image_editing`      | `lineart` or `scribble`           |
| A crisp SVG from a raster              | `vectorization`      | `init_image`                      |

The loop and the spend gate are in the `layer` skill. 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.

## Edit from the source, not from the last edit

Every edit pass is a fresh generation that re-renders the whole image, so each one drifts a little:
colours shift, a face loses its likeness, a logo degenerates. Three passes stacked on each other look
visibly worse than one pass that does all three things.

So when an edit is wrong, go back to the original and write a better instruction. Do not correct the
correction. Output assets carry a `file_id`, so the original is always one argument away.

The exception is genuinely independent regions: masking the left lamp and then masking the right lamp
touches disjoint pixels and stacks cleanly.

## Masks

A mask marks what may change. Supply it as an uploaded `file_id`, or use the `for_transparency` and
`for_nontransparency` flags when the image's own alpha channel already describes the region, which
saves authoring a mask by hand for an asset that is already cut out.

Mask edges matter. A hard-edged mask on a soft-edged subject leaves a halo. When the boundary is hair,
smoke, or glass, prefer an instruction edit over a mask, because the model resolves the boundary
better than your rectangle does.

## What to hold constant

State it in the instruction. Models are literal about what you mention and careless about what you
do not, so "change the banner to red, keep the pose, lighting, and armour exactly as they are" is a
materially different instruction from "make the banner red". The clause costs six words and saves a
reroll.

## Angles are not a prompt trick

"The same character from behind" appended to a text-to-image prompt produces a different character.
Re-rendering an existing asset from another view needs `multi_angle`, a model whose capabilities
report `camera_transform`, and the view supplied through the structured `camera` parameter, which
orbits to side, back, or top, or zooms. Attach the source with the guidance type that model accepts.

## Upscaling

Upscaling adds resolution without changing what the picture depicts. It must never route through a
generation model: re-rendering at a larger size is a new image that merely resembles the approved
one, and approved art has to survive the step unchanged. Use `filter.use_case: "upscaling"`.

## Layers

`split_into_layers` produces genuinely separate, independently editable elements, for rigging,
parallax, or compositing. Before reaching for it, check what the user actually wants: "give me a PSD"
usually means "give me the art with a transparent background", which is `background_removal` and far
cheaper. Ask which one they mean when the request is ambiguous.

## Worked example

"Take this approved hero portrait and make a 9:16 version for the store."

1. The intent is `reframing`, not a reroll of the portrait. Generating it again loses the approval.
2. `list_base_models` with `filter.use_case: "reframing"`, take the first result.
3. The portrait came from an earlier run, so it already has a `file_id`. No upload.
4. `estimate_forge_price` with that file as `init_image`, the target ratio, and an instruction
   naming what must not change: "extend the scene above and below, keep the character, crop, and
   lighting untouched." Above 20 CUs, present the table and wait for an explicit yes.
5. `execute_forge` with exactly those arguments, then poll `get_forge_run` at
   `poll_interval_seconds`.
6. Present the result beside the original so the user can confirm the subject survived.

## Common mistakes

- Stacking edits on edits instead of returning to the source image.
- Using `image_editing` when only one region should change, then explaining the collateral damage.
- Omitting what must stay constant.
- Appending "from behind" to a prompt instead of using `multi_angle` with `camera`.
- Re-rendering an approved asset through a generation model to make it bigger.
- Reaching for `split_into_layers` when the user just wants a transparent background.
- Uploading an asset Layer already produced, which already has a `file_id`.

© layerai · MIT · layerai/skills

Похожие скиллы

Всё по теме «ИИ и ML» →
scenario-image-editing scenario-labs Обрабатывает готовые изображения через MCP-модели Scenario: апскейлит картинки, правит цвета по LUT и удаляет водяные знаки. Пригодится для пакетного пост-процессинга без промптов. CX Codex +1 443установок ai-image-generation 101-skills Создаёт и редактирует изображения через belt с выбором модели. Пригодится для иллюстраций, макетов и обработки готовых картинок. CX Codex +1 870 900установок image-inpainting prime-skills Локально редактирует участки изображений по маске через утилиту runcomfy. Вырезает объекты, убирает водяные знаки или заменяет фон по текстовому описанию. CX Codex +1 377 700установок fal-image-edit nexu-io Скилл подключает редактирование картинок через модели fal.ai. Помогает убирать фон, удалять объекты, переносить стиль и дорисовывать области через инпейнтинг. CX Codex +1 2 700установок image-editing vivy-yi Руководство по обработке снимков под Xiaohongshu с готовыми формулами коррекции света и цвета. Помогает выстроить единый визуальный стиль публикаций. CX Codex +1 432установок

Из того же набора7

layer-quality Оценивает сгенерированные файлы Layer по правилам студии и помогает выбрать, что отдавать. Нужен перед сдачей партии ассетов. CX Codex +1 3 300установок layer-workflows Скилл для запуска сохранённых воркфлоу Layer Blueprint: находит пайплайн в рабочем пространстве, читает его схему входов, оценивает цену и следит за шагами. CX Codex +1 3 400установок layer-3d Ведёт агента по цепочке 3D-пайплайна Layer: сгенерировать меш, пересобрать топологию, наложить текстуры, поставить скелет и анимацию. CX Codex +1 3 300установок layer-video Скилл для генерации видео через Layer: текст в видео, оживление кадра, продление клипа, камера, звук и липсинк. Пригодится, когда промпт даёт не то движение. CX Codex +1 3 400установок layer-video-timeline Собирает готовые клипы, картинки и аудио в один ролик: порядок, переходы, титры, логотип, музыка. Нужен, когда монтаж идёт из уже сгенерированных шотов. CX Codex +1 3 300установок layer-image Скилл для text-to-image через Layer: подсказывает, что писать в промпте, как задать пропорции и когда нужна референс-картинка. CX Codex +1 3 300установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой