/rust:tera-templatesfrom rust
Write Tera templates for Rust applications. Use when creating Jinja2/Django-style templates, using template inheritance, writing macros, applying filters, or generating HTML/text with Tera.
Ships in rust. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Tera is a powerful template engine for Rust inspired by Jinja2 and Django templates. Use this skill when writing .html, .tera, or other template files for Rust applications using the Tera crate.
extends and block{# This is a comment #}
{# Variable output #}
Hello, {{ name }}!
{# Expressions #}
{{ price * quantity }}
{# Filters #}
{{ name | upper }}
{{ text | truncate(length=50) }}
| Delimiter | Purpose |
|---|---|
{{ }} | Expressions - output values |
{% %} | Statements - control flow |
{# #} | Comments - not rendered |
Add - to trim whitespace:
{%- removes whitespace before-%} removes whitespace after{{-, -}}, {#-, -#}{% set my_var = 2 -%}
{{ my_var }}
base.html)<!DOCTYPE html>
<html>
<head>
{% block head %}
<title>{% block title %}{% endblock title %} - My Site</title>
{% endblock head %}
</head>
<body>
{% block content %}{% endblock content %}
{% block footer %}
<footer>© 2024</footer>
{% endblock footer %}
</body>
</html>
{% extends "base.html" %}
{% block title %}Home{% endblock title %}
{% block head %}
{{ super() }}
<link rel="stylesheet" href="home.css">
{% endblock head %}
{% block content %}
<h1>Welcome!</h1>
{% endblock content %}
Use {{ super() }} to include parent block content.
{% if price < 10 %}
Cheap!
{% elif price > 100 %}
Expensive!
{% else %}
Reasonable.
{% endif %}
{# Negation #}
{% if not logged_in %}
Please log in.
{% endif %}
{# Combine with and/or #}
{% if user and user.is_admin %}
Admin panel
{% endif %}
{% for item in items %}
{{ loop.index }}. {{ item.name }}
{% endfor %}
{# Key-value iteration #}
{% for key, value in my_map %}
{{ key }}: {{ value }}
{% endfor %}
{# Empty fallback #}
{% for item in items %}
{{ item }}
{% else %}
No items found.
{% endfor %}
Loop variables:
loop.index - 1-indexed positionloop.index0 - 0-indexed positionloop.first - true on first iterationloop.last - true on last iterationLoop controls:
{% for item in items %}
{% if item.skip %}{% continue %}{% endif %}
{% if item.stop %}{% break %}{% endif %}
{{ item.name }}
{% endfor %}
Define reusable template components:
{# In macros.html #}
{% macro input(label, type="text", name="") %}
<label>
{{ label }}
<input type="{{ type }}" name="{{ name }}">
</label>
{% endmacro input %}
{% macro button(text, class="btn") %}
<button class="{{ class }}">{{ text }}</button>
{% endmacro button %}
Use macros:
{% import "macros.html" as forms %}
{{ forms::input(label="Username", name="user") }}
{{ forms::button(text="Submit", class="btn-primary") }}
{# Call macro in same file with self:: #}
{{ self::my_macro(arg="value") }}
{% include "header.html" %}
{# Ignore if missing #}
{% include "optional.html" ignore missing %}
{# Try multiple files #}
{% include ["custom/nav.html", "nav.html"] %}
{% set name = "Alice" %}
{% set total = price * quantity %}
{% set items = [1, 2, 3] %}
{# Global assignment (escapes loop scope) #}
{% for item in items %}
{% set_global count = loop.index %}
{% endfor %}
See filters.md for the complete list.
Common filters:
{{ name | lower }} {# lowercase #}
{{ name | upper }} {# uppercase #}
{{ name | capitalize }} {# First letter upper #}
{{ name | title }} {# Title Case #}
{{ text | truncate(length=50) }} {# truncate with ellipsis #}
{{ text | wordcount }} {# count words #}
{{ text | replace(from="a", to="b") }}
{{ text | trim }} {# remove whitespace #}
{{ items | length }} {# array/string length #}
{{ items | first }} {# first element #}
{{ items | last }} {# last element #}
{{ items | reverse }} {# reverse array #}
{{ items | sort }} {# sort array #}
{{ items | join(sep=", ") }} {# join array to string #}
{{ num | round }} {# round number #}
{{ num | abs }} {# absolute value #}
{{ content | safe }} {# disable escaping #}
{{ value | default(value="N/A") }} {# default if undefined #}
{{ data | json_encode(pretty=true) }} {# to JSON #}
{% if num is odd %}
{% if num is even %}
{% if num is divisibleby(3) %}
{% if var is defined %}
{% if var is undefined %}
{% if val is string %}
{% if val is number %}
{% if val is iterable %}
{% if name is starting_with("Dr.") %}
{% if name is ending_with("Jr.") %}
{% if list is containing("item") %}
{% if name is matching("^[A-Z]") %}
{# Generate range #}
{% for i in range(end=5) %}
{% for i in range(start=1, end=10, step_by=2) %}
{# Current time (requires builtins feature) #}
{{ now() }}
{{ now() | date(format="%Y-%m-%d") }}
{{ now(timestamp=true) }}
{# Random number #}
{{ get_random(end=100) }}
{{ get_random(start=10, end=20) }}
{# Environment variable #}
{{ get_env(name="HOME") }}
{{ get_env(name="MISSING", default="fallback") }}
{# Throw error #}
{% if not valid %}
{{ throw(message="Validation failed!") }}
{% endif %}
Prevent Tera from processing content:
{% raw %}
This {{ will_not }} be processed.
Useful for JavaScript templates or documentation.
{% endraw %}
{# Debug: print entire context #}
{{ __tera_context }}
base.html and extend itmacros.html{%- and -%} to keep output clean{{ content | other_filter | safe }}What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tarqd/tarq-plugins --plugin rust4 skills in this plugin
/create-crate-skillCreate Claude skills for Rust crates and binaries. Use when the user wants to create a skill for a Rust crate, document a Rust library for Claude, make a skill from cargo docs, or create a skill to help use a Rust tool or binary./exploring-rust-docsExplore and understand Rust crates via cargo doc generated HTML documentation. Use when the user wants to understand a Rust crate, read crate documentation, explore module structure, find traits/structs/functions, or learn how a Rust library works./rmcprmcp - Rust MCP SDKThis skill should be used when the user asks to "build an MCP server in Rust", "create an MCP client in Rust", "use the rmcp crate", "implement MCP tools in Rust", "add MCP transport in Rust", "write a Rust MCP tool", "connect to an MCP server from Rust", "implement ServerHandler", "use #[tool] macro", "MCP prompts in Rust", "MCP resources in Rust", "rmcp task system", or mentions rmcp, Rust MCP SDK, or Model Context Protocol with Rust. Provides comprehensive guidance for building MCP servers and clients using the official Rust SDK.
Other plugins' skills for the same job
2 plugins ship this exact skill · first indexed Aug 21, 2026