document-exports

document-exports is a skill for Claude Code, Codex from pedroiff0/awesome-skills. It costs 44 tokens per session (3,487 once invoked), scanned A, original, MIT.

A guide for creating and testing downloadable PDF and CSV exports in a Node and Express finance application. It covers streamed PDFs, spreadsheet-friendly CSV files, and money stored as cents.

In plain words
What is it for?
It is for adding statement and report endpoints, generating PDF or CSV files, formatting Brazilian currency, and verifying exports with Jest and Supertest.
Why use it?
It helps prevent broken downloads, incorrect currency calculations, and tests that check only the HTTP status instead of the exported file.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit It is for adding statement and report endpoints, generating PDF or CSV files, formatting Brazilian currency, and verifying exports with Jest and Supertest.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pedroiff0/awesome-skills/document-exports
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.

Any agent
npx skills add pedroiff0/awesome-skills --skill document-exports
Clone the repo
git clone --depth 1 https://github.com/pedroiff0/awesome-skills

Made for: Claude Code, Codex.

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 document-exports

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedroiff0/awesome-skills/document-exports/github.svg)](https://agentmods.dev/skills/pedroiff0/awesome-skills/document-exports)
Your own site
<a href="https://agentmods.dev/skills/pedroiff0/awesome-skills/document-exports"><img src="https://agentmods.dev/badge/skills/pedroiff0/awesome-skills/document-exports/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.

agentmods 80×15 button for document-exports

Your own site · 80×15
<a href="https://agentmods.dev/skills/pedroiff0/awesome-skills/document-exports"><img src="https://agentmods.dev/badge/skills/pedroiff0/awesome-skills/document-exports.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,487 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.00044 $0.03487
Opus 5 $0.00022 $0.01743
Sonnet 5 $0.00009 $0.00697
Haiku 4.5 $0.00004 $0.00349

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

Security

Grade A, and why

document-exports 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify-pdf-export.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/software-development/document-exports/SKILL.md · 279 lines

How it starts

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

Document Exports (PDF / CSV) for Node + Express

Class of work: build a backend endpoint that returns a binary PDF or a text CSV for download (Content-Disposition: attachment), then write a test that actually verifies the bytes — not just status === 200.

Load this skill when the task is "export to PDF", "generate a CSV report", "statement/extrato as PDF", or any downloadable-file endpoint that must be tested with supertest/Jest.

When to use

  • PDF generation with pdfkit streamed to res.
  • CSV generation (Excel-pt-BR friendly, BOM, quoted fields).
  • Any test that must assert on PDF content or CSV bytes.

Stack assumptions

Node, Express, pdfkit (PDF), jest + supertest (tests), Mongoose-style userId scoping. Money is stored/aggregated as integer cents (amountCents) — never float. Format to R$ 1.234,56 or decimal 1234.56 only at render time.


PDF with pdfkit (streamed, do NOT buffer whole file)

Pipe the pdfkit Document straight to the response. pdfkit is a WritableStream.

const PDFDocument = require('pdfkit');

function gerarExtratoPDF({ usuario, month, resumo, lancamentos }) {
  const doc = new PDFDocument({ margin: 50, size: 'A4', compress: false });
  // ... draw header, summary, table ...
  doc.flushPages();
  return doc; // caller does: doc.pipe(res); doc.end();
}

// controller
const doc = pdfService.gerarExtratoPDF({ /*...*/ });
res.setHeader('Content-Type', 'application/pdf');
res.setHeader('Content-Disposition', `attachment; filename="extrato-${month}.pdf"`);
doc.pipe(res);
doc.end();

compress: false keeps text readable in the binary (useful for test inspection / auditing). Set bufferPages: true only if you need to draw a footer on every page.

CSV (Excel pt-BR friendly)

  • Emit CRLF line endings (\r\n) and a UTF-8 BOM so Excel opens acentos correctly. Add the BOM once, in bytes, at the controller — do NOT prepend a BOM character inside the string (double-BOM bug).
  • Escape fields containing , " \n \r by wrapping in "..." and doubling inner quotes (""").

Read the full file on GitHub · 279 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 279 lines · 44 tokens per session scan A 94966ca006d7

Subscribe to this mod's changes

document-exports is a skill published in the GitHub repository pedroiff0/awesome-skills (1 stars, last pushed 3d ago), licensed MIT. It adds 44 tokens to every session and 3,487 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-03.

Related

Other skills, from other repositories

comps-analysis

Build comparable company analysis in Excel — operating metrics, valuation multiples, statistical benchmarking vs peer sets. Pairs with excel-author. Use for public-company valuation, IPO pricing, sector benchmarking, or outlier detection.

cyborg-garden/hermes-agent-mt · 46 tokens

lbo-model

Build leveraged buyout models in Excel — sources & uses, debt schedule, cash sweep, exit multiple, IRR/MOIC sensitivity. Pairs with excel-author. Use for PE screening, sponsor-case valuation, or illustrative LBO in a pitch.

cyborg-garden/hermes-agent-mt · 55 tokens

excel-author

Build auditable Excel workbooks headless with openpyxl — blue/black/green cell conventions, formulas over hardcodes, named ranges, balance checks, sensitivity tables. Use for financial models, audit outputs, reconciliations.

cyborg-garden/hermes-agent-mt · 50 tokens

dcf-model

Build institutional-quality DCF valuation models in Excel — revenue projections, FCF build, WACC, terminal value, Bear/Base/Bull scenarios, 5x5 sensitivity tables. Pairs with excel-author. Use for intrinsic-value equity analysis.

cyborg-garden/hermes-agent-mt · 53 tokens

3-statement-model

Build fully-integrated 3-statement models (IS, BS, CF) in Excel with working capital schedules, D&A roll-forwards, debt schedule, and the plugs that make cash and retained earnings tie. Pairs with excel-author.

cyborg-garden/hermes-agent-mt · 54 tokens

merger-model

Build accretion/dilution (merger) models in Excel — pro-forma P&L, synergies, financing mix, EPS impact. Pairs with excel-author. Use for M&A pitches, board materials, or deal evaluation.

cyborg-garden/hermes-agent-mt · 54 tokens