From note-com-watercolor-header
Generate header images for note.com articles using Pillow-based text overlay on a background template. Supports Japanese text with automatic word wrapping.
How this skill is triggered — by the user, by Claude, or both
Slash command
/note-com-watercolor-header:watercolor-headerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate header images for note.com articles using Pillow-based text overlay on a background template. Supports Japanese text with automatic word wrapping.
Generate header images for note.com articles using Pillow-based text overlay on a background template. Supports Japanese text with automatic word wrapping.
Creates article header images by compositing text (tag + title) onto a background image template. Zero API cost, instant generation, deterministic output. Designed for note.com's 1280x670 recommended eyecatch dimensions but works for any size.
pip install Pillow)python generate_header.py \
--title "記事タイトル" \
--background /path/to/background.png \
--output header.jpg
python generate_header.py \
--title "ChatGPTのカスタム指示に設定すべき8つのプロンプト" \
--tag "【完全解説】" \
--background /path/to/background.png \
--output header.jpg
python generate_header.py \
--title "記事タイトル" \
--background /path/to/background.png \
--output header.jpg \
--tag-color "16,16,16" \
--title-color "232,146,27"
python generate_header.py \
--title "記事タイトル" \
--background /path/to/background.png \
--output header.jpg \
--width 1920 \
--height 1080
| Argument | Required | Default | Description |
|---|---|---|---|
--title | Yes | — | Article title text (Japanese) |
--background | Yes | — | Path to background image file |
--output | Yes | — | Output file path (.jpg or .png) |
--tag | No | None | Bracketed tag text, e.g. "【完全解説】" |
--tag-color | No | 16,16,16 | Tag text RGB color (comma-separated) |
--title-color | No | 255,255,255 | Title text RGB color (comma-separated) |
--width | No | 1280 | Output image width in pixels |
--height | No | 720 | Output image height in pixels |
You provide your own background image. Recommendations:
The script resizes the background to match --width and --height, so the background does not need to be exactly the target size.
The script searches for Japanese fonts in this order:
/System/Library/Fonts/ヒラギノ角ゴシック W9.ttc (extra bold)/System/Library/Fonts/ヒラギノ角ゴシック W7.ttc (bold)/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc{workspace}/.tmp/fonts/ directory (for custom font installs)If no system Japanese font is available:
# Option A: Install Noto CJK fonts
sudo apt install -y fonts-noto-cjk
# Option B: Download a font manually
mkdir -p /path/to/workspace/.tmp/fonts
# Place .ttf or .ttc files in this directory
The wrap algorithm breaks text at natural Japanese boundary points:
This produces visually natural line breaks that respect Japanese grammar, unlike character-count-based wrapping which can break in the middle of words.
| Constant | Default | Description |
|---|---|---|
TAG_SIZE | 48 | Tag font size in pixels |
TAG_POS | (50, 85) | Tag position (x, y) from top-left |
TITLE_SIZE | 62 | Title font size in pixels |
TITLE_POS_X | 50 | Title left margin |
TITLE_POS_Y | 170 | Title top position (below tag) |
TITLE_MAX_WIDTH | 1020 | Maximum title width in pixels before wrapping |
TITLE_LINE_SPACING | 1.45 | Line spacing multiplier |
Adjust these values in the script to match your background template's text-safe area.
In an automated article pipeline, call the header generator after the article is written:
# In your pipeline shell script or Claude Code prompt
python3 /path/to/generate_header.py \
--title "$ARTICLE_TITLE" \
--tag "$TAG" \
--background /path/to/background.png \
--output "$PROJECT_DIR/.tmp/$DATE/header.jpg"
The generated image can then be uploaded to note.com as the eyecatch image via the note.com publisher.
Header generator based on production image pipelines generating daily article headers.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub mtkana/claude-code-plugins --plugin note-com-watercolor-header