← 返回
未分类

corporate-doc-builder

Generate polished .docx documents by injecting Markdown content into an existing Word template, preserving the template's cover page, TOC, fonts, headers, and footers. Use when the user has a .docx template plus reference materials (documents, spreadsheets, slides, or source code) and wants a production-ready Word deliverable. Covers the full pipeline from template analysis through chapter drafting to python-docx injection.
Generate polished .docx documents by injecting Markdown content into an existing Word template, preserving the template's cover page, TOC, fonts, headers, and footers. Use when the user has a .docx template plus reference materials (documents, spreadsheets, slides, or source code) and wants a production-ready Word deliverable. Covers the full pipeline from template analysis through chapter drafting to python-docx injection.
user_55c3b284
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 73
下载
💾 0
安装
1
版本
#latest

概述

Corporate Doc Builder

Overview

Turning a corporate .docx template plus scattered source materials into a finished document is error-prone. Models routinely break template styles, exceed token limits, hallucinate TOC entries, and produce images that overlap with text.

This skill codifies a battle-tested 6-stage pipeline that avoids these traps:

1. Template Analysis  ->  Extract TOC, styles, placeholders
2. Spec               ->  Write a design spec for the document
3. Plan               ->  Break work into per-chapter tasks (optional for simple docs)
4. Research           ->  Summarize source materials into reusable notes
5. Authoring          ->  Write each chapter as an independent Markdown file
6. Injection          ->  Render diagrams + inject Markdown into the template

Core principle: Template styles are preserved via python-docx copy-and-inject, never via pandoc whole-file conversion. All diagrams use Mermaid.

When to Trigger

Activate this skill when ANY of the following apply:

  • The user asks to "write a document based on a template" or "generate a report from a template"
  • A task mentions both a .docx template path AND source/reference materials
  • The user requires "cover page / TOC / fonts / headers / footers must match the template"
  • The user asks to produce a corporate design document (outline design, detailed design, database design, interface design, architecture specification, technical white paper, etc.)
  • The task involves .docx template + .xlsx feature lists + .pptx architecture diagrams or similar mixed enterprise assets

Do NOT activate when:

  • The output is a plain Markdown, README, or blog post with no template
  • The user just wants to locally edit an existing .docx (use the docx skill instead)
  • No fixed template is involved

The 6-Stage Pipeline

Each stage has a pre-flight checklist and exit criteria. Do not skip stages or run them in parallel.


Stage 1: Template Analysis

Goal: Understand the template structure and agree on a TOC mapping with the user.

> Companion skill: If superpowers:brainstorming is available, invoke it at the start of this stage to systematically explore user intent and requirements before committing to a TOC mapping.

Pre-flight Checklist

ItemAction
--------------
Output directoryls to verify it exists; fix typos before proceeding
Source material pathsls each path to confirm accessibility
Template filels -la