Export editorial content to branded Word document (.docx) using python-docx. Generates texto alumno and guia docente as separate files ready for layout team. Trigger on: exportar docx, export word, generar word, documento word, maquetacion, docx, enviar a diagramacion.
From scribanpx claudepluginhub javimontano/mao-scriba --plugin scribaThis skill is limited to using the following tools:
evals/evals.jsonreferences/docx-generation-patterns.mdProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Implements distributed tracing with Jaeger/Tempo for microservices, including Kubernetes/Docker setup and OpenTelemetry instrumentation (Python/Flask). Use for debugging latency, dependencies, and request flows.
The Word document bridges AI-generated content with human layout workflows. It must be clean, well-structured, and immediately usable by diagramadores.
Generate branded Word documents from editorial content using python-docx, producing separate files for texto alumno and guia docente.
Read brand-config.json for color tokens and typography settings. Fallback: JM Labs defaults (#6366F1 primary, #22D3EE accent, #EFEAE4 background, Inter font).
Collect all generated units (read from units/ directory or session state).
Generate texto alumno DOCX:
Generate guia docente DOCX:
Write DOCX files using python-docx script:
from docx import Document
from docx.shared import Inches, Pt, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
Save to exports/ directory.
| Name | Source | Required |
|---|---|---|
| Generated units | units/ directory | Yes |
| Generated guides | guides/ directory | For guia docente |
| brand-config.json | references/ | Recommended |
| Artifact | Format | Destination |
|---|---|---|
| Texto alumno | .docx | exports/ |
| Guia docente | .docx | exports/ |
# Export DOCX — Report
## Archivos Generados
| Archivo | Tamano | Unidades | Estado |
|---------|--------|----------|--------|
| exports/{asig}_{grado}_texto_alumno.docx | N KB | N | OK |
| exports/{asig}_{grado}_guia_docente.docx | N KB | N | OK |
## Estructura del Documento
- Portada: {present/absent}
- Tabla de contenidos: {present/absent}
- Unidades: N/N incluidas
- Tablas de rubrica: N formateadas
- Saltos de pagina: {correct/issues}
## Branding
- Colores: {applied from brand-config / JM Labs defaults}
- Fuente: {Inter / fallback}
pip install python-docx automatically/scriba:unit firstreferences/docx-generation-patterns.md — python-docx patterns and style templates