From coquill
Document renderer for CoQuill. Takes a template, variable values, and produces rendered documents (docx or html+pdf). Validates output for unfilled placeholders. Called by the coquill orchestrator — not triggered directly by the user.
npx claudepluginhub houfu/coquill --plugin coquillThis skill uses the workspace's default tool permissions.
You are running the CoQuill document renderer. Your job is to render a completed document from a template and a set of variable values, then validate the output.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
You are running the CoQuill document renderer. Your job is to render a completed document from a template and a set of variable values, then validate the output.
This skill is called by the CoQuill orchestrator. You receive:
templates/_examples/Bonterms_Mutual_NDA/Bonterms-Mutual-NDA.docxdocx, html, or markdownTrue/False, and loop collections as lists of dictsoutput/Each rendering job gets its own folder inside the output directory:
output/
└── {template_name}_{key_variable}_{date}/
├── {template_name}_{key_variable}_{date}.docx
└── {template_name}_{key_variable}_{date}.pdf ← when tooling available
key_variable: the most identifying variable (typically a person/company name) — slugified (lowercase, underscores, no special characters).date: today's date in YYYY-MM-DD format._2, _3, etc. if the folder already exists.Serialize the full variable dictionary as a JSON file to a temporary path. The render script reads this file.
The render script lives at scripts/render.py relative to the project root. If the CLAUDE_PLUGIN_ROOT environment variable is set, resolve the script as $CLAUDE_PLUGIN_ROOT/scripts/render.py.
python <script_path> \
--template <template_path> \
--format <docx|html|markdown> \
--context <context_file> \
--output-dir <output_dir> \
--job-name <job_name> \
[--pdf]
The script handles boolean coercion, job folder creation, template rendering (docxtpl for docx, jinja2 for html/markdown), PDF conversion, and output validation. It prints a JSON result to stdout containing job_dir, files, pdf_produced, pdf_warning, and validation.
The render script does not handle Cowork-specific docx-to-PDF conversion. If you are running inside Cowork (check for /home/user/.claude/ or the COWORK environment variable) and the format is docx with PDF requested:
--pdf to produce the .docx.docx skill to read the rendered .docx file.pdf skill to produce a .pdf from it.{job_name}.pdf.Do NOT attempt docx2pdf or soffice in Cowork — they fail due to sandbox restrictions.
The script's JSON output includes a validation object:
validation.passed == true: All placeholders and control tags were processed. The document is ready.validation.unfilled_variables (non-empty): Variable names that remain as {{ var }} in the rendered output. Check whether those variables exist in the manifest — if they do, something went wrong in rendering; if they don't, the template may have placeholders the Analyzer missed.validation.unprocessed_tags (non-empty): Remaining {% %} control tags indicate a rendering failure. Common causes: boolean value passed as a string, missing loop collection, or malformed template syntax.If validation fails, report the issue back to the orchestrator so it can inform the user and offer to re-collect and re-render. Do NOT deliver a document with unfilled placeholders or unprocessed control tags.
Return to the orchestrator:
job_dir and files list from the script outputpdf_produced); if not, include pdf_warningSoft-fail semantics for PDF: Always deliver the primary document (.docx, .html, or .md). Warn if PDF was not produced — never hard-fail because of missing PDF tooling.
docxtpl — not raw python-docx with string replacement. docxtpl preserves formatting around placeholders and natively supports Jinja2 control tags.