render-template

Render templates with variable substitution using {{variable}} or ${variable} syntax. Use for generating formatted output, reports, commit messages, or any text requiring variable interpolation.

164 stars

Best use case

render-template is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Render templates with variable substitution using {{variable}} or ${variable} syntax. Use for generating formatted output, reports, commit messages, or any text requiring variable interpolation.

Teams using render-template should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/render-template/SKILL.md --create-dirs "https://raw.githubusercontent.com/maslennikov-ig/claude-code-orchestrator-kit/main/.claude/skills/render-template/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/render-template/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How render-template Compares

Feature / Agentrender-templateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Render templates with variable substitution using {{variable}} or ${variable} syntax. Use for generating formatted output, reports, commit messages, or any text requiring variable interpolation.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Render Template

Render templates with variable substitution, supporting various syntax formats and helper functions.

## When to Use

- Format commit messages with dynamic data
- Generate report sections with variables
- Create formatted outputs from templates
- Replace placeholders in text templates
- Consolidate formatting logic across Skills

## Instructions

### Step 1: Receive Template and Data

Accept template string and variable data.

**Expected Input**:
- `template`: String (template with placeholders)
- `variables`: Object (key-value pairs for substitution)
- `syntax`: String (optional: mustache|shell|mixed, default: mustache)

**Supported Syntax**:
- **Mustache**: `{{variable}}`, `{{object.property}}`
- **Shell**: `${variable}`, `${VARIABLE}`
- **Mixed**: Supports both

### Step 2: Parse Template

Identify all placeholders in template.

**Placeholder Patterns**:
- `{{variable}}`: Simple variable
- `{{object.property}}`: Nested property
- `{{#if condition}}...{{/if}}`: Conditional (optional)
- `{{#each array}}...{{/each}}`: Loop (optional)

### Step 3: Resolve Variables

Replace placeholders with values from variables object.

**Resolution Rules**:
- Direct match: `{{name}}` → `variables.name`
- Nested property: `{{user.name}}` → `variables.user.name`
- Missing variable: Replace with empty string or keep placeholder (configurable)
- Undefined: Replace with empty string

### Step 4: Apply Filters (Optional)

Support simple filters if specified.

**Common Filters**:
- `{{variable | uppercase}}`: Convert to uppercase
- `{{variable | lowercase}}`: Convert to lowercase
- `{{variable | capitalize}}`: Capitalize first letter
- `{{date | format:YYYY-MM-DD}}`: Format date

### Step 5: Return Rendered Output

Return final rendered string.

**Expected Output**: String (template with variables replaced)

## Error Handling

- **Missing Variables**: Replace with empty string or warn (configurable)
- **Invalid Template Syntax**: Return error describing syntax issue
- **Circular References**: Detect and return error
- **Type Mismatch**: Convert to string automatically

## Examples

### Example 1: Simple Variable Substitution

**Input**:
```json
{
  "template": "Hello {{name}}, your score is {{score}}!",
  "variables": {
    "name": "Alice",
    "score": 95
  },
  "syntax": "mustache"
}
```

**Output**:
```
Hello Alice, your score is 95!
```

### Example 2: Nested Properties

**Input**:
```json
{
  "template": "User: {{user.name}} ({{user.email}})\nRole: {{user.role}}",
  "variables": {
    "user": {
      "name": "Bob",
      "email": "bob@example.com",
      "role": "admin"
    }
  }
}
```

**Output**:
```
User: Bob (bob@example.com)
Role: admin
```

### Example 3: Shell Syntax

**Input**:
```json
{
  "template": "Version: ${VERSION}\nDate: ${RELEASE_DATE}",
  "variables": {
    "VERSION": "0.8.0",
    "RELEASE_DATE": "2025-10-17"
  },
  "syntax": "shell"
}
```

**Output**:
```
Version: 0.8.0
Date: 2025-10-17
```

### Example 4: Commit Message Template

**Input**:
```json
{
  "template": "{{type}}({{scope}}): {{description}}\n\n{{body}}\n\n🤖 Generated with Claude Code\nCo-Authored-By: Claude <noreply@anthropic.com>",
  "variables": {
    "type": "feat",
    "scope": "auth",
    "description": "add OAuth2 support",
    "body": "Implemented OAuth2 flow with token refresh.\nSupports Google and GitHub providers."
  }
}
```

**Output**:
```
feat(auth): add OAuth2 support

Implemented OAuth2 flow with token refresh.
Supports Google and GitHub providers.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
```

### Example 5: Missing Variables

**Input**:
```json
{
  "template": "Name: {{name}}\nAge: {{age}}\nCity: {{city}}",
  "variables": {
    "name": "Alice"
  }
}
```

**Output (with empty string replacement)**:
```
Name: Alice
Age:
City:
```

**Output (with keep placeholder)**:
```
Name: Alice
Age: {{age}}
City: {{city}}
```

### Example 6: Report Header Template

**Input**:
```json
{
  "template": "# {{reportType}} Report: {{version}}\n\n**Generated**: {{timestamp}}\n**Status**: {{statusEmoji}} {{status}}\n**Version**: {{version}}",
  "variables": {
    "reportType": "Bug Hunting",
    "version": "2025-10-17",
    "timestamp": "2025-10-17 14:30:00 UTC",
    "statusEmoji": "✅",
    "status": "success"
  }
}
```

**Output**:
```markdown
# Bug Hunting Report: 2025-10-17

**Generated**: 2025-10-17 14:30:00 UTC
**Status**: ✅ success
**Version**: 2025-10-17
```

## Validation

- [ ] Replaces simple variables correctly
- [ ] Handles nested properties
- [ ] Supports multiple syntax formats
- [ ] Handles missing variables gracefully
- [ ] Converts types to strings
- [ ] Preserves formatting (line breaks, indentation)
- [ ] Detects circular references
- [ ] Returns clear error messages

## Supporting Files

None required - pure template rendering logic.

## Integration with Other Skills

This Skill consolidates formatting logic used by:
- **format-commit-message**: Use render-template for message formatting
- **generate-report-header**: Use render-template for header generation
- **format-todo-list**: Use render-template for activeForm generation
- **generate-changelog**: Use render-template for section formatting

**Example Integration**:
```
Instead of: Hard-coded string formatting in each Skill
Use: render-template Skill with predefined templates
Result: Consistent formatting, easier to maintain
```

Related Skills

Beads Issue Tracking Skill

164
from maslennikov-ig/claude-code-orchestrator-kit

> **Attribution**: [Beads](https://github.com/steveyegge/beads) by [Steve Yegge](https://github.com/steveyegge)

Workflow & ProductivityClaude

webapp-testing

164
from maslennikov-ig/claude-code-orchestrator-kit

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

validate-report-file

164
from maslennikov-ig/claude-code-orchestrator-kit

Validate that worker-generated reports have all required sections and proper formatting. Use in quality gates, for report completeness checking, or when debugging missing report sections.

validate-plan-file

164
from maslennikov-ig/claude-code-orchestrator-kit

Validate that orchestrator plan files conform to expected JSON schema. Use before workers read plan files or after orchestrators create them to ensure proper structure and required fields.

ux-researcher-designer

164
from maslennikov-ig/claude-code-orchestrator-kit

UX research and design toolkit for Senior UX Designer/Researcher including data-driven persona generation, journey mapping, usability testing frameworks, and research synthesis. Use for user research, persona creation, journey mapping, and design validation.

ui-design-system

164
from maslennikov-ig/claude-code-orchestrator-kit

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

theme-factory

164
from maslennikov-ig/claude-code-orchestrator-kit

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

systematic-debugging

164
from maslennikov-ig/claude-code-orchestrator-kit

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

setup-knip

164
from maslennikov-ig/claude-code-orchestrator-kit

Install and configure Knip for dead code detection. Use before running dead-code-hunter or dependency-auditor to ensure Knip is available. Handles installation, configuration creation, and validation.

senior-prompt-engineer

164
from maslennikov-ig/claude-code-orchestrator-kit

World-class prompt engineering skill for LLM optimization, prompt patterns, structured outputs, and AI product development. Expertise in Claude, GPT-4, prompt design patterns, few-shot learning, chain-of-thought, and AI evaluation. Includes RAG optimization, agent design, and LLM system architecture. Use when building AI products, optimizing LLM performance, designing agentic systems, or implementing advanced prompting techniques.

senior-devops

164
from maslennikov-ig/claude-code-orchestrator-kit

Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.

senior-architect

164
from maslennikov-ig/claude-code-orchestrator-kit

Comprehensive software architecture skill for designing scalable, maintainable systems using ReactJS, NextJS, NodeJS, Express, React Native, Swift, Kotlin, Flutter, Postgres, GraphQL, Go, Python. Includes architecture diagram generation, system design patterns, tech stack decision frameworks, and dependency analysis. Use when designing system architecture, making technical decisions, creating architecture diagrams, evaluating trade-offs, or defining integration patterns.