Skip to content

Use Your Own Templates

Codraft does not lock you into a proprietary template format. If you have a Word document or an HTML file, you already have a template. Add a few placeholders and you are ready to go.

Create a folder inside templates/ with any name you like, and place your file inside it:

templates/
consulting_agreement/
consulting_agreement.docx

The folder name becomes the template identifier. When you tell Claude “prepare a consulting agreement,” it matches the request to this folder automatically.

Open your document and replace the parts that change with {{ variable_name }} placeholders. Standard Jinja2 syntax — nothing proprietary, nothing to learn from scratch:

This Agreement is entered into on {{ effective_date }}
by and between {{ client_name }} ("Client")
and {{ consultant_name }} ("Consultant").
The Consultant will provide {{ service_description }}
at a rate of {{ hourly_rate }} per hour.

That is a working template. Codraft scans it, finds every placeholder, and builds an interview around them.

Need a clause that only appears sometimes? Wrap it in an {% if %} block:

{% if include_non_compete %}
The Consultant agrees not to engage in competing
activities for {{ non_compete_period }} following
termination of this agreement.
{% endif %}

Claude asks whether to include the section. If the user says no, the entire block is removed from the final document — along with any follow-up questions about variables inside it.

Collect multiple items with a {% for %} loop:

{% for milestone in milestones %}
Milestone: {{ milestone.description }}
Due date: {{ milestone.date }}
Amount: {{ milestone.amount }}
{% endfor %}

Claude collects milestones one at a time and asks “Would you like to add another?” until the user is done.

You author templates in Microsoft Word, Google Docs (exported to .docx), or any text editor for HTML. There is no template designer, no drag-and-drop builder, and no schema definition file you need to write first. The template is the schema.

HotDocs and Contract Express both use proprietary Word add-ins for template authoring — templates built in those systems do not transfer cleanly to other tools. Codraft templates are standard Word files with plain text placeholders. If you switch tools later, you keep your templates.