Build a theme with an AI coding assistant
An AI coding assistant, such as Claude Code or GitHub Copilot, can build or change a theme from a description of what you want. You don't need to explain Paligo's rules to it first. Paligo Base includes an AGENTS.md file with instructions for coding assistants. It describes:
the files a theme needs, and how to package them
the rules a theme must follow to work with Paligo, such as keeping
paligo.headandpaligo.footand the search box's class namesthe parts of Twig that templates can use
the information and components that Paligo gives a template
how to declare theme options
how to check the result
Coding assistants read AGENTS.md when they start working in a folder. Claude Code reads CLAUDE.md instead, and the CLAUDE.md in Paligo Base tells it to read AGENTS.md.
To build a theme with an AI coding assistant:
Download Paligo Base, as described in Download a theme, and unzip it.
Open the theme folder in Visual Studio Code, and start Paligo Theme Studio's preview, as described in Preview a theme in Paligo Theme Studio.
Start your coding assistant in the theme folder.
Describe the theme you want. For example:
Change the colors and fonts to match our website, use our logo in the portal banner, and add links to our support pages to the footer.
The preview updates each time the assistant saves a file, so you can follow its changes.
Check the result in the preview: on a topic page, the portal page and the search page, and in light and dark mode. Ask the assistant to change anything that isn't right.
When the theme is ready, upload it to a layout, as described in Upload a custom theme, or push it from Theme Studio, as described in Push a theme to a layout.
If Paligo reports a problem with the theme, give the assistant the messages, and it can fix them. For what they mean, see Theme validation messages.
Tip
An assistant that can control a web browser can also look at the preview itself. Open the preview in a browser, as described in Open the preview in a browser, and the assistant can read the page, follow links and check how it looks.
Note
Keep AGENTS.md and CLAUDE.md in your theme if you go on working on it with a coding assistant. Paligo doesn't publish them.