storyteller-renderer
Storyteller Renderer
템플릿 HTML의 {{placeholder}}를 치환하여 카드뉴스 HTML을 조립하고, Playwright MCP로 1080×1350 PNG를 렌더링한다.
워크플로우
Step 1. 입력 확인
필수 입력:
- 승인된 카드 구성 (planner 출력: 템플릿 타입, 카드별 카피 텍스트)
- 생성된 이미지 파일 경로 (image-maker 출력: 카드별 이미지 매핑)
- 브랜드명, 주제명, 날짜
출력 디렉토리 결정: storyteller/[주제]-[YYYY-MM-DD]/
Step 2. HTML 조립 (템플릿 치환 방식)
템플릿 파일에서 카드 HTML 블록을 추출하고, {{placeholder}}를 실제 값으로 치환하여 render.html을 생성한다.
절차:
- 선택된 템플릿에 따라 템플릿 파일 읽기
- 템플릿 A →
assets/template-a.html - 템플릿 B →
assets/template-b.html
- 템플릿 A →
- planner 출력의
Template과 카드 위치로 HTML 블록 결정:planner 출력 표지 (Card 1) 내용 (Card 2+) Template: A tpl-a-cover 블록 tpl-a-content 블록 Template: B tpl-b-cover 블록 tpl-b-content 블록 - 템플릿에서 CSS(
<style>블록)와 카드 HTML 블록을 추출 - 각 카드마다 해당 타입의 HTML 블록을 복제하고 placeholder 치환:
{{card-id}}→card-01,card-02, ...{{title}}→ planner 카피{{subtitle}},{{body-text}},{{top-label}}→ planner 카피{{brand}}→ 브랜드명{{image}}→ 이미지 상대 경로 (images/cover.png등)
- 치환된 카드 블록들을 하나의 HTML로 조립 →
render.html저장
placeholder 목록 및 카드 타입별 상세는 references/html-assembly.md 참조.
Step 3. Playwright로 개별 카드 렌더링
Playwright MCP 도구를 사용하여 렌더링:
render.html이 있는 디렉토리에서 로컬 HTTP 서버 기동:python3 -m http.server 8765(백그라운드 실행)file://프로토콜은 Playwright MCP에서 차단되므로 반드시 로컬 서버를 사용한다
browser_navigate로http://localhost:8765/render.html열기- 폰트/이미지 로딩 대기 —
browser_evaluate로document.fonts.ready확인 후 2초 추가 대기 browser_take_screenshot으로 각 카드를 개별 캡처:selector:#card-01,#card-02, ...- 파일명:
card-01.png,card-02.png, ... - 순서: 표지(01) → 내용 카드들(02~)
- 렌더링 완료 후 로컬 서버 프로세스 종료
상세 파이프라인은 references/playwright-pipeline.md 참조.
Step 4. 완료 보고
- 생성된 파일 목록 출력
- 파일 저장 경로 안내
출력 파일 구조
storyteller/[주제]-[YYYY-MM-DD]/
├── card-01.png ← 표지
├── card-02.png ← 내용 1
├── ...
├── card-NN.png ← 마지막 내용 카드
├── images/ ← image-maker가 생성한 원본 이미지
└── render.html ← 조립된 HTML (디버깅/재렌더링용)
에러 처리
| 상황 | 대응 |
|---|---|
| 폰트 로딩 실패 | fallback 폰트(sans-serif) 적용, 유저에게 경고 |
| 이미지 파일 누락 | placeholder 배경(#d5d5d5) 적용, 유저에게 알림 |
| Playwright 스크린샷 실패 | 재시도 1회, 실패 시 유저에게 보고 |
| HTML 렌더링 깨짐 | render.html 저장되어 있으므로 유저가 직접 확인 가능 |
하지 않는 것
- 카피 작성/수정 (→ planner)
- 이미지 생성 (→ image-maker)
- 인스타그램 업로드 (범위 밖)
참조 파일
- references/html-assembly.md — 템플릿 파일 위치, placeholder 목록, 치환 규칙, render.html 조립 방법
- references/playwright-pipeline.md — Playwright MCP 렌더링 파이프라인, 뷰포트 설정, 로딩 대기 전략
More from tendtoyj/tendtoyj-claude-skills
audience-profiler
Profile your target audience — segments, buying journey, pain points, and media habits. Use when user mentions: audience research, customer segments, buyer persona, buyer journey, customer journey, pain points, target audience, customer profiling, audience profiling, who is my customer, media consumption, attention map, customer insight, audience analysis, ideal customer, ICP, customer needs, unmet needs, buying behavior
4keyword-research
Find what to write and target using the 6 Circles Method for keyword discovery and content prioritization. Use when user mentions: keyword research, SEO keywords, content strategy, content planning, keyword analysis, search terms, ranking opportunities, content pillars, SEO opportunities, programmatic SEO, keyword gaps, content calendar, what to write, traffic strategy, organic traffic, long-tail keywords
4series-planner
Plan multi-post content series and campaigns with narrative arc design, per-post structure, framework mapping, and publishing schedules. Use when user mentions: series, campaign, content calendar, multi-post plan, launch campaign, 7-day series, content series, sequential posts, campaign planner, weekly content plan, editorial calendar, drip content, or any request involving planning more than one connected post around a theme.
4framework-builder
Build and customize storytelling frameworks (HSO, PAS, AIDA, BAB, etc.) tailored to your brand voice. Use when user mentions: storytelling framework, content framework, narrative pattern, story structure, HSO, PAS, AIDA, BAB, brand storytelling, content template, writing framework, post structure, content formula, hook pattern, how to structure posts, define my content style, set up frameworks
4research-synthesizer
Cross-analyze your market, competitive, and customer research into a unified strategy brief with actionable recommendations. Use when user mentions: strategy brief, research synthesis, cross-analysis, strategic recommendations, synthesize research, combine research, research summary, strategy recommendations, strategic insights, research brief, action plan from research, what does our research tell us, connect the dots, research report, wrap up research
4positioning-angles
Find differentiation angles using 8 positioning frameworks simultaneously. Use when user mentions: positioning, angles, differentiation, hooks, unique selling proposition, USP, value proposition, competitive advantage, messaging, positioning strategy, find angle, market positioning, how to stand out, what makes us different, messaging framework
3