card-news-maker
npx skills add https://github.com/tendtoyj/tendtoyj-claude-skills --skill card-news-maker
Agent 安装分布
Skill 文档
Card-News Maker
Assemble modular HTML from card type components + render each card to 1080Ã1350 PNG. Tools: Playwright MCP. Final step in the card-news pipeline.
Purpose
Card-News Maker is the assembler and renderer. It:
- Collects all upstream outputs (copy, icons, images)
- Builds a single HTML file from modular card type components
- Renders each card as an isolated 1080Ã1350 PNG via Playwright
- Saves output files and logs production
Memory Auto-Load Protocol
Pipeline inputs (ëí 컨í
ì¤í¸ìì ë°ì):
1. Approved copy (from copy-writer, after copy-evaluator PASS)
2. Contents-manager output (Visual Asset Plan â icon SVGs, image paths)
â
CRITICAL â ë°ëì ì½ì´ì¼ íë reference íì¼:
3. references/card-news-template.html â ì본 HTML (source of truth)
4. references/card-type-components.md â ê°ë³ ì¹´ë 조립 ê°ì´ë
5. references/playwright-pipeline.md â ë ëë§ ì ì°¨
Optional:
6. card-news-memory/series-config.md
â Brand header, account handle, color overrides
â If missing: use template defaults (TODAY'S PICKS, @account)
7. references/TEMPLATE-GUIDE.md â placeholder ì°¸ê³ ì© (íì ìë)
reference íì¼ 3~5ê° ìì¼ë©´ ë ëë§ ë¶ê° â ì¬ì©ììê² ìë¦¬ê³ ì¤ë¨íë¤. series-config ë± optional íì¼ì ìì´ë 기본ê°ì¼ë¡ ì§ííë¤.
Input
| Input | Required | Source |
|---|---|---|
| Approved copy | Yes | copy-writer (after PASS) |
| Visual Asset Plan | Yes | contents-manager |
| Generated images | Yes (for content-image cards) | image-generator |
| Series config | Yes | series-config.md |
Process
Step 1: HTML Assembly
ì본 card-news-template.htmlì 기ë°ì¼ë¡ ìµì¢
cards.htmlì 조립íë¤.
Assembly sequence:
- Read ì본 HTML:
references/card-news-template.htmlì 체를 ì½ëë¤ - ì¹´ë ë¸ë¡ ìë³:
<body>ìì 4ê°<div class="card">ë¸ë¡ì ê°ê° ìë³- Card 1 (Cover), Card 2 (Content-Image), Card 3 (Content-Features), Card 4 (Outro)
- ì본ì HTML 주ì(
<!-- CARD N â ... -->)ê³¼.labeldivë¡ êµ¬ë¶
- ì¹´ë ì ì¡°ì :
references/card-type-components.mdì ê°ë³ ì¹´ë 조립 ê·ì¹ì ë°ë¼- 4ì¥ (기본): ì본 ê·¸ëë¡ ì¬ì©
- 4ì¥ ë¯¸ë§: ë¶íìí ì¤ê° ì¹´ë ë¸ë¡ ì ê±°
- 4ì¥ ì´ê³¼: ì¤ê° ì¹´ë ë¸ë¡(Content-Image / Content-Features)ì ë³µì íì¬ ì½ì
- ê° ì¹´ë ë¸ë¡ì
data-card-indexì¶ê°: Playwright ë ëë§ì©<div class="card" data-card-index="1"> - Placeholder ì¹í: 모ë
{{...}}를 ì¤ì ê°ì¼ë¡ êµì²´- Copy placeholder â copy-writer ì¶ë ¥ê°
{{icon-N-path}}â contents-managerì Lucide SVG path{{image-url}}/{{image-alt}}â image-generator ì¶ë ¥ ê²½ë¡{{account-handle}}â series-config.md- Content-Imageì
<img>주ì í´ì â ì¤ì ì´ë¯¸ì§ ê²½ë¡ ì½ì
- Brand name êµì²´:
TODAY’S PICKSâ series-config.md brand name - Color override ì ì©:
:rootCSS ë³ì를 series-config.md override ê°ì¼ë¡ êµì²´ .labelí ì¤í¸ ì ë°ì´í¸:N / TOTAL â Typeííë¡ ê°±ì- Save: ìµì¢
HTMLì
cards.htmlë¡ ì ì¥
íµì¬ ìì¹:
- ì본 HTMLì´ source of truth â CSS를 ë¤ì ì°ê±°ë 구조를 ì¬êµ¬ì±íì§ ìëë¤
- ì본ì ë³µì¬í ë¤ placeholder ì¹í + ì¹´ë ë¸ë¡ ì¶ê°/ì ê±°ë§ ìí
- 모ë CSS ê°, í´ëì¤ëª , ë ì´ììì ì본 ê·¸ëë¡ ì ì§
Step 2: Save HTML
Save the assembled HTML to:
[project]/card-news/[topic]-[YYYY-MM-DD]/cards.html
Copy any generated images to the same directory (if not already there).
Outro ìì´ì½: 기본 ì 문 ìì´ì½ì´ references/assets/outro-icon-default.pngì í¬í¨ëì´ ìë¤. ì¬ì©ìê° ë³ë ìì´ì½ì ì ê³µíì§ ìì¼ë©´ ì´ íì¼ì ì¶ë ¥ ëë í 리ì ë³µì¬íì¬ ì¬ì©íë¤.
Verify the file structure:
card-news/[topic]-[YYYY-MM-DD]/
âââ cards.html
âââ img-card-2.png (if content-image cards exist)
âââ img-card-3.png (etc.)
âââ outro-icon.png (default or AI-generated)
Step 3: Playwright Rendering
Read references/playwright-pipeline.md for the detailed rendering procedure.
High-level sequence:
- Navigate to the HTML file via
file://protocol - Wait for fonts to load (
document.fonts.ready) - Wait for images to load
- For each card (by
data-card-index): a. Hide all other cards (display: none) b. Resize viewport to 1080Ã1350 c. Take screenshot of the visible card d. Save ascard-[N].png - Restore all cards visible (for preview)
Output files:
card-news/[topic]-[YYYY-MM-DD]/
âââ cards.html
âââ card-1.png (cover)
âââ card-2.png (content)
âââ ...
âââ card-N.png (outro)
âââ img-card-*.png (source images)
âââ outro-icon.png
Step 4: Verification
After rendering, verify each PNG:
- File exists and is non-empty
- Dimensions are 1080Ã1350 (check via Playwright or file metadata)
- Visual spot-check: fonts loaded, images rendered, no blank areas
If any card fails:
- Check font loading (most common issue)
- Check image paths (relative path errors)
- Retry rendering for the failed card only
Step 5: Log Production
Append to card-news-memory/production-log.md:
| [YYYY-MM-DD] | [Topic] | [N] cards | Complete | `card-news/[topic]-[date]/` | [notes] |
Step 6: Output Summary
Present to the user:
# Card-News Production Complete: [Topic]
> Date: [YYYY-MM-DD]
> Cards: [N] (cover + [N-2] content + outro)
> Output: `card-news/[topic]-[YYYY-MM-DD]/`
## Rendered Cards
| Card | Type | File | Status |
|------|------|------|--------|
| 1 | cover | card-1.png | â
|
| 2 | content-image | card-2.png | â
|
| 3 | content-features | card-3.png | â
|
| 4 | outro | card-4.png | â
|
## Files
- `cards.html` â Source HTML (editable for future modifications)
- `card-*.png` â Final 1080Ã1350 PNG files (ready for Instagram)
- `img-card-*.png` â Source content images
## Next Steps
- Upload `card-1.png` through `card-[N].png` to Instagram as a carousel
- Edit `cards.html` to modify copy or colors, then re-render
- Run image-generator with different prompts for alternative visuals
What This Skill Does NOT Do
- Write copy â copy-writer
- Evaluate copy â copy-evaluator
- Plan visual assets â contents-manager
- Generate AI images â image-generator
- Design new card types â Template extensions are manual
Card-News Maker stays focused: assembled assets in â rendered PNG files out.