docx-templates-template-variables-not-rendering

Sub-skill of docx-templates: Template Variables Not Rendering (+2).

5 stars

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

$curl -o ~/.claude/skills/template-variables-not-rendering/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/office/docx-templates/template-variables-not-rendering/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/template-variables-not-rendering/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How docx-templates-template-variables-not-rendering Compares

Feature / Agentdocx-templates-template-variables-not-renderingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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

5
from vamseeachanta/workspace-hub

Generate standardized Python project structure with pyproject.toml, UV environment, pytest configuration, and workspace-hub compliance. Creates production-ready project scaffolding.

docx

5
from vamseeachanta/workspace-hub

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

5
from vamseeachanta/workspace-hub

Sub-skill of web-artifacts-builder: Basic Template.

skill-creator-template-name

5
from vamseeachanta/workspace-hub

Sub-skill of skill-creator: [Template Name].

skill-creator-technical-skill-template

5
from vamseeachanta/workspace-hub

Sub-skill of skill-creator: Technical Skill Template.

skill-creator-process-skill-template

5
from vamseeachanta/workspace-hub

Sub-skill of skill-creator: Process Skill Template.

skill-creator-creative-skill-template

5
from vamseeachanta/workspace-hub

Sub-skill of skill-creator: Creative Skill Template.

cli-productivity-3-interactive-script-template

5
from vamseeachanta/workspace-hub

Sub-skill of cli-productivity: 3. Interactive Script Template.

n8n-8-workflow-templates-and-subworkflows

5
from vamseeachanta/workspace-hub

Sub-skill of n8n: 8. Workflow Templates and Subworkflows.

orcaflex-post-processing-common-vessel-variables

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-post-processing: Common Vessel Variables (+2).

python-project-template-with-repo-readiness

5
from vamseeachanta/workspace-hub

Sub-skill of python-project-template: With repo-readiness (+1).

python-project-template-project-structure-generated

5
from vamseeachanta/workspace-hub

Sub-skill of python-project-template: Project Structure Generated.