export-pdf

export-pdf is a command for Claude Code from bdfinst/agentic-dev-team. It costs 31 tokens per session (1,139 once invoked), scanned A, original, MIT.

A command that converts a Markdown report—a plain-text document with formatting—to a PDF file. It uses Pandoc when available, WeasyPrint as a fallback, and warns if neither is installed.

In plain words
What is it for?
It is for exporting security assessments, red-team reports, cross-repository summaries, and other Markdown reports as PDFs.
Why use it?
It removes the manual work of turning readable Markdown reports into shareable PDF documents and lets you choose the output file and stylesheet.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the security-assessment plugin — 3 skills, 5 commands, 13 agents shipped together

Good fit It is for exporting security assessments, red-team reports, cross-repository summaries, and other Markdown reports as PDFs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/bdfinst/agentic-dev-team/export-pdf
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.

Clone the repo
git clone --depth 1 https://github.com/bdfinst/agentic-dev-team

Made for: Claude Code.

Or install security-assessment, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 13 agents.

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 export-pdf

README.md
[![agentmods](https://agentmods.dev/badge/commands/bdfinst/agentic-dev-team/export-pdf.svg)](https://agentmods.dev/commands/bdfinst/agentic-dev-team/export-pdf)
Your own site
<a href="https://agentmods.dev/commands/bdfinst/agentic-dev-team/export-pdf"><img src="https://agentmods.dev/badge/commands/bdfinst/agentic-dev-team/export-pdf.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,139 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00031 $0.01139
Opus 5 $0.00015 $0.00570
Sonnet 5 $0.00006 $0.00228
Haiku 4.5 $0.00003 $0.00114

Measured 2d ago against content hash 02fce42c2d18, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

export-pdf 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.

plugins/security-assessment/commands/export-pdf.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/export-pdf

You have been invoked with the /export-pdf command.

Role

Converter from Markdown to PDF. Uses pandoc when available (cleaner tables, wider Markdown support); falls back to weasyprint when pandoc is absent; skips with a warning when neither is installed.

Used for:

  • Executive reports from /security-assessment (memory/report-<slug>.md)
  • Red-team reports from /redteam-model (harness/redteam/results/adversarial-report.md)
  • Cross-repo summaries from /cross-repo-analysis
  • Any Markdown produced by this plugin's agents

Parse arguments

Arguments: $ARGUMENTS

Positional: <report.md> — path to the input Markdown file.

Flags:

  • --output <path>: output PDF path. Default: same basename with .pdf extension.
  • --css <path>: custom CSS stylesheet. Default: plugins/security-assessment/templates/report-css/default.css.

Steps

1. Validate inputs

  • Input file exists and is readable.
  • If --output is passed, its parent directory exists.
  • If --css is passed, the CSS file exists.

2. Detect available converter

Check in order:

  1. pandoc + wkhtmltopdf (or pandoc with --pdf-engine=weasyprint if weasyprint is installed).
  2. weasyprint with a small markdown-to-html wrapper.
  3. Neither → skip.

3. Convert

Preferred (pandoc):

pandoc "$INPUT" \
  --pdf-engine=weasyprint \
  --css="$CSS" \
  --standalone \
  --metadata title="$(basename "$INPUT" .md)" \
  -o "$OUTPUT"

Fallback (weasyprint + python-markdown):

The input Markdown is derived from a scanned repo / probed model (see probe_08_report_generator.py, service-comm-parser.py) — treat it as untrusted. Rendered HTML/CSS can reference remote resources (<img src="https://...">, CSS url(...)), and weasyprint fetches those by default, which is a plausible SSRF vector at PDF-conversion time. Pass a url_fetcher that blocks every non-local scheme so conversion never makes an outbound network request:

python3 -c "
import sys, markdown
from weasyprint import HTML, CSS

def _no_remote_fetch(url, *args, **kwargs):
    if not url.startswith(('file://', 'data:')):
        raise ValueError(f'blocked remote resource fetch during PDF export: {url}')
    from weasyprint import default_url_fetcher
    return default_url_fetcher(url, *args, **kwargs)

with open('$INPUT') as f:
    md_text = f.read()
html_body = markdown.markdown(md_text, extensions=['tables', 'fenced_code', 'codehilite'])
html = f'<html><head><meta charset=\"utf-8\"></head><body>{html_body}</body></html>'
HTML(string=html, url_fetcher=_no_remote_fetch).write_pdf(
    '$OUTPUT', stylesheets=[CSS(filename='$CSS')]
)
"

Read the full file on GitHub · 144 lines

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 · 144 lines · 31 tokens per session scan A 02fce42c2d18

Subscribe to this mod's changes

export-pdf is a command published in the GitHub repository bdfinst/agentic-dev-team (280 stars, last pushed 2d ago), licensed MIT. It adds 31 tokens to every session and 1,139 once invoked, about $0.0002 per session on Opus 5. 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-09-05.