tera

Explain Tera template syntax, rendering workflow, and core concepts.

Updated May 12, 2026
One-click install
npx skills add https://github.com/iki/skills --skill tera
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tera
Source: https://github.com/iki/skills/tree/main/tera
Command: npx skills add https://github.com/iki/skills --skill tera

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the problem of understanding how to design, render, and troubleshoot templates in the Tera Rust template engine so you can build correct, maintainable template-driven applications.

Core Features & Use Cases

  • Template syntax mastery: Learn Tera delimiters, expressions, variable access (dot and bracket notation), assignments, and control structures like if/for/include/macro.
  • Practical rendering workflow: See how to load templates via globbing, build a context, and render templates safely and correctly.
  • Architecture-level guidance: Understand key engine concepts such as auto-escaping, whitespace control, inheritance (extends/blocks/super), and built-in filters/tests/functions.
  • Documentation discovery: Use the included reference materials to quickly locate built-ins and common implementation patterns drawn from Tera’s documentation.

Quick Start

Ask the AI to summarize the differences between Tera template inheritance and include usage, and then provide a minimal example that renders a child template with a block override and super().

Frequently Asked Questions about tera

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

FAQPage Schema
How do I use Tera template inheritance and include in Rust?

Tera template inheritance uses extends and blocks to override parent layouts, while include inserts reusable partials. Use super() to render parent block content within a child template override for maintainable Rust template structures.

How does Tera auto-escaping work when rendering templates?

Tera auto-escaping automatically sanitizes variables to prevent XSS attacks during template rendering. It applies escaping based on file extension, ensuring context data is safely outputted in HTML without manual sanitization.

How do I load and render Tera templates with context using globbing?

Load Tera templates using globbing patterns to discover files, then build a context object with variables. Pass this context to the render function to safely generate final output strings for your Rust application.

Can I use macros and filters in Tera templates for reusable logic?

Tera macros define reusable template components with parameters, while filters transform variable output. Both are built-in features allowing complex template logic and data formatting without leaving the template syntax environment.

How do I control whitespace and use control structures in Tera syntax?

Control whitespace in Tera templates using specific delimiters around tags. Combine this with control structures like if conditionals and for loops to manage template flow and output formatting accurately.