card-news-generator-v2
npx skills add https://github.com/microck/ordinary-claude-skills --skill card-news-generator-v2
Agent 安装分布
Skill 文档
Card News Generator v2 – Auto Mode (V2)
Creates beautiful 600×600 card news series for social media with background image support. User can provide topic, colors, and optional background images – Claude handles content generation and multi-card creation automatically.
When to Use
Use this skill when user requests:
- “ì¹´ë ë´ì¤ ë§ë¤ì´ì¤”
- “주ì ë¡ ì¹´ë ìë¦¬ì¦ ë§ë¤ì´ì¤”
- “ì¸ì¤íì© ì¹´ë ìì±í´ì¤”
- Any request for visual card content
Core Workflow – AUTO MODE
This is the PRIMARY workflow when users request card news:
Step 1: Get Topic, Colors, and Optional Background Images from User
Ask user for:
- Topic (주ì ): What the card series is about
- Background RGB (ë°°ê²½ì): e.g.,
245,243,238(optional, default: beige) - Background Images (ë°°ê²½ ì´ë¯¸ì§, ì íì¬í): Path to folder containing images
Example conversation (Solid Color):
Claude: ì´ë¤ 주ì ë¡ ì¹´ë ë´ì¤ë¥¼ ë§ë¤ê¹ì?
User: Zì¸ëì í¹ì§ì ëí´ì
Claude: ë°°ê²½ìì ì íí´ì£¼ì¸ì (RGB íì, ì: 245,243,238)
ì¶ì² ìì:
â¢ ë² ì´ì§: 245,243,238
⢠íí¬: 255,229,229
⢠민í¸: 224,244,241
User: 245,243,238
Example conversation (With Background Images):
Claude: ì´ë¤ 주ì ë¡ ì¹´ë ë´ì¤ë¥¼ ë§ë¤ê¹ì?
User: ì¬í í 5ê°ì§
Claude: ë°°ê²½ ì´ë¯¸ì§ë¥¼ ì¬ì©íìê² ì´ì? (ì¬ì©íë ¤ë©´ ì´ë¯¸ì§ í´ë ê²½ë¡ ì
ë ¥)
User: /path/to/travel-images
Claude: ì¤ë²ë ì´ ë¶í¬ëª
ë를 ì ííì¸ì (0.0-1.0, ê¸°ë³¸ê° 0.5)
ëììë¡ ì´ë¡ê² ì²ë¦¬ëì´ í
ì¤í¸ê° ë ì ë³´ì
ëë¤.
User: 0.6
Step 2: Generate Card Content
Create 5-7 cards about the topic. Format output as:
1. [ì 목]
[ì¤ëª
2-3ì¤]
2. [ì 목]
[ì¤ëª
2-3ì¤]
3. [ì 목]
[ì¤ëª
2-3ì¤]
CRITICAL Content Guidelines:
- Title: Maximum 20 characters (including spaces)
- Content: Maximum 60 characters (including spaces)
- Keep it concise to fit 600×600 canvas
- Use simple, impactful language
- Each card should convey ONE key point
Step 3: Auto-Generate Cards
Option A: Solid Color Background
Use this command to create all cards with solid color background:
python auto_generator.py \
--topic "Zì¸ëì í¹ì§" \
--bg-color "#f5f3ee" \
--text-color "#1a1a1a" \
--output-dir /mnt/user-data/outputs \
--base-filename "zgen" << 'EOF'
1. ëì§í¸ ë¤ì´í°ë¸
íì´ë ëë¶í°
ëì§í¸ íê²½ì ìµì
2. ê°ì¸í ì¤ì
ëë§ì ê°ì±ê³¼
ì·¨í¥ì ì¤ìì
3. ìíµ ë°©ì
í
ì¤í¸ë³´ë¤ ìì
ì´ëª¨í°ì½ì¼ë¡ ê°ì íí
EOF
Option B: Background Images (V2 Feature)
Use this command to create cards with background images:
python auto_generator.py \
--topic "ì¬í í" \
--output-dir /mnt/user-data/outputs \
--base-filename "travel" \
--image-folder /path/to/travel-images \
--overlay-opacity 0.6 << 'EOF'
1. ì§ ì¸ê¸° í
ìµìíì ì§ì¼ë¡
ê°ë³ê² ì¬íí기
2. íì§ ìì
ë§ì§ ì°¾ë
ëë§ì ë°©ë²
3. êµíµ ìë¨
ëì¤êµíµ íì©
íê³¼ ë
¸íì°
EOF
Important Notes:
- Images in the folder must be sorted alphabetically/numerically (e.g.,
01.jpg,02.jpg,03.jpg) - Image count should match card count
- If fewer images than cards, remaining cards will use solid color background
- Supported formats:
.jpg,.jpeg,.png,.webp,.bmp - Text automatically changes to white when using background images
The script will automatically:
- Parse the numbered content
- Load background images from the folder (in sorted order)
- Apply dark overlay for better text visibility
- Create individual cards with proper text wrapping
- Save as
travel_01.png,travel_02.png, etc.
Step 4: Provide Download Links
After generation, show user:
â
ì¹´ë ë´ì¤ 5ì¥ì´ ìì±ëììµëë¤!
[View card 1](computer:///mnt/user-data/outputs/zgen_01.png)
[View card 2](computer:///mnt/user-data/outputs/zgen_02.png)
...
RGB to Hex Conversion
Always convert RGB to hex for scripts:
# RGB 245,243,238 â Hex #f5f3ee
hex_color = '#{:02x}{:02x}{:02x}'.format(245, 243, 238)
Recommended Colors (RGB Format)
Show users these options:
- Warm beige:
245,243,238â#f5f3ee - Soft pink:
255,229,229â#ffe5e5 - Mint green:
224,244,241â#e0f4f1 - Lavender:
232,224,245â#e8e0f5 - Peach:
255,232,214â#ffe8d6 - Sky blue:
227,242,253â#e3f2fd
Content Generation Best Practices
Good Card Content Example
1. ëì§í¸ ë¤ì´í°ë¸
íì´ë ëë¶í°
ëì§í¸ íê²½ì ìµì
â Title: 8 characters â Content: 18 characters â Clear and concise
Bad Card Content Example
1. Zì¸ëë ëì§í¸ ë¤ì´í°ë¸ ì¸ëì
ëë¤
ê·¸ë¤ì íì´ë ëë¶í° ì¤ë§í¸í°ê³¼ ì¸í°ë·ì ì¬ì©íë©° ìë기 ë문ì ëì§í¸ 기ì ì ë§¤ì° ë¥ìí©ëë¤
â Title too long (21 characters) â Content too long (60+ characters) â Will overflow the 600×600 canvas
Single Card Mode (Manual)
Solid Color Background
For creating just one card with solid color:
python generate_card.py \
--title "ì 목" \
--content "ë´ì©" \
--bg-color "#f5f3ee" \
--text-color "#1a1a1a" \
--number 1 \
--output /mnt/user-data/outputs/single.png
With Background Image (V2 Feature)
For creating a card with background image:
python generate_card.py \
--title "ì¬í í" \
--content "ìµìíì ì§ì¼ë¡\nê°ë³ê² ì¬íí기" \
--bg-image /path/to/image.jpg \
--overlay-opacity 0.6 \
--number 1 \
--output /mnt/user-data/outputs/travel_01.png
Parameters:
--bg-image: Path to background image file--overlay-opacity: Opacity of dark overlay (0.0-1.0, default: 0.5)- 0.0 = No overlay (original image)
- 0.5 = 50% dark overlay (default, good balance)
- 1.0 = Fully black (only for very bright images)
Technical Details
Canvas Specifications
- Size: 600×600 pixels (Instagram-optimized)
- Padding: 40px on all sides
- Max text width: 520px (600 – 80)
- Font sizes:
- Number badge: 60px
- Title: 48px (bold)
- Content: 28px (regular)
Background Image Processing (V2)
- Resize & Crop: Images are automatically resized to 600x600px
- Maintains aspect ratio
- Center crop if aspect ratio differs
- Uses high-quality LANCZOS resampling
- Dark Overlay: Applied to improve text visibility
- Default opacity: 0.5 (50% dark)
- Adjustable via
--overlay-opacity(0.0-1.0) - Higher values = darker overlay = better text contrast
- Text Color: Automatically switches to white (#FFFFFF) when using background images
- Supported Formats: JPG, JPEG, PNG, WebP, BMP
- Image Sorting: Files loaded in alphabetical/numerical order
Text Wrapping
- Automatic word wrapping at max width
- Preserves manual line breaks
- Centers all text horizontally
- Vertical spacing optimized for readability
File Naming Convention
- Auto mode:
{base_filename}_{number:02d}.png - Example:
card_01.png,card_02.png,card_03.png
Error Handling
If text overflows:
- Reduce title length
- Shorten content
- Use line breaks strategically
- Regenerate with revised content
Example Workflows
Example 1: Solid Color Background
User request: “Zì¸ëì ëí ì¹´ë ë´ì¤ 5ì¥ ë§ë¤ì´ì¤, íí¬ìì¼ë¡”
Claude response:
- Confirm: “Zì¸ë í¹ì§ì ëí ì¹´ë 5ì¥ì íí¬ ë°°ê²½(255,229,229)ì¼ë¡ ë§ë¤ê² ìµëë¤.”
- Generate 5 cards content (keeping text concise)
- Run auto_generator.py with heredoc
- Provide download links to all 5 cards
Total time: ~30 seconds for 5-card series
Example 2: Background Images (V2)
User request: “ì¬í í ì¹´ë ë´ì¤ ë§ë¤ì´ì¤, ë°°ê²½ì /Users/me/travel-photos í´ëì ìë ì´ë¯¸ì§ ì¬ì©”
Claude response:
- Confirm: “ì¬í í ì¹´ë ë´ì¤ë¥¼ ë§ë¤ê² ìµëë¤. /Users/me/travel-photos í´ëì ì´ë¯¸ì§ë¥¼ ë°°ê²½ì¼ë¡ ì¬ì©í©ëë¤.”
- Ask: “ì¤ë²ë ì´ ë¶í¬ëª ë를 ì ííì¸ì (0.0-1.0, ê¸°ë³¸ê° 0.5). ëììë¡ í ì¤í¸ê° ë ì ë³´ì ëë¤.”
- User: “0.6”
- Generate 5 cards content (keeping text concise)
- Run auto_generator.py with –image-folder and –overlay-opacity
- Provide download links showing cards with background images
Preparation tips:
- Rename images in order:
01.jpg,02.jpg,03.jpg,04.jpg,05.jpg - Ensure image count matches card count
- Use high-quality images (at least 600x600px recommended)
- Test with different overlay opacity values for best results
Total time: ~45 seconds for 5-card series with images