agentsclimarketplace

Html to pdf slide deck

Skill bokuwalily/claude-code-skills/skills/html-to-pdf-slide-deck

HTMLから16:9スライド型PDF(提案資料・ポートフォリオ・ピッチデック)を生成するとき。「PDFで提案資料」「スライドにして」「めくって見せる資料」等で発火。file://がPlaywright/Chromeでブロックされる罠の回避込み。From its SKILL.md

Install
npx -y skills add bokuwalily/claude-code-skills --skill html-to-pdf-slide-deck

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 934 tokens by cl100k_base, as published. Nobody here has run it

Procedure

  1. スライドHTMLを書く(1ファイル完結)。各スライド=1ページ:
    @media print {
      @page { size: 1280px 720px; margin: 0; }   /* 96dpiで16:9。px指定が効く */
      html, body { background: #fff; }
      .slide { margin: 0; page-break-after: always; }
      .slide:last-child { page-break-after: auto; }
    }
    .slide { width: 1280px; height: 720px; padding: 70px 88px; overflow: hidden;
             display: flex; flex-direction: column; }
    @media screen { .slide { margin: 24px auto; box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); } }
    
  2. ローカルサーバで配信file://はPlaywright/Chrome headlessでブロックされる):
    cd <dir> && (python3 -m http.server 8777 >/dev/null 2>&1 &) ; sleep 1
    curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8777/deck.html   # 200を確認
    
  3. headless ChromeでPDF化
    CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
    "$CHROME" --headless=new --disable-gpu --no-pdf-header-footer \
      --print-to-pdf="出力.pdf" "http://127.0.0.1:8777/deck.html"
    
  4. 必ず自己検証Read ツールでPDFを pages:"1-8" 指定して全ページ目視。はみ出し・見切れ・フッター被りを確認。
  5. 終わったら pkill -f "http.server 8777" でサーバ停止。

Pitfalls

  • file:// は使えない:Playwright MCPは Access to "file:" protocol is blocked、Chrome headlessも不安定。必ずhttp配信。
  • 縦オーバーフローが最大の敵.slideoverflow:hiddenなので超過分は無音で見切れる。グリッドが縦に伸びる系(カード2段・統計4枚)は要注意。実レンダリングで毎回確認。統計は横1列、説明文は短く。
  • --no-pdf-header-footer必須:付けないと日付・URLが各ページに焼き込まれる。
  • フォント:Google Fonts(明朝=Shippori Mincho+ゴシック=Zen Kaku Gothic New 等)はネット接続時のみ。オフライン提示があるならローカル埋め込みを検討。
  • スクショ検証時のreveal罠:IntersectionObserverのopacity:0初期値はhtml.jsでゲートし、JS無効/印刷時は表示させる(でないとPDF/フルページスクショで内容が消える)。

Verification

  • Read でPDF全ページを画像表示し、(1)見切れゼロ (2)フッターと本文が被らない (3)数字・固有名詞が実データ通り、を目視確認してから完了宣言する。

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.