---
name: note-article-visuals
description: Create note-ready Japanese articles with multiple context-matched inline images, selectable design-style taste (40-style atlas in 7 categories plus drawing presets, with automatic style classification from article content), selectable image insertion frequency (e.g. one image per smartphone scroll), four downloadable thumbnail candidates, image insertion planning, AI image prompts, and paste-friendly HTML/Markdown output. Use when the user says `$note-article-visuals`, asks "記事画像を作る", "記事画像を作って", "noteの画像を生成して", "noteの記事画像を生成して", "note記事に画像を入れて", "noteに貼れるようにして", "テイストを選びたい", add images throughout a note draft, generate article images at regular intervals, create note-workbench/note-paste HTML, prepare article visuals from text, or adapt a design atlas/reference style to note article imagery.
---

# Note Article Visuals

## Overview

Turn a note draft or article idea into a paste-ready article package with multiple images placed at natural intervals. The skill should output article text, image prompts, generated inline image files, four downloadable note thumbnail candidates by default, and `note-workbench.html` for reliable note editing.

## 起動時の名乗り（版ずれ検知）

最初の応答の冒頭に必ず1行入れる: `note画像スキル v2.1（38スタイル図鑑・サムネ必須・検品ゲートあり）`

ユーザーが古い挙動（テイスト候補に見本画像が無い・サムネイルが作られない・作業台が生成されない等）に気づいたとき、**版ずれか実装ミスかを切り分けるための目印**になる。
スキルは**ツールの起動時に読み込まれる**ため、インストール／更新の直後に再起動していないと古い版が動く。ユーザーが「前と同じ挙動だ」と言ったら、まずツールの再起動を案内すること。

## Definition of Done — 画像はゴールではない

**このスキルのゴールは「画像」ではなく、note にコピペできる `note-workbench.html`（noteの作業台）である。** 以下がすべて満たされるまで、完了報告をしてはならない:

1. 全画像（挿絵＋サムネイル4案）が生成され、ファイルとして保存されている
2. `scripts/build_note_paste_html.py` を**実際に実行**し、`note-workbench.html` が生成されている
3. 最終応答が「作業台のパス＋貼り方4ステップ」の案内になっている
4. `python3 scripts/verify_output.py <出力フォルダ>` が**全項目PASS**（FAILが残ったまま完了と言わない）

**禁止:** 画像ファイルやそのリンクの一覧を最終出力にすること。「リンクまとめ」「画像一覧」で応答を終えること。作業台が未生成のまま「できました」と言うこと。
Python が実行できない環境では、その旨を明言し、`article-for-note.md` と画像を1枚ずつ手動アップロードする代替手順を案内する（黙って省略しない）。

## Default Output

Create a folder under the current workspace unless the user specifies otherwise:

```text
outputs/note-article-visuals/YYYY-MM-DD_short-title/
  article.md
  note-paste.html
  note-copy.html
  note-workbench.html
  image-plan.md
  image-manifest.json
  images/
    01_eyecatch.png
    02_section.png
  thumbnails/
    thumbnail_01.png
    thumbnail_02.png
    thumbnail_03.png
    thumbnail_04.png
  thumbnail-plan.md
```

Use Japanese filenames only when the surrounding project uses them and the filename remains short. Otherwise use safe ASCII slugs.

## Workflow

1. **Read the article source.**
   - If the user gives a draft, use it.
   - If the user gives an idea, first draft the article.
   - If the user gives a file, read it before planning.
   - Preserve the user's voice; use `$natural-writing` too when the user asks for natural Japanese or non-AI-like writing.

2. **Choose the image rhythm (insertion frequency).**
   Offer these named frequency presets when the user has not specified one. If the user names one (or describes it, e.g. "スマホ1スクロールに1枚"), use it directly without asking:

   | preset | 発動ワード例 | 挿入間隔 |
   |---|---|---|
   | `scroll-1` | スマホ1スクロールに1枚 / 画像多め | 400-600字ごと（note のスマホ表示で約1スクロール分） |
   | `standard` | 標準 / おまかせ | 800-1200字ごと（default） |
   | `section` | 見出しごと / セクションごと | 各H2セクションの直後に1枚 |
   | `light` | 少なめ | 導入後・中盤・まとめの3枚程度 |
   | `minimal` | 最小 / アイキャッチだけ | アイキャッチ1枚（＋必要なら1枚） |

   - Default: `standard` (one image every 800-1200 Japanese characters).
   - For short articles under 1200 characters: use 1 eyecatch plus 1 supporting image only if useful, regardless of preset.
   - For structured articles on `standard`: prefer one image after the intro, then after each major H2 or every 2 H2 sections.
   - Record the chosen preset in `image-plan.md`.
   - Avoid inserting images between tightly connected paragraphs where it interrupts the argument — shift the insertion point to the nearest paragraph boundary instead of forcing the interval.

3. **Assign each image a job.**
   Use concrete roles rather than decoration. When the user says "画像" or shows a note article screenshot with inserted visuals, default to article illustration/images, not text-heavy design cards:
   - `eyecatch`: emotional promise and article theme.
   - `concept`: abstract idea made visual.
   - `diagram`: process, comparison, framework, or structure.
   - `scene`: realistic reader situation.
   - `proof`: example, before/after, checklist, or result.
   - `summary`: final recap card.
   - Use `diagram`, `checklist`, or card-like text images only when the user explicitly asks for 図解, カード, 比較表, checklist images, or editable diagrams.
   - If the user provides a screenshot as "こういう画像" or "こんなイメージ", treat it as a style/composition reference only. Do not paste or reuse that image as the article visual unless the user explicitly says to use the exact image. Read the article/HTML content and create a new content-specific diagram or visual from that content.
   - For diagram-card requests, first decide the message of the image from the article/HTML: comparison, process, before/after, conclusion, checklist, or mechanism. The visible text and structure must come from the current content, not from the reference screenshot.

4. **Reshape the source into a readable article first — mandatory.**
   Never paste raw source text into `article.md` as-is. Voice transcripts, YouTube captions, and pasted talk scripts arrive as one huge run-on block; dropping image markers into that leaves a wall of text and the article is unusable.
   - **1段落は2〜4文・目安200〜400字。600字を超える段落を残さない**（超えたら意味の切れ目で割る）
   - **本文が1500字を超えるなら H2 見出しを必ず立てる**（目安: 800〜1200字ごとに1本）。話題の切り替わりを見出しにする
   - 話し言葉の癖（「えー」「なんか」「〜という感じで」の連発、同じ接続詞の反復）を削り、句読点を補う。**内容は足さない・変えない**
   - 冒頭の挨拶やチャンネル紹介など、note記事に不要な定型部分は削るか短くまとめる（削ったことは完了報告で伝える）
   - 整形が終わってから、その段落構造に沿って画像の位置を決める

5. **Create thumbnail candidates separately by default.**
   - **Thumbnails are mandatory.** Always create **2** note thumbnail candidates for every article (2案が既定。ユーザーが「もっと」「別案も」と言ったときだけ追加で作る). Do not offer to skip them and do not skip them even if not requested.
   - If the user asks for `サムネイル`, `見出し画像`, `タイトル画像`, `表題画像`, `thumbnail`, or sample thumbnail variations, still treat thumbnails as a separate deliverable from inline article images.
   - Default thumbnail count: **2 candidates**. Offer 「もっと候補を作れます」 in the completion report; generate more only when asked (追加生成はトークンを使うため既定にしない).
   - Do not insert thumbnail candidates into the article body. Store them under `thumbnails/` and list them separately in `image-manifest.json` under `thumbnails`.
   - Thumbnails are for upload, not copy/paste. In `note-workbench.html`, provide **download links/buttons** for thumbnail files rather than copy buttons.
   - Read the article/source content first, then derive one short title/headline per thumbnail candidate. Each candidate should feel like a top/title image for the same article, not a random decorative image.
   - Keep title text short enough for image generation: ideally 8-18 Japanese characters or 1 compact phrase. If a longer title is necessary, split into a short main title plus a small supporting phrase.
   - Include the exact title text in the image prompt. Example role: `thumbnail`.
   - If the user provides an existing image and asks to make a title/thumbnail from it, inspect the image as source/context, extract the topic and mood, then generate a new thumbnail candidate. Do not reuse or paste the original image unless explicitly requested.
   - Record thumbnail candidate titles, file paths, and prompts in `thumbnail-plan.md`.

6. **Select the taste — always 3 numbered candidates from the 40-style atlas.**
   - Read `references/style-atlas-40.md` first. Using its 自動分類マップ, pick the **top 3 candidate styles for this article — always from the 38-style atlas**. Do NOT default to `style-presets.md`; use presets only when the user explicitly names a drawing style (水彩で, 線画で, フラットで, ピクセルで...).
   - Show the 3 candidates **with their sample images** (`assets/style-atlas-samples/<slug>.jpg`) — number and Japanese name only, e.g. 「01 ジャパンディ / 13 バロック / 33 シンセウェーブ。番号でどうぞ」. **No explanations or reasons** (give a reason only if the user asks). Never present a text-only list.
   - **This step is mandatory even for おまかせ.** おまかせ means: you choose the 3 candidates, the user still confirms by number. Only if the user explicitly says 聞かないで進めて / 全部任せるから止まらないで, pick the top candidate yourself and show its sample image together with the confirmation plan.
   - If the user says 「全部見せて」「全部見たい」「一覧で見たい」, show the bundled numbered contact sheets `assets/style-atlas-samples/_all-1.jpg` and `_all-2.jpg`. Each cell carries a short こんな記事に: label, so just say 「書いている記事の題材に近いものを番号でどうぞ」— no per-style commentary.
   - If the user names a style directly (ジャパンディ, バロック, 13番...), use it without the candidate step.
   - **Never call image generation during taste selection.** Everything shown while choosing (3 candidates, 全部見せて list) must come from the bundled samples in `assets/style-atlas-samples/`. Generating preview images wastes tokens and is forbidden — image generation runs only after the user has confirmed a style number and approved the plan.
   - Keep one chosen style consistent across all images in the article. Record the chosen style in `image-plan.md` and `image-manifest.json`.
   - For monochrome line illustrations via presets, default to black line art with light cyan `#8fd8ff` as the only accent unless the user specifies another accent.

7. **Confirm the image plan before generation.**
   - Before generating images, present a short confirmation plan and wait for the user's approval unless the user explicitly says to proceed without confirmation.
   - Include:
     - image count
     - insertion rhythm or rough paragraph/section positions
     - image type for each item (`eyecatch`, `scene`, `concept`, `diagram`, `checklist`, `summary`)
     - selected style preset
     - whether each image should contain text or be text-free
     - expected output files, especially `note-workbench.html`
     - 2 thumbnail candidate titles, aspect ratio, and output paths (thumbnails are always included)
   - If the image type is unclear, ask the user to choose from 2-4 practical options before writing prompts.
   - Do not call image generation tools until the user approves the plan.

8. **Create image prompts.**
   - Use Codex's built-in image generation tool for raster images unless the user needs editable HTML/SVG/slide diagrams.
   - For normal note insertion images, create wide article illustrations or scene images with no in-image text unless text is essential.
   - For Japanese text inside images, explicitly include the exact text in the prompt.
   - If text renders poorly, improve the generation prompt and regenerate. Do not patch text with HTML/Canvas/PowerPoint unless the user asks for editable assets.
   - For text-heavy Japanese diagram cards where exact wording matters, prefer an editable HTML/SVG/slide diagram and render it to PNG for note insertion. This is still an image deliverable, but the content stays controllable and can be revised.
   - Keep prompts consistent across the article: same palette, type feel, crop style, and visual motif.
   - Record the chosen preset id/name in `image-plan.md` and `image-manifest.json`.
   - For thumbnail candidates, use a stronger top-image composition: clear focal point, generous title area, high contrast title text, and enough margin for note cropping/upload preview. Avoid dense subtitles and tiny UI-like details.

9. **Write `article.md` and insert placeholders — never skip.**
   Even when the user pastes finished text, you must save it as `article.md` in the output folder with `{{image:ID}}` placeholders at the planned positions. Without `article.md` the workbench cannot be built and the run fails the gate.
   In `article.md`, insert image placeholders where images should appear:

   ```md
   {{image:01}}
   ```

   Each placeholder must have a matching entry in `image-manifest.json`.

   Keep note body text plain by default:
   - Do not add blockquotes, quote-style callouts, colored backgrounds, or special note decorations unless the user explicitly requests them.
   - Do not turn ordinary emphasis into quote blocks.
   - If the user complains that pasted text got a background, quote styling, or unwanted decoration, revise the article output to plain paragraphs/headings and regenerate the workbench.

10. **Build paste output — mandatory, never skip.**
   Run `scripts/build_note_paste_html.py` (execute it for real; do not just mention it) to create:
   - `note-paste.html`: preview version with local image files.
   - `note-copy.html`: copy-focused version with images embedded into the HTML and a one-click copy button for note.
   - `note-workbench.html`: reliable note workflow with article text copied separately and each image copied/dragged into the visible marker positions.
     - `note-workbench.html` must include a thumbnail panel with download buttons (always).
   - `article-for-note.md`: Markdown with normal image links.

11. **Verify — 検品ゲートを実行する.**
   - **Run `python3 scripts/verify_output.py <output folder>` and fix every FAIL before reporting.** This is mandatory; do not report completion while any check fails.
   - Open or render `note-paste.html` when possible.
   - Check image paths, image count, placeholder replacement, mobile width, and no broken images.

12. **Guide the user to note (final report).**
   In the completion message, point the user to **`note-workbench.html` only** and give this 4-step routine in Japanese:
   1. 「本文をコピー（背景なし）」を押して note の編集画面に貼る
   2. 本文中の「【画像01をここに入れる】」の目印を探す
   3. 右の一覧から同じ番号の画像をコピーして目印の位置に貼る（貼れないときはドラッグ）→ 目印の行を消す
   4. サムネイル候補はダウンロードして note の「見出し画像」にアップロード
   Explicitly say that `note-paste.html` and `note-copy.html` are 確認用の控え and the user does not need to open them. Do not present three files as equal choices — one recommended path only.
   - If using animation references, keep note output static unless the user asks for a web article. note paste workflows usually cannot preserve custom JS animation reliably.

## オプション: スマホ改行モード（試作段階）

ユーザーが「スマホ改行で」「スマホ向けの改行にして」と言ったときだけ適用する試作オプション（既定ではOFF）:

- 1文ごとに改行を入れ、2〜3文ごとに空行を挟む（スマホの画面で圧迫感を出さない）
- 1行が長くなる文（60字超）は読点で区切って改行を検討する
- 見出し直後は必ず1行空ける
- まだ試作段階のため、適用したら完了報告に「スマホ改行モードで整形しました（読みにくければ言ってください）」と添える

## Image Manifest

Use this JSON shape:

```json
{
  "title": "記事タイトル",
  "style": "図鑑05 花・暮らし系やさしいLP / note図解カード系など",
  "images": [
    {
      "id": "01",
      "role": "eyecatch",
      "path": "images/01_eyecatch.png",
      "alt": "記事テーマを表すやさしいアイキャッチ",
      "caption": "",
      "prompt": "Image 2.0相当の高品質..."
    }
  ],
  "thumbnails": [
    {
      "id": "thumb_01",
      "title": "記事タイトル候補",
      "path": "thumbnails/thumbnail_01.png",
      "alt": "note見出し画像候補1",
      "prompt": "Image 2.0相当の高品質なnoteサムネイル..."
    }
  ]
}
```

## Resources

- `references/style-selection.md`: How to choose image/design direction from atlases, screenshots, HTML portfolios, or motion references.
- `references/style-presets.md`: Reusable image taste presets (描き方 layer: watercolor, line art, flat, pixel...).
- `references/style-atlas-40.md`: 40 design styles in 7 categories (様式 layer: Japandi, Baroque, Bauhaus, Y2K...) with per-style prompt phrases and the article-content → style 自動分類マップ.
- `scripts/verify_output.py`: 検品ゲート。完了報告の前に必ず実行し、全項目PASSを確認する。
- `scripts/build_note_paste_html.py`: Converts `article.md` with `{{image:ID}}` placeholders and `image-manifest.json` into `note-paste.html`, `note-copy.html`, `note-workbench.html`, and `article-for-note.md`.
- `assets/style-samples/`: Sample images for the drawing presets.
- `assets/style-atlas-samples/`: Sample images for all 38 atlas styles (`<slug>.jpg`) — always show these when offering style choices.
