j2prompt-lint/jinja2-prompt-template-corpus huggingface dataset:
{%- set user_messages = messages | selectattr('role', 'equalto', 'user') | list %}
{%- macro output_available_tools(tools, message) %}
{%- if tools and (message == user_messages[-1]) %}
    {{- '
[' }}
    {%- for tool in tools %}
        {%- set tool = tool.function %}
        {{- "{" }}
        {%- for key, val in tool.items() if key != "return" %}
            {%- if val is string %}
                {{- "'" + key + "': '" + val + "'" }}
            {%- else %}
                {{- "'" + key + "': " + val|string }}
            {%- endif %}
            {%- if not loop.last %}
                {{- ", " }}
            {%- endif %}
        {%- endfor %}
        {{- "}" }}
        {%- if not loop.last %}
            {{- ", " }}
        {%- else %}
            {{- "]" }}
        {%- endif %}
    {%- endfor %}
    {{- eos_token -}}
{%- endif %}
{%- endmacro %}

{%- macro output_tool_results(tool_results) %}
{{- '
[' }}
{%- for tool_result in tool_results %}
    {{- "{'content': " + tool_result.content|string + ", 'call_id': '" + tool_result.call_id + "'}" }}
{%- endfor %}
{{- ']' }}
{{- eos_token -}}
{%- endmacro %}

{%- macro output_tool_calls(tool_calls) %}
{{- '
[' }}
{%- for tool_call in tool_calls %}
    {{- "{'id': '" + tool_call.id + "', 'name': '" + tool_call.name + "', 'arguments': " + tool_call.arguments|string + '}' }}
{%- endfor %}
{{- ']' }}
{%- endmacro %}

{%- for message in messages %}
    {%- if message['role'] == 'user' %}
        {%- if tools is defined %}
            {{- output_available_tools(tools, message) }}
        {%- endif %}
        {{- '
' + message['content'] + eos_token -}}
    {%- elif message['role'] == 'system' %}
        {{- '
' + message['content'] + eos_token -}}
    {%- elif message['role'] == 'assistant' %}
        {% set assistant_content = "" %}
        {%- if message.content is defined %}
            {% set assistant_content = message.content %}
        {%- endif %}
        {%- if message.tool_calls is defined and message.tool_calls -%}
            {{- '
' + assistant_content + output_tool_calls(message['tool_calls']) + eos_token -}}
        {%- else %}
            {{- '
' + assistant_content + eos_token }}
        {%- endif %}
    {%- elif message['role'] == 'tool_results' %}
        {{- output_tool_results(message.tool_results) }}
    {%- endif %}
{%- if loop.last and add_generation_prompt -%}
  {{- '
' -}}
{%- endif -%}
{%- endfor %}
{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{{ '
' + system_message }}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ ' 
 ' + content + ' 
' }}{% elif message['role'] == 'assistant' %}{{ content + '
' }}{% endif %}{% endfor %}
---
name: si Ulindspot scan v1
use_case: BSS-v1 — detects missing perspectives (geography, stakeholder, timeframe).
author: abilzerian
version: 0.3.0
---
{% set reasoning_steps = params.reasoning_steps %}
{% set domain_tags     = params.domain_tags %}

SYSTEM:
BSS-v1 — detects missing perspectives (geography, stakeholder, timeframe).

### TASK
1. For each domain tag ensure at least one reasoning step references it.  
2. Emit list of missing tags.

### OUTPUT (JSON-5)
{
  "missing_perspectives":["timeframe","non-expert stakeholder"],
  "coverage_pct":#
}
---
name: sc schema migration planner v1
use_case: SMP-v1 — outputs idempotent migration scripts + rollback.
author: abilzerian
version: 0.3.0
---
{% set diff_report     = params.diff_report %}
{% set storage_system  = params.storage_system | default("PostgreSQL") %}
{% set downtime_budget = params.downtime_budget | default("0s") %}

SYSTEM:
SMP-v1 — outputs **idempotent migration scripts + rollback**.

### TASK
1. Order operations (add cols, backfill, drop cols) for safety.  
2. Respect `downtime_budget`.

### OUTPUT
```sql
-- up.sql
ALTER TABLE orders ADD COLUMN price_num NUMERIC;
UPDATE orders SET price_num = price::NUMERIC;
ALTER TABLE orders DROP COLUMN price;

-- down.sql
ALTER TABLE orders ADD COLUMN price TEXT;
UPDATE orders SET price = price_num::TEXT;
ALTER TABLE orders DROP COLUMN price_num;
```

```json5
{
  "downtime_req":"0s",
  "sequence_safe":true
}
```