jinja-templates

jinja-templates is a skill for Claude Code, Codex from tedivm/robs_awesome_python_template. It costs 46 tokens per session (1,105 once invoked), scanned B, original, MIT.

A set of guidelines for creating and changing Jinja2 templates, which are files that combine HTML with values supplied by Python. It covers template inheritance, shared filters, and the template environment.

In plain words
What is it for?
Adding HTML templates, configuring Jinja2, creating reusable template layouts, adding filters or globals, and rendering pages through FastAPI.
Why use it?
It keeps templates in the expected locations and preserves safe HTML escaping. It also separates web-page rendering from uses such as emails, tasks, and command-line output.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tedivm/robs_awesome_python_template/jinja-templates
Any agent
npx skills add tedivm/robs_awesome_python_template --skill jinja-templates
Clone the repo
git clone --depth 1 https://github.com/tedivm/robs_awesome_python_template

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jinja-templates

README.md
[![agentmods](https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/jinja-templates.svg)](https://agentmods.dev/skills/tedivm/robs_awesome_python_template/jinja-templates)
Your own site
<a href="https://agentmods.dev/skills/tedivm/robs_awesome_python_template/jinja-templates"><img src="https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/jinja-templates.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01105
Opus 5 $0.00023 $0.00553
Sonnet 5 $0.00009 $0.00221
Haiku 4.5 $0.00005 $0.00111

Measured 4d ago against content hash 45fad30d3545, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

jinja-templates scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

The standard `env` allows templates to access arbitrary Python attributes and call any function passed to `render()`. A malicious template can exploit this to read secrets, access internals, or execute arbitrary code. Th
{{cookiecutter.__package_slug}}/.agents/skills/jinja-templates/SKILL.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Jinja2 Templates

context7: If the mcp_context7 tool is available, resolve and load the full jinja2 documentation before making changes:

mcp_context7_resolve-library-id: "pallets/jinja"
mcp_context7_get-library-docs: <resolved-id>

The Jinja2 environment is configured in {{cookiecutter.__package_slug}}/services/jinja.py. Templates live in {{cookiecutter.__package_slug}}/templates/.


Environment

The environment uses PackageLoader and autoescape=True:

from jinja2 import Environment, PackageLoader

env = Environment(
    loader=PackageLoader("{{cookiecutter.__package_slug}}"),
    autoescape=True,
)

{%- if cookiecutter.include_fastapi == "y" %}

For FastAPI responses, use response_templates:

from fastapi import Request
from {{cookiecutter.__package_slug}}.services.jinja import response_templates

@app.get("/page")
async def page(request: Request) -> Response:
    return response_templates.TemplateResponse(
        "page.html",
        {"request": request, "title": "Page"},
    )

{%- endif %}

Rendering Templates Outside FastAPI

Use the raw env for emails, tasks, CLI output:

from {{cookiecutter.__package_slug}}.services.jinja import env

template = env.get_template("emails/welcome.html")
html = template.render(name="World", year=2026)

Template Structure

Organize templates in subdirectories:

{{cookiecutter.__package_slug}}/templates/
├── base.html           # Base layout
├── pages/
│   └── home.html
├── components/
│   └── header.html
└── emails/
    └── welcome.html

Custom Filters and Globals

Add to {{cookiecutter.__package_slug}}/services/jinja.py:

def format_currency(value: float) -> str:
    return f"${value:,.2f}"

env.filters["currency"] = format_currency
env.globals["settings"] = settings

Template Inheritance

Base template (templates/base.html):

{%- raw %}
<!DOCTYPE html>
<html>
<head><title>{% block title %}Default{% endblock %}</title></head>
<body>
    {% include "components/header.html" %}
    <main>{% block content %}{% endblock %}</main>
</body>
</html>
{% endraw -%}

Read the full file on GitHub · 166 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 166 lines · 46 tokens per session scan B 45fad30d3545

Subscribe to this mod's changes

jinja-templates is a skill published in the GitHub repository tedivm/robs_awesome_python_template (310 stars, last pushed 3mo ago), licensed MIT. It adds 46 tokens to every session and 1,105 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

background-task

Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.

vstorm-co/full-stack-ai-agent-template · 62 tokens

agent-tool

Add a new tool/function the AI agent can call (e.g. look something up, hit an external API, perform an action). Use when extending the assistant's capabilities, wiring a new function into the agent, or when the model needs a new action. This project uses {{ cookiecutter.aiframework }}.

vstorm-co/full-stack-ai-agent-template · 66 tokens

frontend-feature

Build a new page, view, or data-driven feature in the Next.js frontend. Use when adding a route under the dashboard/marketing area, wiring UI to a backend endpoint, adding client state, or creating a localized page. Covers App Router, data fetching, Zustand stores, and i18n.

vstorm-co/full-stack-ai-agent-template · 64 tokens

pytest-suite

Write or extend the backend test suite following this project's conventions. Use when adding tests for a new service/route/repository, when coverage is missing, or when asked to test a feature. Knows the mocked-session + httpx AsyncClient setup so tests run with no database.

vstorm-co/full-stack-ai-agent-template · 59 tokens

rag-knowledge

Work with the RAG knowledge base — ingest documents, run semantic search, manage collections, or add a sync source/connector (Google Drive, S3). Use when populating or debugging the knowledge base, tuning retrieval, or adding a new document source. This project uses {{ cookiecutter.vectorstore }} + {{…

vstorm-co/full-stack-ai-agent-template · 76 tokens

alembic-migration

Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.

vstorm-co/full-stack-ai-agent-template · 56 tokens