archetype-scriban

Write Scriban template syntax for Dev CLI archetype files and archetype.json expressions.

1|Updated May 19, 2026
One-click install
npx skills add https://github.com/thomasmartinsen/talks --skill archetype-scriban-thomasmartinsen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: archetype-scriban
Source: https://github.com/thomasmartinsen/talks/tree/main/20260519%20-%20Agentic%20engineering/primitives/skills/creator/skills/archetype-scriban
Command: npx skills add https://github.com/thomasmartinsen/talks --skill archetype-scriban-thomasmartinsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Scriban templates for Dev CLI archetypes involves subtle syntax rules, truthy evaluation gotchas, and custom casing filters that are easy to get wrong, leading to broken code generation or incorrect conditional output. ## Core Features & Use Cases - Syntax Reference: Covers variables, conditionals, loops, whitespace control, and built-in string/array filters used in .scriban template files. - Custom Filters: Documents pascal_case, camel_case, kebab_case, snake_case, pluralize, singularize, indent, and nullable transforms for naming conventions. - Gotcha Guidance: Explains truthy evaluation rules, JSON computed-expression quoting, and common mistakes like using string parameters as boolean conditions. - Use Case: When authoring an archetype.json with computed parameters like "{{ ProjectName }}.Features.{{ FeatureName }}" or a conditional C# template, consult this Skill to write correct expressions and avoid rendering errors. ## Quick Start Ask the AI to write a Scriban template for a C# handler class with a conditional dependency injection block and kebab-case output file name.

Frequently Asked Questions about archetype-scriban

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

FAQPage Schema
How do I write Scriban conditionals in archetype templates?

Use {{ if Condition }} ... {{ else }} ... {{ end }} blocks inside .scriban files or archetype.json condition fields. Remember that non-empty strings evaluate as true, so declare boolean parameters with type boolean rather than string.

What custom filters are available in Scriban archetype templates?

Available custom filters include pascal_case, camel_case, kebab_case, snake_case, pluralize, singularize, indent, and nullable. These work in both template files and JSON inline expressions, and are preferred over manual casing logic.

Why does my Scriban string condition evaluate to true unexpectedly?

In Scriban, any non-empty string is truthy, so {{ if SomeString }} is true even when SomeString is "false". Compare explicitly with {{ if SomeString == 'false' }} or declare the parameter as a boolean type.

How do I remove blank lines from conditional blocks in Scriban templates?

Use the whitespace-stripping syntax {{~ and ~}} around conditional blocks, for example {{~ if IncludeLogging ~}}. This trims surrounding newlines so conditional sections do not leave empty lines in generated output.

Can I use quotes inside Scriban expressions in archetype.json?

Yes, but use single quotes inside the Scriban expression because the JSON string itself is double-quoted, for example "computed": "{{ 'literal' }}". Mixing double quotes inside breaks JSON parsing.