jinja2

Installation
SKILL.md

Skill: Jinja2

Best practices for template rendering with Jinja2 including environments, filters, autoescaping, and security.

When to Use

Apply this skill when rendering templates with Jinja2 — HTML pages, emails, configuration files, and code generation.

Environment

  • Create a jinja2.Environment(loader=..., autoescape=...) once and reuse it.
  • Use FileSystemLoader for file-based templates, PackageLoader for installed packages.
  • Enable autoescape=True for HTML templates to prevent XSS.

Templates

  • Use {{ variable }} for output, {% if/for/block %} for control flow.
  • Use template inheritance ({% extends 'base.html' %}) for layout reuse.
  • Define custom filters for reusable transformations.
Related skills
Installs
8
GitHub Stars
2.4K
First Seen
Apr 8, 2026