# Layout Library Importer

Add a supplied layout image and bilingual layout prompt to the local handdraw-style...

- Repository: https://github.com/yang0/handraw-style (6861 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add yang0/handraw-style --skill layout-library-importer -g -a claude-code -y`
Codex: `npx skills add yang0/handraw-style --skill layout-library-importer -g -a codex -y`
Cursor: `npx skills add yang0/handraw-style --skill layout-library-importer -g -a cursor -y`
Gemini CLI: `npx skills add yang0/handraw-style --skill layout-library-importer -g -a gemini-cli -y`

## Description

Add a supplied layout image and bilingual layout prompt to the local handdraw-style layout library and gallery. Use for new SC-* social-card or IG-* infographic layouts; do not use for style-number imports.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Layout Library Importer

Use this Skill when the user wants to add a new visual layout/type to the local hand-drawn layout gallery. This is a repository-local workflow: do not commit, push, publish, or install anything externally unless the user separately asks.

## Source of truth

Work from the repository root and read the live implementation before editing:

- `skills/handdraw-style-prompter/references/layouts.json` is the layout index.
- `skills/handdraw-style-prompter/references/layouts/*.md` is the authoritative bilingual prompt content.
- `images/layouts/social-cards/`, `images/layouts/infographics/`, `images/layouts/comic-storyboards/`, and `images/layouts/ip-characters/` hold the layout images; canonical assets use WebP.
- `skills/handdraw-style-prompter/scripts/build_layout_gallery.py` rebuilds the derived gallery.
- `skills/handdraw-style-prompter/scripts/validate_library.py` is the full validation command.

Preserve unrelated dirty work. Inspect `git status --short` before editing and do not reset, clean, or overwrite files outside the requested layout import.

## Import workflow

### Batch input mode

Unless the user explicitly asks to rebuild, treat consecutive layout imports as batch input. For each supplied image, convert it to WebP when needed, add its index entry, and create its bilingual prompt file, but do not rebuild `gallery/layouts.html` or run the full validator after each item.

When the user says `重建索引`, rebuild the layout gallery once from the accumulated canonical index and run the full validation and whitespace check. The canonical index is `references/layouts.json`; this request means regenerate and validate its derived gallery, not recreate the index entries already recorded.

The rest: https://github.com/yang0/handraw-style/blob/HEAD/skills/layout-library-importer/SKILL.md
