xiaohongshu
xiaohongshu
docx-automation
Generate DOCX documents from pipeline results or structured data. Uses python-docx library for Word document generation. Independent utility skill (can be called standalone or post-pipeline).
Full skill instructions
Version: 3.1.0 | Type: Independent Utility Skill Role: Generate Word documents from pipeline results or data Pipeline: Standalone or post-pipeline utility
Generate Microsoft Word documents from:
pip install python-docx>=0.8.11
# Generate from pipeline results
/docx-automation generate <source_file> [--output <output.docx>]
# Convert JSON to DOCX
/docx-automation from-json <data.json> --output report.docx
# Generate report from pipeline data
/docx-automation report <image_id> --format detailed
# With workload context
/docx-automation generate synthesis-report --workload <slug>
taskId: docx-{timestamp}
agentType: docx-automation
status: success
summary: "Generated report.docx (125KB)"
filePath: ".agent/prompts/{slug}/docx/report.docx"
fileSize: 128000
pageCount: 5
l2Path: .agent/prompts/{slug}/docx-automation/l2_index.md
requiresL2Read: false
nextActionHint: "Document at {filePath}"
# DOCX Generation Summary
## Document Info
- **Output:** report.docx
- **Size:** 125 KB
- **Pages:** 5
## Content Structure
1. Title Section
2. Content (equations, graphs)
3. Metadata
4. Provenance
## Generation Details
- Font: Times New Roman, 11pt
- Margins: 1 inch
- Header/Footer: Enabled
Generate DOCX from pipeline results.
/docx-automation generate <source_file> [--output <output.docx>] [--config <config.yaml>]
Convert structured JSON to formatted DOCX.
/docx-automation from-json <data.json> --output <output.docx> [--template <template>]
Generate detailed report from pipeline results.
/docx-automation report <image_id> --format <summary|detailed|full> [--include-images]
| Option | Type | Default | Description |
|---|---|---|---|
| output_dir | Path | ./exports | Output directory |
| page_width_inches | float | 8.5 | Page width |
| page_height_inches | float | 11.0 | Page height |
| margin_inches | float | 1.0 | Page margins |
| font_name | str | Times New Roman | Body font |
| font_size_pt | int | 11 | Body font size |
| heading_font_name | str | Arial | Heading font |
| include_toc | bool | false | Table of contents |
| include_header | bool | true | Document header |
| include_footer | bool | true | Page numbers |
from mathpix_pipeline.export.exporters.docx_exporter import (
DOCXExporter,
DOCXExporterConfig,
)
from mathpix_pipeline.schemas.export import ExportOptions
# Initialize with custom config
config = DOCXExporterConfig(
output_dir=Path("./exports"),
font_name="Arial",
font_size_pt=12,
)
exporter = DOCXExporter(config)
# Export
options = ExportOptions(include_metadata=True)
spec = exporter.export(data, options, image_id="img_001")
print(f"Exported to: {spec.file_path}")
Generated DOCX documents include:
try:
spec = exporter.export(data, options, image_id)
except ImportError:
print("Install python-docx: pip install python-docx")
except ExporterError as e:
print(f"Export error: {e.message}")
[Independent Utility]
|
/docx-automation ---- Can be called standalone
|
+-- Output: .agent/prompts/{slug}/docx/{filename}.docx
# Priority:
# 1. --workload argument
# 2. Active workload (_active_workload.yaml)
# 3. New workload (document type based)
handoff:
skill: "docx-automation"
workload_slug: "{slug}"
status: "completed"
next_action:
skill: null
arguments: null
required: false
reason: "Document generated successfully"
output:
path: ".agent/prompts/{slug}/docx/{filename}.docx"
format: "docx"
if (isPostCompactSession()) {
const slug = await getActiveWorkload();
if (slug) {
const exportDir = `.agent/prompts/${slug}/docx/`;
const partialFiles = await Glob(`${exportDir}/*.partial`);
if (partialFiles.length > 0) {
console.log("Resuming partial document generation...");
}
}
}
| Version | Change |
|---|---|
| 3.1.0 | Cleaned duplicate blocks, normalized frontmatter |
| 3.0.0 | EFL Pattern integration, context: fork |
| 2.2.0 | Standalone execution, handoff contract |
| 2.1.0 | V2.1.19 spec compatibility |
| 1.1.1 | Initial DOCX generation |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience