This Skill is used to automatically fetch, process, and standardize AI image generation style tweets on X (Twitter) (such as Midjourney --sref styles, artist portfolio image sets, etc.) into the hand-drawn style library with one click.
Core Automated Workflow
When the user provides a tweet link (for example, https://x.com/.../status/...) and requests ingestion, execute the following 6-step standard process:
[1. 抓取推文与高清原图]
↓
[2. 计算下一位顺延编号 (如 #217)]
↓
[3. 生成双轨图像资源]
├── 生图参考图:多图时为 1024×1024 四宫格;仅一张原图时直接使用单图
├── 风格单图:512×512 纯净风格代表图,严禁压印任何数字编号、作者Handle或角标框 (201-400/217.webp)
└── 画廊展板:1254×1254 16 宫格画板(#201–216 使用 G;#217 起使用 H,单图以纯净画面进入展板,不压印角标)
↓
[4. 风格库元数据入库 (styles_200_reorganized.md)]
↓
[5. 模型能力策略配置 (model_capabilities.json)]
└── 强制启用传图规则:name_activation=none, traits_activation=none
↓
[6. 重建画廊并运行全量校验 (build_library.py & validate_library.py)]
One-Click Execution Command
Run the automation script directly in the workspace to complete the entire process:
# 标准一键执行
python scripts/import_tweet_style.py "https://x.com/username/status/..."
# 支持可选的自定义英文风格名与中文特征描述
python scripts/import_tweet_style.py "https://x.com/username/status/..." --name "Custom Style Name" --traits "核心特征描述"
Specifications and Output Standards for Each Step
1. Fetch Tweet and High-Resolution Original Images
- Before making a network request, first check by X/Twitter status ID
downloads/tweet_{id}/tweet.json; for tweets already fetched, stop directly, do not download images, do not assign new numbers, and do not modify the style library or gallery. - Automatically parse the tweet author (name and Handle), tweet body, and Midjourney
--srefstyle code. - Automatically extract all original images (force replacement with
?name=orighigh-resolution size). - Data is saved in
downloads/tweet_{id}/(includingtweet.jsonand the original images). - After successful ingestion, write to
import.json, recording the status ID, original link, style number, and import time; on duplicate input, return the already-ingested number. Withoutimport.json, historical downloads only prompt "already fetched but registration not completed" and likewise will not be fetched repeatedly.
2. Image Specification Standards
- Image generation reference images:
- When there are 2–4 different original images, create a
images/individual/{bucket}/{number}_grid.webp:1024 × 1024 pxJPG 2×2 four-panel grid. - When there is only 1 original image, do not create
_grid.webp, directly useimages/individual/{bucket}/{number}.webp, and do not copy it into four identical panels.
- When there are 2–4 different original images, create a
- Style single image (
images/individual/{bucket}/{number}.webp):- Specifications:
512 × 512 pxWebP - Details: clean image,strictly forbidden to imprint any digital number, author Handle, or corner label frame, fully preserving the original artwork content and composition details.
- Specifications:
{bucket}increments every 200 numbers:001-200、201-400、401-600. When a four-panel grid exists, it is located in the same directory as the single image with the same number.- Gallery display board (from #217 onward,
images/H_{number}.webp):- Specifications:
1254 × 1254 pxWebP - Layout: standard 4×4 (16-panel) board, filled left to right, top to bottom; do not create a new board until full.
- Naming: the filename reflects the range of numbers actually filled in, for example
H_217-218.webp; only after 16 panels are full does the next number create a new board. - Status:
references/contact_sheet_state.jsonrecords the active board, number filled, and next panel; a single image enters the corresponding panel as a clean image without corner labels.
- Specifications:
3. Style Library and Model Strategy Ingestion
- Main style table (
styles_200_reorganized.md):- Update the total count title and append a new row:
| {number} · {author} | {generation_name} | {traits} |
- Update the total count title and append a new row:
- Model capability strategy (
references/model_capabilities.json):- Append a forced image upload configuration for this number:
"{number}": { "name_activation": "none", "traits_activation": "none" } - Ensure that when calling
resolve_reference.py, regardless of model, it is always determined asuse_reference_image = True, and prioritizes returning the multi-image four-panel grid; for single-image imports, return the single-image path.
- Append a forced image upload configuration for this number:
4. Gallery and Verification
- Call
python handdraw-style-prompter/scripts/build_library.pyto rebuild the gallery and JSON index. - Call
python handdraw-style-prompter/scripts/validate_library.pyto verify the full-library contract, ensuring no number gaps and no missing images.
Delivery and Reporting Format
After execution is complete, output the following standardized result card:
- Ingestion information: number, author, style name, and group it belongs to.
- Gallery link:
skills/handdraw-style-prompter/gallery/index.html。 - Bilingual prompt template:
- Chinese:
风格名称:#{编号} · {generation_name}。主题:[主题]。参考作者/风格名称:{author}。 - English:
Style name: #{number} · {generation_name}. Theme: [Theme]. Reference author/style name: {author}.
- Chinese: