docx-templates-template-variables-not-rendering
Sub-skill of docx-templates: Template Variables Not Rendering (+2).
Best use case
docx-templates-template-variables-not-rendering is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of docx-templates: Template Variables Not Rendering (+2).
Teams using docx-templates-template-variables-not-rendering should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/template-variables-not-rendering/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How docx-templates-template-variables-not-rendering Compares
| Feature / Agent | docx-templates-template-variables-not-rendering | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of docx-templates: Template Variables Not Rendering (+2).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Template Variables Not Rendering (+2)
## Template Variables Not Rendering
```python
# Problem: Variables appear as {{ variable }} in output
# Solution: Check variable syntax and context keys
def diagnose_template(template_path: str, context: dict):
"""Diagnose template rendering issues."""
template = DocxTemplate(template_path)
# Get expected variables
expected = template.get_undeclared_template_variables()
print(f"Template expects: {expected}")
# Check context
provided = set(context.keys())
print(f"Context provides: {provided}")
# Find mismatches
missing = expected - provided
if missing:
print(f"MISSING: {missing}")
```
## Loop Not Iterating
```python
# Problem: Loop content not appearing
# Solution: Verify loop syntax and data structure
# CORRECT loop syntax in template:
# {%tr for item in items %}
# {{ item.name }}
# {%tr endfor %}
# Ensure data is a list
context = {
"items": [
{"name": "Item 1"}, # Must be dict or object
{"name": "Item 2"}
]
}
```
## Image Not Appearing
```python
# Problem: Image placeholder shows error
# Solution: Verify image path and format
from pathlib import Path
def validate_image(image_path: str) -> bool:
"""Validate image file."""
path = Path(image_path)
if not path.exists():
print(f"Image not found: {image_path}")
return False
valid_extensions = {'.png', '.jpg', '.jpeg', '.gif', '.bmp'}
if path.suffix.lower() not in valid_extensions:
print(f"Invalid format: {path.suffix}")
return False
return True
```Related Skills
python-project-template
Generate standardized Python project structure with pyproject.toml, UV environment, pytest configuration, and workspace-hub compliance. Creates production-ready project scaffolding.
docx
Comprehensive Word document toolkit for reading, creating, and editing .docx files. Supports text extraction, document creation with python-docx, and tracked changes via redlining workflow. Use for legal, academic, or professional document manipulation.
web-artifacts-builder-basic-template
Sub-skill of web-artifacts-builder: Basic Template.
skill-creator-template-name
Sub-skill of skill-creator: [Template Name].
skill-creator-technical-skill-template
Sub-skill of skill-creator: Technical Skill Template.
skill-creator-process-skill-template
Sub-skill of skill-creator: Process Skill Template.
skill-creator-creative-skill-template
Sub-skill of skill-creator: Creative Skill Template.
cli-productivity-3-interactive-script-template
Sub-skill of cli-productivity: 3. Interactive Script Template.
n8n-8-workflow-templates-and-subworkflows
Sub-skill of n8n: 8. Workflow Templates and Subworkflows.
orcaflex-post-processing-common-vessel-variables
Sub-skill of orcaflex-post-processing: Common Vessel Variables (+2).
python-project-template-with-repo-readiness
Sub-skill of python-project-template: With repo-readiness (+1).
python-project-template-project-structure-generated
Sub-skill of python-project-template: Project Structure Generated.