Confluence Content Creator
Ambiguity gate (ask before generating): if the request is underspecified on space/parent page, audience, template type (ADR / runbook / project doc / free-form), or whether the page replaces or supplements existing content, ask ONE compact clarifying question covering the missing items BEFORE generating page content. Don't publish the guessed version of an ambiguous request.
Reference Files
Detailed code examples, patterns, and configuration are in the reference files below. Read the relevant file when working on that area.
| File |
Covers |
| advanced-macros-templates.md |
advanced macros, documentation templates (technical specs, runbooks, meeting notes, decision records, ADRs) |
| hierarchy-conversion-migration.md |
page hierarchy patterns, Markdown-to-Confluence conversion, bulk page generation, content migration, and best practices |
| xhtml-core-macros.md |
XHTML storage format basics, core macros (TOC, code blocks, panels, status badges, expand, children, info/warning/note) |
Security — XML / XHTML parsing
For HTML/XHTML rendering of downstream output (storage format → display), sanitise with bleach or nh3 BEFORE inserting into a browser context — never raw-render API-returned XHTML. See llm-security SKILL.md §4.4 for context-appropriate escaping rules.
Anti-Patterns
| Anti-Pattern |
Why It Fails |
Correct Approach |
| Using wiki markup syntax in storage format API calls |
Confluence storage format is XHTML, not wiki markup — content renders as raw text |
Always use XHTML storage format with proper macro XML syntax for programmatic page creation |
| Creating deeply nested page hierarchies (5+ levels) |
Users cannot navigate; search becomes the only discovery method; maintenance burden increases exponentially |
Keep hierarchy to 3 levels max; use labels and CQL macros for cross-cutting organization |
| Embedding large images without thumbnails or attachments |
Pages load slowly; content store bloats; users on slow connections time out |
Use ac:image with width/height attributes; attach images to the page rather than hotlinking external URLs |
| Writing content without structured macros (panels, info, warning) |
Wall-of-text pages get skimmed and missed; critical information blends into background noise |
Use info/warning/note panels for callouts; use expand macros for optional detail; use TOC for navigation |
| Not validating XHTML before API submission |
Malformed XML causes silent failures or 500 errors that are difficult to debug |
Wrap content in a div and parse with an XML parser before submission; catch and report validation errors |
1---2name: confluence-content-creator3description: Use when creating or generating Confluence pages and content — XHTML storage format syntax, macros (TOC, code blocks, panels, status badges, expand, children, info/warning/note, jira issues, drawio), page templates, structured documentation patterns (ADRs, runbooks, project docs), markdown to Confluence conversion, bulk page generation, and content migration strategies.4---56# Confluence Content Creator78**Ambiguity gate (ask before generating):** if the request is underspecified on space/parent page, audience, template type (ADR / runbook / project doc / free-form), or whether the page replaces or supplements existing content, ask ONE compact clarifying question covering the missing items BEFORE generating page content. Don't publish the guessed version of an ambiguous request.910## Reference Files1112Detailed code examples, patterns, and configuration are in the reference files below. Read the relevant file when working on that area.1314| File | Covers |15|---|---|16| [advanced-macros-templates.md](advanced-macros-templates.md) | advanced macros, documentation templates (technical specs, runbooks, meeting notes, decision records, ADRs) |17| [hierarchy-conversion-migration.md](hierarchy-conversion-migration.md) | page hierarchy patterns, Markdown-to-Confluence conversion, bulk page generation, content migration, and best practices |18| [xhtml-core-macros.md](xhtml-core-macros.md) | XHTML storage format basics, core macros (TOC, code blocks, panels, status badges, expand, children, info/warning/note) |1920---2122## Security — XML / XHTML parsing2324<HARD-RULE>25When parsing any XML or XHTML payload from a remote API, untrusted file, or user-supplied source, NEVER use stdlib `xml.etree.ElementTree`, `xml.dom.minidom`, or `lxml.etree.fromstring` without XXE protection. Use `defusedxml` (`pip install defusedxml`) and replace `xml.etree.ElementTree` → `defusedxml.ElementTree`, `lxml.etree` → `defusedxml.lxml`. Stdlib XML parsers expand external entities by default and are vulnerable to billion-laughs / XXE / DTD-retrieval / SSRF-via-entity attacks (CWE-611). Local skill applicability:26- API payloads that may legitimately be XML (storage format, error responses)27- Imported / exported workflow files28- Bulk import / migration paths29</HARD-RULE>3031For HTML/XHTML rendering of downstream output (storage format → display), sanitise with `bleach` or `nh3` BEFORE inserting into a browser context — never raw-render API-returned XHTML. See `llm-security` SKILL.md §4.4 for context-appropriate escaping rules.3233## Anti-Patterns3435| Anti-Pattern | Why It Fails | Correct Approach |36|---|---|---|37| Using wiki markup syntax in storage format API calls | Confluence storage format is XHTML, not wiki markup — content renders as raw text | Always use XHTML storage format with proper macro XML syntax for programmatic page creation |38| Creating deeply nested page hierarchies (5+ levels) | Users cannot navigate; search becomes the only discovery method; maintenance burden increases exponentially | Keep hierarchy to 3 levels max; use labels and CQL macros for cross-cutting organization |39| Embedding large images without thumbnails or attachments | Pages load slowly; content store bloats; users on slow connections time out | Use ac:image with width/height attributes; attach images to the page rather than hotlinking external URLs |40| Writing content without structured macros (panels, info, warning) | Wall-of-text pages get skimmed and missed; critical information blends into background noise | Use info/warning/note panels for callouts; use expand macros for optional detail; use TOC for navigation |41| Not validating XHTML before API submission | Malformed XML causes silent failures or 500 errors that are difficult to debug | Wrap content in a div and parse with an XML parser before submission; catch and report validation errors |