html_to_pdf_task_prompt

html_to_pdf_task_prompt is an agent for Claude Code from BUPT-GAMMA/MASFactory. It costs 0 tokens per session (263 once invoked), scanned A, original, Apache-2.0.

A task template for turning an HTML slide deck into a PDF and checking the exported pages with image previews.

In plain words
What is it for?
Use it to export slides, create PNG previews, validate page count and completeness, and record the export method and remaining issues.
Why use it?
It helps catch missing content, blank pages, unloaded fonts, and layout problems that a successful export command may not reveal.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bupt-gamma/masfactory/html_to_pdf_task_prompt
Clone the repo
git clone --depth 1 https://github.com/BUPT-GAMMA/MASFactory

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html_to_pdf_task_prompt

README.md
[![agentmods](https://agentmods.dev/badge/agents/bupt-gamma/masfactory/html_to_pdf_task_prompt.svg)](https://agentmods.dev/agents/bupt-gamma/masfactory/html_to_pdf_task_prompt)
Your own site
<a href="https://agentmods.dev/agents/bupt-gamma/masfactory/html_to_pdf_task_prompt"><img src="https://agentmods.dev/badge/agents/bupt-gamma/masfactory/html_to_pdf_task_prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 263 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00263
Opus 5 $0.00000 $0.00131
Sonnet 5 $0.00000 $0.00053
Haiku 4.5 $0.00000 $0.00026

Measured 6d ago against content hash 1288eff204da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

html_to_pdf_task_prompt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

applications/ohnoppt/workflows/agents/html_to_pdf_task_prompt.md · 35 lines

What it actually says

HTML -> PDF Export Task Prompt Template

Export an HTML slide deck into a stable PDF.

Inputs

  • HTML file: {{html_path}}
  • Asset directory: {{assets_dir}}
  • Output PDF: {{pdf_output_path}}
  • Preview directory: {{preview_dir}}

Task Requirements

  1. First decide on the export strategy:
    • If the print CSS is stable, exporting directly from the browser to PDF is allowed.
    • If print mode breaks the layout, switch to "capture each slide and assemble the PDF."
  2. After export, generate at least key-page PNG previews.
  3. Check:
    • Whether the page count is correct
    • Whether each page is complete
    • Whether there are blank pages, pages missing images, or pages that only contain titles
    • Whether fonts finished loading
    • Whether animation initial states or lazy-loaded elements failed to appear
  4. If you find problems, do not stop at a bad result. Continue refining the export strategy.

Outputs

  • slides.pdf
  • preview/slide-*.png
  • export_report.md
    • Which export strategy was used
    • viewport / page size
    • Which pages were validated
    • What known issues still remain
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 35 lines · 0 tokens per session scan A 1288eff204da

Subscribe to this mod's changes

html_to_pdf_task_prompt is an agent published in the GitHub repository BUPT-GAMMA/MASFactory (549 stars, last pushed 17d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 263 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

contract-review

Contract review agent. On a schedule it checks {{contractsfolder}} in Google Drive for contracts that haven't been reviewed yet, summarizes each against the contract-playbook, flags clauses that deviate, drafts redlines as Docs suggested edits on the contract, and posts the summary to {{legalchannel}} — holding every…

kortix-ai/suna · 76 tokens

deep-reader

Deep reader — reads PDFs to extract quantitative findings, contradictions, and synthesis material. Prioritizes high-value sections (results, methods) over front matter. Final iteration produces sectionmap.md bridging reading to writing.

angadhn/botference · 0 tokens

reference-builder

Creates exhaustive technical references and API documentation. Generates comprehensive parameter listings, configuration guides, and searchable reference materials. Use PROACTIVELY for API docs, configuration references, or complete technical specifications.

echoVic/blade-code · 41 tokens

messaging-cache

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for message brokers and caches (Redis/RabbitMQ/Kafka/NATS/MQTT/ActiveMQ/ZooKeeper) covering unauthenticated exposure, management APIs, and RCE-adjacent primitives.

ASCIT31/Dark-Moon · 56 tokens

round-trip-reconstructor

Act as a document reconstruction specialist. Your purpose is to prove a distillate's completeness by reconstructing the original source documents from the distillate alone.

PabloLION/bmad-plugin · 0 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens