codraft-renderer

Render DOCX, HTML, and Markdown templates with variable data and validate placeholders.

3|2|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/houfu/codraft --skill codraft-renderer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codraft-renderer
Source: https://github.com/houfu/codraft/tree/main/plugin/skills/codraft-renderer
Command: npx skills add https://github.com/houfu/codraft --skill codraft-renderer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docxtpl, jinja2, weasyprint, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of generating documents from templates by filling in dynamic content, ensuring accuracy and consistency.

Core Features & Use Cases

  • Template Rendering: Renders documents in DOCX, HTML, or Markdown formats using provided templates and variable data.
  • PDF Generation: Supports PDF output for HTML templates, with a fallback mechanism for DOCX to PDF conversion within specific environments.
  • Validation: Validates rendered documents to ensure all placeholders are filled and control tags are processed correctly.
  • Use Case: Generate customized NDAs, invoices, or reports by providing a template and specific details, ensuring all fields are correctly populated.

Quick Start

Use the codraft-renderer skill to render a docx document from the template located at 'templates/nda/nda.docx' using the provided variable data.

Frequently Asked Questions about codraft-renderer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a PDF from an HTML template using variable data?

You can render DOCX and HTML templates with variable data to generate documents. The renderer fills dynamic content into your templates and validates the output to ensure all placeholders and control tags are processed correctly.

Can I convert a DOCX template directly to PDF?

Yes, you can convert DOCX templates to PDF. While native PDF generation targets HTML templates, the renderer includes a fallback mechanism to convert rendered DOCX files to PDF within specific environments.

Does the renderer validate templates for unfilled placeholders?

Yes, the renderer validates output documents for unfilled placeholders and unprocessed tags. This validation ensures document integrity by confirming all dynamic fields are populated and all control tags are processed correctly.

What template formats are supported for document generation?

Document generation supports DOCX, HTML, and Markdown formats. You provide a template in one of these formats along with variable data, and the renderer fills in dynamic content to produce the final document.

Do I need Jinja2 to render HTML documents?

Yes, Jinja2 is required as the underlying template engine for rendering HTML and Markdown documents. You structure templates using Jinja2 syntax, and the renderer processes them with your provided variable data.