HA

halo-theme-dev

Provides guidance and templates for building and modifying Halo CMS themes.

Install

mkdir -p .claude/skills/halo-theme-dev && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11543" && unzip -o skill.zip -d .claude/skills/halo-theme-dev && rm skill.zip

Installs to .claude/skills/halo-theme-dev

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when creating or modifying a Halo CMS theme, writing Thymeleaf templates, configuring theme.yaml or settings.yaml, calling Finder APIs, using vite-plugin-halo-theme, defining theme settings forms, referencing static assets, implementing halo:comment or halo:footer extension points, defining model annotation fields (AnnotationSetting), adding i18n support, or handling error pages. Always use this skill when the user mentions themes, templates, Thymeleaf, theme configuration, or wants to customize the frontend appearance of a Halo site — even if they do not explicitly say "theme."
589 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Create or modify Halo CMS themes
  • Write Thymeleaf templates for frontend rendering
  • Configure `theme.yaml` and `settings.yaml`
  • Call Finder APIs for data querying
  • Use `vite-plugin-halo-theme` for theme development
  • Implement custom extension points like `halo:comment` or `halo:footer`

How it works

The skill guides the creation and modification of Halo CMS themes using Spring Boot and Thymeleaf, covering template writing, configuration, API calls, and static asset management. It emphasizes checking online documentation for current APIs.

Inputs & outputs

You give it
a request to create, modify, or customize the frontend appearance of a Halo site
You get back
a Halo CMS theme with configured settings, Thymeleaf templates, and static assets

When to use halo-theme-dev

  • Creating a new Halo theme
  • Writing Thymeleaf templates for Halo
  • Configuring theme settings forms
  • Implementing custom footer extensions

About this skill

Halo Theme Development

Halo is built on Spring Boot + Spring WebFlux + Thymeleaf. Themes use Thymeleaf templates for frontend page rendering.

Important: Halo's APIs, VO field names, and template variables evolve across versions. Do not rely on training data for specific field names, method signatures, or type structures. When writing code that accesses template variables or calls Finder API methods, always fetch the relevant online doc from the References section below first.

Thymeleaf Quick Reference

Full docs: https://raw.githubusercontent.com/thymeleaf/thymeleaf-docs/refs/heads/master/docs/tutorials/3.1/usingthymeleaf.md

Core syntax cheatsheet:

<!-- Output text -->
<h1 th:text="${site.title}"></h1>

<!-- Output unescaped HTML -->
<div th:utext="${post.content.content}"></div>

<!-- Links -->
<a th:href="@{${post.status.permalink}}">Post link</a>
<link rel="stylesheet" th:href="@{/assets/dist/style.css}" />

<!-- Loop -->
<li th:each="post : ${posts.items}" th:text="${post.spec.title}"></li>

<!-- Conditionals -->
<div th:if="${posts.hasNext()}">Next page</div>
<div th:unless="${posts.hasNext()}">Last page</div>

<!-- Local variable -->
<div th:with="menu = ${menuFinder.getPrimary()}">...</div>

<!-- Fragment include -->
<div th:replace="~{fragments/header :: header}"></div>

<!-- Layout reuse: pages pass fragments into a parameterized layout -->
<html th:replace="~{layout :: html(head = null, content = ~{::content})}">
  <th:block th:fragment="content"><!-- page body --></th:block>
</html>

<!-- Inline JavaScript -->
<script th:inline="javascript">
  var url = '[(${#theme.assets("/dist/main.iife.js")})]';
</script>

Development Workflow

  1. Create a theme folder under themes/ in the Halo working directory (must match metadata.name in theme.yaml)
  2. Write theme.yaml (required) and settings.yaml (optional)
  3. Create template files under templates/
  4. Install and activate the theme in Console → Theme Management
  5. Visit the frontend to verify

Disable Thymeleaf caching during development: set env var SPRING_THYMELEAF_CACHE=false (Docker), or spring.thymeleaf.cache: false in config (source mode).

Starter Templates

The assets/ directory provides two ready-to-use theme templates:

  • assets/theme-minimal/ — Zero-build-tool minimal theme with all 8 template files; ideal for quick prototyping or simple themes
  • assets/theme-vite/ — Vite project template with vite-plugin-halo-theme (recommended for new themes); includes partial layout reuse and CSS toolchain

Usage: copy the directory into themes/ in your Halo working directory, ensure the folder name matches metadata.name in theme.yaml, then install and activate in Console.

References Index

FileContentWhen to read
references/api-changelog.mdHigh-impact theme API changes by Halo version, with docs routesBefore using version-sensitive APIs or raising spec.requires
references/structure-and-config.mdDirectory structure, theme.yaml fields, root screenshot, settings.yaml form definitionCreating a theme, configuring theme.yaml/settings.yaml
references/vite-plugin.mdvite-plugin-halo-theme integration guide, include/slot template syntax, TailwindCSS integrationSetting up a Vite-based theme (recommended)
references/templates.mdTemplate route mapping, available variables per templateWriting template files
references/global-variables.mdGlobal variables (site, theme, theme.config) and type definitionsAccessing site info or theme setting values
references/finder-apis.mdAll Finder APIs (postFinder, categoryFinder, tagFinder, menuFinder, singlePageFinder, etc.)Querying data from any template
references/static-resources.mdStatic asset reference methods (@{}, #theme.assets())Referencing CSS/JS/images in plain HTML themes
references/template-tags.mdCustom tags (halo:comment extension point, halo:footer injection)Integrating comment plugins, injecting footer code
references/i18n.mdInternationalization via .properties files, #messages, #locale, frontend i18n injectionAdding multi-language support to a theme
references/official-plugins.mdOfficial plugin integration: pluginFinder.available(), search widget, dark mode color scheme adaptationAdding search, adapting dark mode for plugin UI
references/annotations.mdAnnotationSetting for model custom fields, #annotations utility for reading metadata in templatesAdding custom fields to menu items/posts/categories and using them in templates
references/packaging.mdPackaging a theme as a ZIP using @halo-dev/theme-package-cliPreparing a theme for release or upload
references/thymeleaf-tips.mdHalo-specific Thymeleaf best practices: literal substitutions, safe navigation, meta tag rules, permalink syntaxWriting any template file

When not to use it

  • When relying on training data for specific field names, method signatures, or type structures
  • When the task involves general Spring Boot or Spring WebFlux development unrelated to themes
  • When the task requires using outdated Halo APIs or template variables

Limitations

  • The skill does not rely on training data for specific field names, method signatures, or type structures.
  • The skill requires checking relevant online documentation for current APIs.
  • The skill focuses on themes, templates, and frontend customization.

How it compares

This skill provides a structured workflow and specific guidance for Halo theme development using Thymeleaf, offering a tailored approach compared to general web development or CMS theme creation.

Compared to similar skills

halo-theme-dev side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
halo-theme-dev (this skill)03moNo flagsIntermediate
http-generate17moReviewIntermediate
generating-api-contracts027dReviewAdvanced
android-java04moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry