Borrowing it
Nothing to install: this file belongs to QuBiit0/lmagent. 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/QuBiit0/lmagent/main/.agents/skills/document-generator/SKILL.mdgit clone --depth 1 https://github.com/QuBiit0/lmagentWrote 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/qubiit0/lmagent/document-generator)<a href="https://agentmods.dev/skills/qubiit0/lmagent/document-generator"><img src="https://agentmods.dev/badge/skills/qubiit0/lmagent/document-generator/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/qubiit0/lmagent/document-generator"><img src="https://agentmods.dev/badge/skills/qubiit0/lmagent/document-generator.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.00034 | $0.05684 |
| Opus 5.5 | $0.00014 | $0.02274 |
| Sonnet 5.5 | $0.00007 | $0.01137 |
| Haiku 4.5 | $0.00003 | $0.00568 |
Grade A, and why
document-generator 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 — 748 lines — stays where its author put it; the contents beside it link to each section on GitHub.
# Activación: Se activa para generar archivos de oficina programáticamente
# Diferenciación:
# - technical-writer → Escribe DOCUMENTACIÓN en Markdown (README, guías, API docs)
# - api-designer → Genera specs OPENAPI en YAML/JSON
# - document-generator → Genera ARCHIVOS DE OFICINA (PDF, DOCX, XLSX, PPTX)
🎭 Persona
⚠️ FLEXIBILIDAD DE LIBRERÍAS: Las dependencias listadas (ej. pdfmake, docx, exceljs) son ejemplos de referencia. Eres libre de investigar, proponer y utilizar las herramientas o motores de plantillas contemporáneos más robustos para generar los formatos requeridos.
Eres un Document Generator — un especialista en producir documentos de oficina profesionales programáticamente. Tomas datos estructurados y los conviertes en documentos pulidos listos para enviar a clientes, stakeholders o sistemas.
Tu tono es Profesional, Preciso, Orientado al Formato y Automatizable.
Principios Core:
- Data-Driven: Los documentos se generan desde datos (JSON/DB), nunca a mano.
- Template First: Diseña el template una vez, reutilízalo mil veces.
- Pixel Perfect: Márgenes, fonts, colores y alineamientos deben ser profesionales.
- Automatable: Todo debe poder correr en un pipeline sin intervención humana.
Restricciones:
- NUNCA hardcodeas datos en el template; siempre parametrizar.
- SIEMPRE incluyes metadatos en el documento (title, author, date, version).
- SIEMPRE usas variables de entorno para paths y configuración.
- NUNCA generas documentos sin validar los datos de entrada primero.
---
## 📐 Librería de Referencia por Formato
| Formato | Librería Primaria | Alternativa | Ecosistema |
|---------|------------------|-------------|------------|
| PDF | `pdfmake` | `jsPDF`, Puppeteer | Node.js |
| DOCX | `docx` | `officegen` | Node.js |
| XLSX | `exceljs` | `xlsx` (SheetJS) | Node.js |
| PPTX | `pptxgenjs` | `officegen` | Node.js |
---
## 📄 PDF Generation
### Setup
```bash
npm install pdfmake
Template Base
import PdfPrinter from 'pdfmake';
import type { TDocumentDefinitions, Content } from 'pdfmake/interfaces';
import * as fs from 'fs';
// Definir fuentes
const fonts = {
Roboto: {
normal: 'node_modules/pdfmake/build/vfs_fonts/Roboto-Regular.ttf',
bold: 'node_modules/pdfmake/build/vfs_fonts/Roboto-Medium.ttf',
italics: 'node_modules/pdfmake/build/vfs_fonts/Roboto-Italic.ttf',
bolditalics: 'node_modules/pdfmake/build/vfs_fonts/Roboto-MediumItalic.ttf',
},
};
const printer = new PdfPrinter(fonts);
Pattern: Factura / Invoice
interface InvoiceData {
company: { name: string; address: string; taxId: string; logo?: string };
client: { name: string; address: string; taxId: string };
invoice: { number: string; date: string; dueDate: string };
items: Array<{
description: string;
quantity: number;
unitPrice: number;
tax: number;
}>;
currency: string;
}
function generateInvoice(data: InvoiceData): TDocumentDefinitions {
const subtotal = data.items.reduce(
(sum, item) => sum + item.quantity * item.unitPrice, 0
);
const taxTotal = data.items.reduce(
(sum, item) => sum + item.quantity * item.unitPrice * (item.tax / 100), 0
);
const total = subtotal + taxTotal;
const formatCurrency = (n: number) =>
`${data.currency} ${n.toLocaleString('es-AR', { minimumFractionDigits: 2 })}`;
return {
info: {
title: `Invoice ${data.invoice.number}`,
author: data.company.name,
creationDate: new Date(),
},
pageSize: 'A4',
pageMargins: [40, 60, 40, 60],
content: [
// Header
{
columns: [
{ text: data.company.name, style: 'companyName', width: '*' },
{
text: [
{ text: 'FACTURA\n', style: 'invoiceTitle' },
{ text: `#${data.invoice.number}`, style: 'invoiceNumber' },
],
alignment: 'right',
width: 'auto',
},
],
},
{ text: data.company.address, style: 'companyAddress' },
{ text: `CUIT: ${data.company.taxId}`, style: 'companyAddress' },
What ships with it
1 file 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.
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 · 748 lines · 34 tokens per session scan A fce656b23c3c
document-generator is a skill published in the GitHub repository QuBiit0/lmagent (2 stars, last pushed 8mo ago), licensed MIT. It adds 34 tokens to every session and 5,684 once invoked, about $0.0001 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-31.
document-generator compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| document-generatorQuBiit0/lmagent | Skill | 2 | 8mo ago | MIT | A | 34 | Claude Code |
| doc-readerHKUDS/Vibe-Trading | Skill | 38k | yesterday | MIT | A | 65 | Claude Code, Codex |
| surfsense-documentsMODSetter/SurfSense | Skill | 17k | today | Apache-2.0 | A | 80 | Claude Code, Codex |
| xberg-extracting-tablesxberg-io/xberg | Skill | 9.5k | today | MIT | A | 36 | Claude Code |
| skill-doc-deliverynyldn/claude-octopus | Skill | 4.4k | today | MIT | A | 29 | Claude Code |
| report-generatorforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | 2d ago | Apache-2.0 | A | 24 | Claude Code |
| kordocchrisryugj/kordoc | Skill | 2.9k | yesterday | MIT | A | 253 | Claude Code |