# yang0/handraw-style architecture

> Architecture diagram of the GitHub repository yang0/handraw-style, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yang0/handraw-style
- Repository: https://github.com/yang0/handraw-style

## Overview

Hand-drawn Style & Layout Prompter is a prompt-authoring skill and visual reference library. Creators choose a theme and optionally style, layout, color, or output mode; the prompt skill assembles bilingual image-generation instructions, with model capability data determining whether to include a style reference image. Separate skills cover posters, article covers, and long-article illustration planning and Markdown insertion. The repository also supplies browsable galleries and custom asset management. Relationships among the prompt components are based on sampled source references; broader skill workflows are documented in the README.

Main entry points: [`skills/handdraw-style-prompter/scripts/resolve_reference.py`](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/resolve_reference.py) (Reference resolver), [`skills/handdraw-style-prompter/scripts/prompt_style.py`](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/prompt_style.py) (Prompt composer), [`skills/handdraw-style-prompter/scripts/layout_library.py`](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/layout_library.py) (Layout resolver), [`skills/handdraw-style-prompter/SKILL.md`](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/SKILL.md) (Prompt skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prompting["Prompt authoring"]
  node_prompt_skill["Prompt skill<br/>[SKILL.md]"]
  node_composer["Prompt composer<br/>[prompt_style.py]"]
  node_poster_skill["Poster prompts<br/>[SKILL.md]"]
end

subgraph group_references["Visual references"]
  node_style_catalog["Style catalog<br/>[styles.json]"]
  node_layout_resolver["Layout resolver<br/>[layout_library.py]"]
  node_layout_catalog["Layout catalog<br/>[layouts.json]"]
  node_layout_prompts["Layout prompts"]
  node_color_catalog["Color catalog<br/>[colors.json]"]
  node_model_policy["Model policy"]
  node_reference_resolver["Reference resolver"]
  node_style_images["Style reference images"]
end

subgraph group_article["Article workflows"]
  node_cover_skill["Article cover design<br/>[SKILL.md]"]
  node_planner_skill["Illustration planning<br/>[SKILL.md]"]
  node_markdown_inserter["Markdown inserter"]
end

subgraph group_assets["Assets and browsing"]
  node_custom_manager["Custom asset manager"]
  node_style_gallery["Style gallery<br/>[index.html]"]
  node_layout_gallery["Layout gallery<br/>[layouts.html]"]
  node_color_gallery["Color gallery<br/>[colors.html]"]
  node_tutorial_gallery["Prompt assembler gallery<br/>[tutorials.html]"]
end

node_creator(("Creator"))
node_image_tool(("Image-generation tool"))

node_creator -->|"requests prompts"| node_prompt_skill
node_prompt_skill -.->|"uses composer"| node_composer
node_composer -->|"resolves layouts"| node_layout_resolver
node_composer -->|"resolves references"| node_reference_resolver
node_layout_resolver -->|"loads layouts"| node_layout_catalog
node_layout_resolver -->|"reads prompts"| node_layout_prompts
node_reference_resolver -->|"reads styles"| node_style_catalog
node_reference_resolver -->|"reads policy"| node_model_policy
node_reference_resolver -->|"selects reference"| node_style_images
node_creator -->|"requests poster"| node_poster_skill
node_creator -->|"requests cover"| node_cover_skill
node_creator -->|"requests illustrations"| node_planner_skill
node_planner_skill -->|"inserts images"| node_markdown_inserter
node_creator -->|"uses prompt"| node_image_tool
node_creator -.->|"manages assets"| node_custom_manager
node_creator -->|"browses styles"| node_style_gallery
node_creator -->|"browses layouts"| node_layout_gallery
node_creator -->|"browses colors"| node_color_gallery
node_creator -.->|"assembles prompts"| node_tutorial_gallery
node_creator -->|"chooses colors"| node_color_catalog

click node_prompt_skill "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/SKILL.md"
click node_composer "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/prompt_style.py"
click node_style_catalog "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/styles.json"
click node_layout_resolver "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/layout_library.py"
click node_layout_catalog "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/layouts.json"
click node_layout_prompts "https://github.com/yang0/handraw-style/tree/master/skills/handdraw-style-prompter/references/layouts"
click node_color_catalog "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/colors.json"
click node_model_policy "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/model_capabilities.json"
click node_reference_resolver "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/resolve_reference.py"
click node_style_images "https://github.com/yang0/handraw-style/tree/master/images/individual"
click node_poster_skill "https://github.com/yang0/handraw-style/blob/master/skills/poster-prompt-generator/SKILL.md"
click node_cover_skill "https://github.com/yang0/handraw-style/blob/master/skills/article-cover-designer/SKILL.md"
click node_planner_skill "https://github.com/yang0/handraw-style/blob/master/skills/article-illustration-planner/SKILL.md"
click node_markdown_inserter "https://github.com/yang0/handraw-style/blob/master/skills/article-illustration-planner/scripts/insert_illustrations.py"
click node_custom_manager "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/custom_library_manager.py"
click node_style_gallery "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/index.html"
click node_layout_gallery "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/layouts.html"
click node_color_gallery "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/colors.html"
click node_tutorial_gallery "https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/tutorials.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_prompt_skill,node_composer,node_poster_skill toneBlue
class node_style_catalog,node_layout_resolver,node_layout_catalog,node_layout_prompts,node_color_catalog,node_model_policy,node_reference_resolver,node_style_images toneAmber
class node_cover_skill,node_planner_skill,node_markdown_inserter toneMint
class node_custom_manager,node_style_gallery,node_layout_gallery,node_color_gallery,node_tutorial_gallery toneRose
class node_creator,node_image_tool toneIndigo
```

## Components

### Prompt authoring

- [Prompt skill](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/SKILL.md): `skills/handdraw-style-prompter/SKILL.md`
- [Prompt composer](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/prompt_style.py): `skills/handdraw-style-prompter/scripts/prompt_style.py`
- [Poster prompts](https://github.com/yang0/handraw-style/blob/master/skills/poster-prompt-generator/SKILL.md): `skills/poster-prompt-generator/SKILL.md`

### Visual references

- [Style catalog](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/styles.json): `skills/handdraw-style-prompter/references/styles.json`
- [Layout resolver](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/layout_library.py): `skills/handdraw-style-prompter/scripts/layout_library.py`
- [Layout catalog](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/layouts.json): `skills/handdraw-style-prompter/references/layouts.json`
- [Layout prompts](https://github.com/yang0/handraw-style/tree/master/skills/handdraw-style-prompter/references/layouts): `skills/handdraw-style-prompter/references/layouts`
- [Color catalog](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/colors.json): `skills/handdraw-style-prompter/references/colors.json`
- [Model policy](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/references/model_capabilities.json): `skills/handdraw-style-prompter/references/model_capabilities.json`
- [Reference resolver](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/resolve_reference.py): `skills/handdraw-style-prompter/scripts/resolve_reference.py`
- [Style reference images](https://github.com/yang0/handraw-style/tree/master/images/individual): `images/individual`

### Article workflows

- [Article cover design](https://github.com/yang0/handraw-style/blob/master/skills/article-cover-designer/SKILL.md): `skills/article-cover-designer/SKILL.md`
- [Illustration planning](https://github.com/yang0/handraw-style/blob/master/skills/article-illustration-planner/SKILL.md): `skills/article-illustration-planner/SKILL.md`
- [Markdown inserter](https://github.com/yang0/handraw-style/blob/master/skills/article-illustration-planner/scripts/insert_illustrations.py): `skills/article-illustration-planner/scripts/insert_illustrations.py`

### Assets and browsing

- [Custom asset manager](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/scripts/custom_library_manager.py): `skills/handdraw-style-prompter/scripts/custom_library_manager.py`
- [Style gallery](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/index.html): `skills/handdraw-style-prompter/gallery/index.html`
- [Layout gallery](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/layouts.html): `skills/handdraw-style-prompter/gallery/layouts.html`
- [Color gallery](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/colors.html): `skills/handdraw-style-prompter/gallery/colors.html`
- [Prompt assembler gallery](https://github.com/yang0/handraw-style/blob/master/skills/handdraw-style-prompter/gallery/tutorials.html): `skills/handdraw-style-prompter/gallery/tutorials.html`

### Other components

- **Creator**
- **Image-generation tool**

## Connections

- Creator → Prompt skill: requests prompts (evidence: `README.md`)
- Prompt skill → Prompt composer: uses composer
- Prompt composer → Layout resolver: resolves layouts (evidence: `skills/handdraw-style-prompter/scripts/prompt_style.py`)
- Prompt composer → Reference resolver: resolves references (evidence: `skills/handdraw-style-prompter/scripts/prompt_style.py`)
- Layout resolver → Layout catalog: loads layouts (evidence: `skills/handdraw-style-prompter/scripts/layout_library.py`)
- Layout resolver → Layout prompts: reads prompts (evidence: `skills/handdraw-style-prompter/scripts/layout_library.py`)
- Reference resolver → Style catalog: reads styles (evidence: `skills/handdraw-style-prompter/scripts/resolve_reference.py`)
- Reference resolver → Model policy: reads policy (evidence: `skills/handdraw-style-prompter/scripts/resolve_reference.py`)
- Reference resolver → Style reference images: selects reference (evidence: `skills/handdraw-style-prompter/scripts/resolve_reference.py`)
- Creator → Poster prompts: requests poster (evidence: `README.md`)
- Creator → Article cover design: requests cover (evidence: `README.md`)
- Creator → Illustration planning: requests illustrations (evidence: `README.md`)
- Illustration planning → Markdown inserter: inserts images (evidence: `README.md`)
- Creator → Image-generation tool: uses prompt (evidence: `README.md`)
- Creator → Custom asset manager: manages assets
- Creator → Style gallery: browses styles (evidence: `README.md`)
- Creator → Layout gallery: browses layouts (evidence: `README.md`)
- Creator → Color gallery: browses colors (evidence: `README.md`)
- Creator → Prompt assembler gallery: assembles prompts
- Creator → Color catalog: chooses colors (evidence: `README.md`)
