Defines and renders named text templates (Scriban or Razor) in ABP applications, including localization, layouts, and virtual file sourcing.
Ships in abp-runtime. 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.
ABP's text templating system turns a named template + a model into rendered content (an HTML email body, an SMS text, a report fragment — anything). It is independent of what you do with the result: rendering is this skill; sending the output as email is the send-emails skill.
All APIs below are from Volo.Abp.TextTemplating.*.
IEmailSender, MailKit, SMTP settings, queuing) — use the send-emails skill..tpl files (embedding, override, live-editing) — use the manage-virtual-files skill.L calls resolve against — use the localize-applications skill.Templates must be defined before they can be rendered. Create a class deriving from TemplateDefinitionProvider and register templates in Define. Pick an engine with WithScribanEngine() (from Volo.Abp.TextTemplating.Scriban) or WithRazorEngine() (from Volo.Abp.TextTemplating.Razor). Add the corresponding module dependency (AbpTextTemplatingScribanModule / AbpTextTemplatingRazorModule).
using Volo.Abp.TextTemplating;
using Volo.Abp.TextTemplating.Scriban; // WithScribanEngine
public class DemoTemplateDefinitionProvider : TemplateDefinitionProvider
{
public override void Define(ITemplateDefinitionContext context)
{
context.Add(
new TemplateDefinition("Hello") // unique template name
.WithScribanEngine()
.WithVirtualFilePath(
"/Demos/Hello/Hello.tpl", // content in the Virtual File System
isInlineLocalized: true
)
);
}
}
Template content lives in the Virtual File System. Mark the .tpl file as an embedded resource and register the embedded file set in your module's ConfigureServices:
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyModule>("MyProject.Root.Namespace");
});
Scriban Hello.tpl (PascalCase C# properties map to snake_case in templates):
Hello {{model.name}} :)
ITemplateRenderer.RenderAsync is the primary entry point (source: https://github.com/abpframework/abp/blob/rel-10.5/framework/src/Volo.Abp.TextTemplating.Core/Volo/Abp/TextTemplating/ITemplateRenderer.cs):
Task<string> RenderAsync(
string templateName,
object? model = null,
string? cultureName = null, // defaults to CultureInfo.CurrentUICulture
Dictionary<string, object>? globalContext = null);
public class HelloDemo : ITransientDependency
{
private readonly ITemplateRenderer _templateRenderer;
public HelloDemo(ITemplateRenderer templateRenderer)
=> _templateRenderer = templateRenderer;
public async Task<string> RunAsync()
{
return await _templateRenderer.RenderAsync(
"Hello",
new { Name = "John" }); // anonymous model is fine for simple cases
}
}
Pass extra objects to the render context via globalContext, and force a culture with cultureName.
Inline localization — one template, texts localized through the localization system. Declare the localization resource on the TemplateDefinition and use the L helper in the template:
context.Add(
new TemplateDefinition("PasswordReset", typeof(DemoResource)) // localization resource
.WithScribanEngine()
.WithVirtualFilePath("/Demos/PasswordReset/PasswordReset.tpl", isInlineLocalized: true));
<a href="{{model.link}}">{{ L "ResetMyPassword" model.name }}</a>
Defining DemoResource itself (the resource class, its json, culture fallback) is the localize-applications skill; here you only reference an existing resource.
Multiple-content localization — a separate file per culture (en.tpl, tr.tpl, ...). Point the definition at a folder, set a default culture, and use isInlineLocalized: false:
context.Add(
new TemplateDefinition(name: "WelcomeEmail", defaultCultureName: "en")
.WithScribanEngine()
.WithVirtualFilePath("/Demos/WelcomeEmail/Templates", isInlineLocalized: false));
Layouts — define a template with isLayout: true containing a {{content}} placeholder, then reference it via the layout: argument of another TemplateDefinition.
A template's definition (name + engine) and its content are separate layers. Content is supplied by an ITemplateContentContributor; the default file contributor reads a .tpl from the Virtual File System (typically an embedded resource), but a custom contributor can source content from elsewhere (DB, config, a remote store).
RazorTemplateRenderingEngine.IsSandboxed is false. Use Razor only for templates authored and reviewed by trusted developers, never for content an untrusted user can edit. The Text Template Management module reflects this: editing non-sandboxed (Razor) content requires the extra TextTemplateManagement.TextTemplates.EditNonSandboxedContents permission — grant it only to fully trusted operators.See https://github.com/abpframework/abp/blob/rel-10.5/docs/en/framework/infrastructure/text-templating/razor.md.
TemplateDefinitionProvider isn't registered. This is separate from content: if the definition exists but no ITemplateContentContributor supplies content for it, the content lookup returns null instead (e.g. the default file contributor can't find the .tpl in the Virtual File System).TemplateDefinitionProvider) before it can be rendered — that's a separate layer from its content. A missing definition throws "Undefined Template"; a defined template with no content contributor returns null..tpl as a resource / register the embedded file set means the default file contributor can't find the content even though the definition exists.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/abp-runtime:render-text-templatesfrom abp-runtime
npx claudepluginhub abpframework/abp-skills --plugin abp-runtime10 skills in this plugin
/background-jobs-and-eventsIn-process/cross-service events, entity change reactions, deferred/recurring background work. USE FOR: ILocalEventBus / IDistributedEventBus, EntityCreated/Updated/DeletedEventData, [EventName] ETOs, IBackgroundJobManager jobs, AsyncPeriodicBackgroundWorkerBase workers. DO NOT USE FOR: distributed cache/lock (distributed-caching-and-locking); SignalR push (add-signalr-realtime); microservice message contracts (design-module-and-service-communication)./cache-entitiesRead-only single-entity-by-id caching via the generic IEntityCache abstraction (cache to the entity or a DTO), auto-invalidated. USE FOR: AddEntityCache, caching to entity or DTO, batch lookups (FindMany/GetMany), expiration, EntityCacheWithObjectMapper mapping. DO NOT USE FOR: general key/value caching or distributed locks (distributed-caching-and-locking); querying/persisting entities (ef-core-integration or mongodb-integration)./configure-app-urlsNamed application roots and external URLs with AppUrlOptions, resolved tenant-aware via IAppUrlProvider. USE FOR: AppUrlOptions.Applications; RootUrl and named Urls; email links; cross-application links; tenantId and tenantName placeholders; redirect allow-list checks. DO NOT USE FOR: rendering the email body (render-text-templates) or sending it (send-emails); remote service base addresses (consume-remote-services); resolving tenants by domain (configure-multi-tenancy).Other plugins' skills for the same job