Borrowing it
Nothing to install: this file belongs to microsoftgbb/project-nighthawk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/microsoftgbb/project-nighthawk/main/.github/skills/Nighthawk-PDFExport/SKILL.mdgit clone --depth 1 https://github.com/microsoftgbb/project-nighthawkWrote 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.
[](https://agentmods.dev/skills/microsoftgbb/project-nighthawk/nighthawk-pdfexport)<a href="https://agentmods.dev/skills/microsoftgbb/project-nighthawk/nighthawk-pdfexport"><img src="https://agentmods.dev/badge/skills/microsoftgbb/project-nighthawk/nighthawk-pdfexport/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/microsoftgbb/project-nighthawk/nighthawk-pdfexport"><img src="https://agentmods.dev/badge/skills/microsoftgbb/project-nighthawk/nighthawk-pdfexport.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.01335 |
| Opus 5.5 | $0.00017 | $0.00534 |
| Sonnet 5.5 | $0.00009 | $0.00267 |
| Haiku 4.5 | $0.00004 | $0.00134 |
Grade A, and why
nighthawk-pdf-export 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Nighthawk PDF Export
Converts a Nighthawk markdown report (notes/Nighthawk-*.md) to a styled PDF.
Tool Detection Order
Always probe before choosing an approach:
which pandoc wkhtmltopdf md-to-pdf 2>/dev/null
python3 -c "import weasyprint" 2>/dev/null && echo "weasyprint: ok" || echo "weasyprint: not installed"
Option A — pandoc (preferred, if installed)
pandoc "notes/Nighthawk-YYYY-MM-DD-topic.md" \
-o "notes/Nighthawk-YYYY-MM-DD-topic.pdf" \
--pdf-engine=wkhtmltopdf \
-V geometry:margin=1in -V fontsize=11pt
# fallback engines in order: xelatex, pdflatex
Option B — Python + weasyprint (macOS fallback, supports Mermaid)
This is the verified working approach on macOS. It handles Mermaid diagrams by pre-rendering them to hi-res PNG via Puppeteer, then embedding them inline before weasyprint processes the document.
Do NOT use SVG — weasyprint renders SVG shapes but drops all text (missing font resolution). Always use PNG.
Step 1 — Install dependencies
python3 -m venv /tmp/pdf-venv
/tmp/pdf-venv/bin/pip install --quiet markdown weasyprint
Step 2 — Pre-render Mermaid diagrams to PNG
Run this for each report that contains a ```mermaid block:
# Extract the mermaid source
awk '/^```mermaid$/,/^```$/' notes/Nighthawk-YYYY-MM-DD-topic.md | sed '1d;$d' > /tmp/diagram.mmd
# Render to hi-res PNG (--width 3000 --scale 3 ensures readable text in PDF)
npx @mermaid-js/mermaid-cli -i /tmp/diagram.mmd -o /tmp/diagram.png --width 3000 --scale 3
Step 3 — Generate PDF with embedded diagram
Write the following to /tmp/build_pdf.py and run with the venv:
import pathlib, re, base64, markdown
from weasyprint import HTML
MD_IN = "/Volumes/Extreme SSD/src/project-nighthawk/notes/Nighthawk-YYYY-MM-DD-topic.md"
PNG_IN = "/tmp/diagram.png" # omit if no Mermaid diagram
PDF_OUT = "/Volumes/Extreme SSD/src/project-nighthawk/notes/Nighthawk-YYYY-MM-DD-topic.pdf"
CSS = """
body { font-family: Georgia, serif; font-size: 11pt; line-height: 1.6; padding: 40px; max-width: 900px; margin: auto; }
h1 { font-size: 20pt; border-bottom: 2px solid #333; padding-bottom: 8px; margin-top: 24px; }
h2 { font-size: 15pt; border-bottom: 1px solid #666; margin-top: 20px; }
h3 { font-size: 13pt; margin-top: 16px; }
code { font-family: 'Courier New', monospace; background: #f4f4f4; padding: 2px 4px; border-radius: 3px; font-size: 9pt; }
pre { background: #f4f4f4; padding: 12px; border-radius: 4px; border-left: 3px solid #666; page-break-inside: avoid; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; margin: 12px 0; page-break-inside: avoid; }
th { background: #333; color: white; padding: 8px; text-align: left; }
td { padding: 6px 8px; border: 1px solid #ccc; }
tr:nth-child(even) { background: #f9f9f9; }
blockquote { border-left: 4px solid #999; padding-left: 16px; color: #555; margin: 12px 0; }
a { color: #0066cc; }
img { max-width: 100%; height: auto; margin: 16px 0; }
"""
md_text = pathlib.Path(MD_IN).read_text(encoding="utf-8")
# Replace mermaid fenced block with embedded hi-res PNG
png_path = pathlib.Path(PNG_IN)
if png_path.exists():
png_b64 = base64.b64encode(png_path.read_bytes()).decode()
png_tag = f'<img src="data:image/png;base64,{png_b64}" alt="Diagram" />'
md_text = re.sub(r'```mermaid\n.*?```', png_tag, md_text, flags=re.DOTALL)
body = markdown.markdown(md_text, extensions=["tables", "fenced_code", "toc"])
html = f"<!DOCTYPE html><html><head><meta charset='utf-8'><style>{CSS}</style></head><body>{body}</body></html>"
HTML(string=html).write_pdf(PDF_OUT)
size = pathlib.Path(PDF_OUT).stat().st_size
print(f"PDF written: {PDF_OUT} ({size:,} bytes / {size//1024} KB)")
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.
- 2mo ago First seen · 112 lines · 43 tokens per session scan A e2b893bd4bb8
nighthawk-pdf-export is a skill published in the GitHub repository microsoftgbb/project-nighthawk (33 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 1,335 once invoked, about $0.0002 per session on Opus 5.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-08-30.
nighthawk-pdf-export compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nighthawk-pdf-exportmicrosoftgbb/project-nighthawk | Skill | 33 | 5mo ago | MIT | A | 43 | Claude Code, Codex |
| apify-youtube-transcript-scrapersickn33/agentic-awesome-skills | Skill | 49k | yesterday | MIT | A | 48 | Claude Code |
| foundry-hosted-agent-validationmicrosoft/agent-framework | Skill | 15k | yesterday | MIT | A | 82 | Claude Code, Codex |
| skill-doc-deliverynyldn/claude-octopus | Skill | 4.4k | today | MIT | A | 29 | Claude Code |
| meta-web-to-pdf-briefingopensquilla/opensquilla | Skill | 7.1k | 6d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| chat-complex-documentsvellum-ai/vellum-assistant | Skill | 1.5k | 2d ago | MIT | A | 90 | Claude Code, Codex |
| paper-readerhuangkiki/dailypaper-skills | Skill | 1.3k | 4d ago | Apache-2.0 | A | 135 | Claude Code, Codex |