pdf_to_pythonpptx_task_prompt

A task template for rebuilding an editable PowerPoint file from a rendered PDF. It uses python-pptx, a Python library for creating PowerPoint presentations.

In plain words
What is it for?
Use it to analyze representative pages, create reusable slide-building helpers, generate the PPTX and validation PDF, and check for clipping, overflow, or broken tables.
Why use it?
It provides a structured way to reproduce the PDF's layout while keeping slides editable instead of using only full-page images.

Agent

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/pdf_to_pythonpptx_task_prompt
Clone the repo
git clone --depth 1 https://github.com/BUPT-GAMMA/MASFactory
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 374 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 $0.00000 $0.00374
Opus 5 $0.00000 $0.00187
Sonnet 5 $0.00000 $0.00075
Haiku 4.5 $0.00000 $0.00037

Measured 2d ago against content hash eed6fe9fef94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pdf_to_pythonpptx_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 2d 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/pdf_to_pythonpptx_task_prompt.md · 49 lines

What it actually says

PDF -> python-pptx Recreation Task Prompt Template

Reconstruct an editable pptx in python-pptx from the rendered result of the target PDF.

Inputs

  • Target PDF: {{target_pdf_path}}
  • Per-page target PDF previews: {{preview_dir}}
  • Reusable image assets: {{assets_dir}}
  • Optional source files, if available: {{source_code_paths}}
  • Output directory: {{output_dir}}

Task Requirements

  1. First analyze the layout and visual primitives of each page in the target PDF.
  2. Extract a set of reusable python-pptx helper functions.
  3. Rebuild 2 to 3 representative slides first to validate the style and layout strategy, then expand to the full deck.
  4. Rebuild every slide using those helper functions.
  5. You must export:
    • the generation script
    • pptx
    • a validation PDF
  6. You must perform at least one sampling check that includes:
    • the cover slide
    • one method slide
    • one result slide
    • one summary slide
  7. If overflow, clipping, or tables breaking out of cards appears, keep fixing the deck instead of stopping at the first draft.

Reconstruction Priorities

  1. Page structure
  2. Title hierarchy
  3. Card and block system
  4. Image-to-text proportion
  5. Color and emphasis relationships
  6. Detail shadows and whitespace

Outputs

  • recreate_*.py
  • *.pptx
  • *.pdf
  • recreation_notes.md
    • Which elements were rebuilt with shapes/text
    • Which elements directly reuse original image assets
    • Which capability limits still remain
    • Which slides used style simplifications for stability
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. 2d ago First seen · 49 lines · 0 tokens per session scan A eed6fe9fef94

Subscribe to this mod's changes

pdf_to_pythonpptx_task_prompt is an agent published in the GitHub repository BUPT-GAMMA/MASFactory (549 stars, last pushed 14d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 374 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.