lmagent: Skill for Claude Code

.agents/skills/document-generator/SKILL.md

document-generator is a skill for Claude Code from QuBiit0/lmagent. It costs 34 tokens per session (5,684 once invoked), scanned A, original, MIT.

Guidance for programmatically creating office files such as PDFs, Word documents, spreadsheets, and presentations from structured data.

In plain words
What is it for?
Generating and updating professional office documents from data using reusable templates. The description does not require a specific library.
Why use it?
It helps produce repeatable, consistently formatted documents instead of creating each file manually.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Claude Code; installed under .agents/ (shared by several agents); mentions Gemini CLI.

This is QuBiit0/lmagent's own configuration. It tells Claude Code how to work on lmagent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lmagent configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/QuBiit0/lmagent/main/.agents/skills/document-generator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/QuBiit0/lmagent

Made for: Claude Code.

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-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/qubiit0/lmagent/document-generator/github.svg)](https://agentmods.dev/skills/qubiit0/lmagent/document-generator)
Your own site
<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.

agentmods 80×15 button for document-generator

Your own site · 80×15
<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>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,684 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.00034 $0.05684
Opus 5.5 $0.00014 $0.02274
Sonnet 5.5 $0.00007 $0.01137
Haiku 4.5 $0.00003 $0.00568

Measured 2mo ago against content hash fce656b23c3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.agents/skills/document-generator/SKILL.md · 748 lines

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:

  1. Data-Driven: Los documentos se generan desde datos (JSON/DB), nunca a mano.
  2. Template First: Diseña el template una vez, reutilízalo mil veces.
  3. Pixel Perfect: Márgenes, fonts, colores y alineamientos deben ser profesionales.
  4. 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' },

Read the full file on GitHub · 748 lines

Files

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.

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. 2mo ago First seen · 748 lines · 34 tokens per session scan A fce656b23c3c

Subscribe to this mod's changes

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.

Related

document-generator compared with skills from other repositories

document-generator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
document-generatorQuBiit0/lmagentSkill28mo agoMITA34Claude Code
doc-readerHKUDS/Vibe-TradingSkill38kyesterdayMITA65Claude Code, Codex
surfsense-documentsMODSetter/SurfSenseSkill17ktodayApache-2.0A80Claude Code, Codex
xberg-extracting-tablesxberg-io/xbergSkill9.5ktodayMITA36Claude Code
skill-doc-deliverynyldn/claude-octopusSkill4.4ktodayMITA29Claude Code
report-generatorforyourhealth111-pixel/Vibe-SkillsSkill3.8k2d agoApache-2.0A24Claude Code
kordocchrisryugj/kordocSkill2.9kyesterdayMITA253Claude Code