Skip to content
Skills Library
Documents & office · Planning

document-generation

/document-generation

Use for Dataverse document generation built on Word Templates - inventory the content controls in a `.docx`/`.dotx` template, map placeholders to data, and plan a template-aware change before editing blindly. Fires whenever the user mentions a Word Template, document generation, content controls, placeholder or merge-field mapping, document-definition records, "why is this field blank in the generated doc", "add a placeholder to the template", "what tags does this template use", or a document-generation plug-in, even if no helper is named. Treats `Word Templates/` as first-class source, surfac

Licence
Apache-2.0
Last repository change
13.07.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.07.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use for Dataverse document generation built on Word Templates - inventory the content controls in a `.docx`/`.dotx` template, map placeholders to data, and plan a template-aware change before editing blindly. Fires whenever the user mentions a Word Template, document generation, content controls, placeholder or merge-field mapping, document-definition records, "why is this field blank in the generated doc", "add a placeholder to the template", "what tags does this template use", or a document-generation plug-in, even if no helper is named. Treats `Word Templates/` as first-class source, surfac

Triggers from the description

why is this field blank in the generated docadd a placeholder to the templatewhat tags does this template use
Original author description

Use for Dataverse document generation built on Word Templates - inventory the content controls in a `.docx`/`.dotx` template, map placeholders to data, and plan a template-aware change before editing blindly. Fires whenever the user mentions a Word Template, document generation, content controls, placeholder or merge-field mapping, document-definition records, "why is this field blank in the generated doc", "add a placeholder to the template", "what tags does this template use", or a document-generation plug-in, even if no helper is named. Treats `Word Templates/` as first-class source, surfac

How it works

  1. When to use this
  2. Helpers
  3. Domain workflow
  4. Safety and decision rules
  5. References
Original SKILL.md headings · 48 lines, 670 words
SKILL.md preview
---
name: document-generation
description: >
  Use for Dataverse document generation built on Word Templates - inventory the content controls
  in a `.docx`/`.dotx` template, map placeholders to data, and plan a template-aware change
  before editing blindly. Fires whenever the user mentions a Word Template, document generation,
  content controls, placeholder or merge-field mapping, document-definition records, "why is this
  field blank in the generated doc", "add a placeholder to the template", "what tags does this
  template use", or a document-generation plug-in, even if no helper is named. Treats `Word
  Templates/` as first-class source, surfaces duplicate tags, missing required placeholders, and
  unused controls, and points at the `*.Business`, `*.Plugins`, and `*.Data` touchpoints a
  placeholder change implies. Run the live-mutation preflight from the `powerplatform-core`
  orchestrator before any live template or component write.
---

# Document Generation — Word Templates and Placeholder Mapping

This skill handles Power Platform document generation that uses Word Templates and content controls. It inventories the content controls inside `.docx`/`.dotx` templates, maps requested placeholders against what the template actually exposes, and plans template-aware changes — flagging duplicate tags, missing required placeholders, and unused controls before anyone edits a template blindly. It treats `Word Templates/` as a first-class source area and connects a placeholder change to the `*.Business`, `*.Plugins`, and document-definition data it depends on. It is intentionally generic about environment, publisher prefix, solution name, and folder layout — discover those per task.

## When to use this

- The user wants to know which content controls, tags, or aliases a template contains.
- A placeholder or merge field needs to be added, renamed, or remapped, and you need to know what it touches.
- A generated document has a blank or wrong field and you need to map the placeholder back to its data source.
- The user wants required-versus-optional placeholders validated against a template before a change.
- You are scoping a document-generation change across `Word Templates`, `Business`, `Plugins`, and `Data` source areas.

Route here from the `powerplatform-core` orchestrator. For solution packaging or promotion of templates and related components, use the `solution-alm-delivery` sibling skill.

## Helpers

The helpers live in the plugin's `scripts/` directory at the plugin root, not in this skill folder. Resolve the plugin root and invoke them like:

- `python "$CLAUDE_PLUGIN_ROOT/scripts/inspect_word_templates.py" --path <template-or-dir>` (Claude Code)
- `python "$CODEX_PLUGIN_ROOT/scripts/inspect_word_templates.py" --path <template-or-dir>` (also exposed as `$PLUGIN_ROOT`)
- Installed standalone / unsure: the `scripts/` folder sits beside this skill bundle — invoke by its path within the install.

| Helper | Purpose |
| --- | --- |
| `inspect_word_templates.py` | Inspect `.docx`/`.dotx` files and summarize their content controls. Defaults to the inferred `Word Templates` area; pass `--path` for a specific file or directory, `--recurse` for a directory tree, and `--summary-only` for per-file summaries without full control detail. Read-only inventory. |
| `plan_document_generation.py` | Plan a template-aware document-generation change from a `--spec` (template path or name, placeholder mappings, required-versus-optional placeholders, and entity/document-definition context). Returns current content controls, duplicate tags and aliases, mapped placeholders, missing required placeholders, unused controls, and the `Word Templates`/`Business`/`Plugins`/`Data` source-area touchpoints. Planning only. |

## Domain workflow

1. **Inventory the template first.** Run `inspect_word_templates.py` against the real template so you work from the actual content controls, tags, and aliases rather than assumptions.
2. **Plan before editing.** Run `plan_document_generation.py` with the requested placeholder mappings to see mapped placeholders, missing required placeholders, duplicate tags, and unused controls — plus the source-area touchpoints the change implies.
3. **Trace meaning changes to their source.** When a placeholder changes meaning, inspect the related `*.Business`, `*.Plugins`, and document-definition data before editing the template, rather than changing the tag in isolation.
4. **Keep templates source-controlled.** Treat `Word Templates/` as the deployable source; do not treat `Reference/` copies of templates as deployable source by default.
5. **Hand off structural redesign with judgment.** Inspection and planning are helper-backed; creating or redesigning `.docx` structure still needs repo-specific judgment and should stay review-driven until a stronger repeated pattern emerges.

## Safety and decision rules

- **`Word Templates/` is first-class source; `Reference/` is not.** Plan and edit against the deployable template, not a reference copy.
- **Do not retag blindly.** A placeholder is a contract with the generation logic — confirm the `*.Business`/`*.Plugins`/document-definition side before renaming or remapping a tag.
- **Surface duplicates and gaps explicitly.** Report duplicate tags/aliases, missing required placeholders, and unused controls instead of silently editing around them.
- **Keep structural redesign review-driven.** Lean on the helpers for inspection and mapping; treat new `.docx` structure as repo-specific work that needs explicit review.
- **Preflight gate.** Run the mandatory live-mutation preflight from the `powerplatform-core` orchestrator before any live template or related component write. Do not restate the full preflight here — invoke it there.

## References

- `references/document-generation.md` — primary helpers, operating rules, template planning inputs, what the planning helper returns, and the current helper-versus-judgment boundary.

Versions

RepositoryScoreLicence
This page · satriotsubasa/powerplatform-core90Apache-2.0
automateyournetwork/netclaw100Apache-2.0

Database snapshot: 13.11.2026 · package version 0c82efe38b62 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100docx-template-fill
    Fill Word document (.docx) templates that use placeholder syntax like {{PLACEHOLDER}}. Handles split placeholders (where Word splits a placeholder across multiple XML runs), conditional sections ({{IF_X}}...{{END_IF_X}}), and preserves formatting. Use this skill whenever the…
  • 100word-placeholder-replacement
    Replace placeholders in Word documents (.docx files) and handle conditional sections. Use this skill whenever you need to fill in {{PLACEHOLDER}} markers in a .docx template, or when working with conditional blocks like {{IF_CONDITION}}...{{END_IF_CONDITION}}.
  • 100docx
    Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx) or Word templates (.dotx). Triggers include: any mention of Microsoft Word Documents, such as 'Word doc', 'word document', '.docx', '.dotx', 'microsoft doc'. Also use when…
  • 100docx
    Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx) or Word templates (.dotx). Triggers include: any mention of Microsoft Word Documents, such as 'Word doc', 'word document', '.docx', '.dotx', 'microsoft doc'. Also use when…
  • 100word-documents
    Use when creating, reading, or editing Word documents (.docx). Covers document generation with styles and structure, extracting content, find-and-replace, tracked changes, and templates. Trigger on "generate a word document", "find and replace in this docx", "fill this word…
  • 100microsoft-word
    Create, edit, and manipulate Word documents (.docx) programmatically. Use when someone asks to "generate a Word document", "create a report in docx", "mail merge", "fill Word template", "extract text from Word", "convert markdown to Word", "add tables to Word", or "automate…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.