selmer

Render Django-inspired templates with inheritance, filters, and tags in Clojure to produce HTML or text output.

3|Updated Nov 10, 2025
One-click install
npx skills add https://github.com/hugoduncan/library-skills --skill selmer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: selmer
Source: https://github.com/hugoduncan/library-skills/tree/main/plugins/clojure-libraries/skills/selmer
Command: npx skills add https://github.com/hugoduncan/library-skills --skill selmer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires selmer/selmer, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies dynamic HTML or text generation in Clojure, offering an intuitive templating system that avoids complex string concatenation or verbose Hiccup structures.

Core Features & Use Cases

  • Django-Inspired Syntax: Use familiar {{variables}} and {% tags %} for intuitive template creation, making it accessible for designers and developers.
  • Template Inheritance & Includes: Build reusable layouts and components, reducing duplication and promoting consistency across your projects.
  • Rich Filters & Control Flow: Transform data with 50+ built-in filters and manage rendering logic with if and for tags directly in your templates.
  • Use Case: Create a dynamic email template for user welcome messages, where the content (user's name, activation link, premium status) is injected from Clojure data, and the layout (header, footer) is inherited from a base email template, ensuring consistent branding and personalized communication.

Quick Start

Use the selmer skill to render the template string "Hello {{name}}!" with the context map {:name "World"}.

Frequently Asked Questions about selmer

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

FAQPage Schema
How do I render dynamic HTML templates in Clojure?

Render dynamic HTML templates in Clojure using selmer, which processes Django-inspired syntax like {{variables}} and {% tags %} to inject data and control flow. Pass a template string and context map to produce HTML or text output for web pages, emails, or reports.

Can I use template inheritance to build reusable email layouts?

Yes, selmer supports template inheritance and includes, letting you define base templates for email headers, footers, and layouts once, then extend them with specific content. This reduces duplication and ensures consistent branding across personalized messages.

What filtering and control flow options are available in templates?

Selmer provides 50+ built-in filters to transform data and control flow tags like if and for directly in templates. Use filters to format dates, truncate text, or uppercase strings, and tags to conditionally render sections or loop over collections.

Does selmer work with Django template syntax I already know?

Yes, selmer uses Django-inspired template syntax, so developers and designers familiar with Django templates can use {{variables}}, {% tags %}, and filter syntax immediately without learning a new syntax.

How does selmer handle performance for high-volume email or report generation?

Selmer supports runtime compilation and caching to optimize repeated rendering. This enables efficient generation of high-volume personalized emails or reports without recompiling templates on every request.

Can I extend selmer with custom filters and tags for domain-specific logic?

Yes, selmer allows customization through custom filters and tags, letting you add application-specific logic directly in templates rather than preprocessing data in Clojure before rendering.