skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
microsoft/debugpy55 installs

jinja2

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

How do I install this agent skill?

npx skills add https://github.com/microsoft/debugpy --skill jinja2
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides informational guidance and best practices for using the Jinja2 templating engine, focusing on security features like auto-escaping and sandboxing. No security issues were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • ZeroLeakspass

    Score: 93/100 · 2 sections analyzed

What does this agent skill do?

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.

Security

  • Always enable autoescape=True when rendering HTML.
  • Use SandboxedEnvironment for untrusted templates.
  • Never render user input as template code — only as template data.
  • Use |e filter explicitly when autoescape is off.

Pitfalls

  • Don't use Template(string) directly — it bypasses the environment's loader and settings.
  • Watch for undefined variable errors — use undefined=StrictUndefined during development.
  • Avoid complex logic in templates — keep them focused on presentation.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/microsoft/debugpy/jinja2">View jinja2 on skillZs</a>