Provides guidance on Liquid prompt templates in CrestApps.Core 2.0, covering registration, Markdown templates with front matter, template providers, rendering, and seeding system prompt defaults.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Prompts are Markdown files with YAML front matter, rendered with Liquid (Fluid) and discovered from embedded resources, the file system, code, or custom providers.
AddCoreAIServices() already chains AddCoreAITemplating(); call it directly only when using templating on its own.MergeAsync or profile selections.Templates/Prompts/ (their Kind defaults to SystemPrompt). Files directly under Templates/ must declare Kind. Generic Templates/ discovery is not recursive.crestapps-core-ai-personas) for identity and voice instead of copying the same persona prompt into many templates.ITemplateService and ITemplateProvider methods take an optional CancellationToken; pass it through.using CrestApps.Core.Templates.Extensions;
builder.Services.AddCoreAITemplating(options =>
{
options.AddDiscoveryPath("/app/templates");
});
// Embedded .md resources under Templates/ in an assembly.
builder.Services.AddTemplatesFromAssembly(typeof(Program).Assembly, source: "MyApp");
AddCoreAITemplating() builds on AddTemplating() and adds the Profile and SystemPrompt template sources, the AI profile template manager, and AIProfileSystemPromptTemplateProvider.
| Service | Purpose |
|---|---|
ITemplateService (DefaultTemplateService) | Discover, render and merge |
ITemplateEngine (FluidTemplateEngine) | Render and validate Liquid |
ITemplateParser | Parse Markdown front matter |
OptionsTemplateProvider, FileSystemTemplateProvider, PromptsFileSystemTemplateProvider | Code, Templates/, Templates/Prompts/ |
AIProfileSystemPromptTemplateProvider | SystemPrompt AI profile templates from the profile template store |
---
Title: Customer Support Assistant
Description: Prompt for a customer support chatbot
Category: Support
IsListable: true
---
You are a customer support assistant for {{ company_name | default: "our company" }}.
{% if support_hours %}
Support hours are {{ support_hours }}.
{% endif %}
Front matter fields are Title, Description, Category, IsListable (default true) and Kind. The file name without extension is the template id. ITemplateParser.Parse(content) returns a TemplateParseResult with Metadata and Body.
using CrestApps.Core.Templates.Services;
var templates = await templateService.ListAsync(cancellationToken);
var prompt = await templateService.RenderAsync(
"customer-support",
new Dictionary<string, object> { ["company_name"] = "Contoso" },
cancellationToken);
var systemPrompt = await templateService.MergeAsync(
["base-personality", "safety-rules", "rag-instructions"],
new Dictionary<string, object> { ["user_name"] = userName },
separator: "\n\n---\n\n",
cancellationToken);
Validate user-authored Liquid before saving:
using CrestApps.Core.Templates.Rendering;
if (!templateEngine.TryValidate(content, out var errors))
{
// errors is IList<string>
}
profile.Put(new PromptTemplateMetadata
{
Templates =
[
new PromptTemplateSelectionEntry
{
TemplateId = "customer-support",
Parameters = new Dictionary<string, object> { ["company_name"] = "Contoso" },
},
],
});
The profile context handler renders the selections into the system message. A linked persona's block is placed before them, and the profile's own system message after them.
Speaking styles and guardrail topics are System Prompt templates in their own category (Speaking style, Guardrail topic). Their defaults are not served read-only: they ship as Markdown embedded under SystemPromptDefaults and are copied once into the saved AI profile templates, where users can edit or delete them. AddSpeakingStyles() and AddGuardrails() register the framework's defaults.
using CrestApps.Core.AI.Services;
// Once, from a migration or a setup step, with the AI profile template store registered.
var seeder = serviceProvider.GetRequiredService<IAISystemPromptTemplateSeeder>();
IReadOnlyList<string> created = await seeder.SeedAsync(); // or SeedAsync(AISpeakingStyles.Category)
GetDefaultsAsync(category) reads the defaults without saving.SystemPromptDefaults (for example <EmbeddedResource Include="SystemPromptDefaults\**\*" />) and call services.AddCoreAISystemPromptTemplateDefaults(typeof(Startup).Assembly), optionally with a category to read only that category. Front matter sets Title, Description, Category and IsListable; the body is the system message.---
Title: Echo Verification
Description: Reads back what the customer gave before acting on it
IsListable: false
Category: Speaking style
---
## Read back what you are given
When the customer gives you something you will act on or record, repeat it back once and ask them to confirm.
Fill a picker from one category, file-based and saved templates together, deduplicated by id and ordered by title:
using CrestApps.Core.AI.Models;
using CrestApps.Core.AI.Services;
using CrestApps.Core.Templates.Models;
IReadOnlyList<AITemplateOption> styles = await templateService.ListOptionsByCategoryAsync(AISpeakingStyles.Category, cancellationToken);
IReadOnlyList<Template> topics = await templateService.ListByCategoryAsync(AIGuardrailTopics.Category, cancellationToken);
AITemplateOption is (Id, Title, Description); AITemplateCategoryExtensions.GetTitle(template) falls back to the id.
using CrestApps.Core.Templates.Models;
using CrestApps.Core.Templates.Parsing;
using CrestApps.Core.Templates.Providers;
public sealed class DatabaseTemplateProvider : IDynamicTemplateProvider
{
private readonly IPromptRecordStore _store;
private readonly ITemplateParser _parser;
public DatabaseTemplateProvider(IPromptRecordStore store, ITemplateParser parser)
{
_store = store;
_parser = parser;
}
public async Task<IReadOnlyList<Template>> GetTemplatesAsync(CancellationToken cancellationToken = default)
{
var templates = new List<Template>();
foreach (var record in await _store.ListAsync(cancellationToken))
{
var parsed = _parser.Parse(record.Content);
templates.Add(new Template
{
Id = record.Name,
Aliases = [$"legacy:{record.Id}"],
Metadata = parsed.Metadata,
Content = parsed.Body,
Kind = "SystemPrompt",
Source = "Database",
});
}
return templates;
}
}
builder.Services.AddScoped<ITemplateProvider, DatabaseTemplateProvider>();
IPromptRecordStore stands for the application's own storage. Use plain ITemplateProvider for templates that never change while the app runs.
IDynamicTemplateProvider adds no members. DefaultTemplateService reads every static provider first, so a dynamic template cannot replace a shipped template with the same id, and dynamic providers are read again each scope so edits apply on the next request.GetStaticTemplatesAsync and caches only those.GetAsync and RenderAsync match Id first and Aliases second. Among static providers, the first template with an id wins.KeyNotFoundException rendering a selected system prompt template: hosts on 1.x had no AIProfileSystemPromptTemplateProvider. In 2.0 it ships with AddCoreAITemplating(); without a profile template store it returns nothing.Templates/ is ignored: it lacks Kind, or it sits in a subfolder.AIProfileSystemPromptTemplateProvider moved from the sample hosts into CrestApps.Core.AI and is registered by AddCoreAITemplating(). Remove any copied provider from your host.SystemPrompt profile template's identifier is now its name. Earlier ai-profile: identifiers are kept as Template.Aliases, so stored selections still render.IDynamicTemplateProvider for user-editable templates so they cannot shadow shipped ones and are re-read every scope.What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-core:crestapps-core-ai-templatesfrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs.Other plugins' skills for the same job