Use with an AI agent
The plugin comes with an agent skill for Claude Code, Codex, Cursor, GitHub Copilot and other agents. With the skill, your agent uses the features as it writes new pages. For example, it focuses the lines of a new option, or adds a placeholder for an API token. It also knows when a feature does not help.
Install the skill
Section titled “Install the skill”Run this command in the folder of your Starlight site. Add -g to install it for every project:
npx skills add ewels/starlight-codeblocksThe skills CLI installs the skill for each coding agent that you use. Run npx skills update to get a new version.
An agent without a skills folder can read SKILL.md on GitHub:
Add features to an existing site
Section titled “Add features to an existing site”The skill works well for agents building new sites, but can also retrofit existing content.
Ask the agent to add the features to one page, a sidebar group or the whole site. It works through the pages one at a time, and reads each code block in the context of its page. It adds a feature only when the page gives a reason for it. After each page, it tells you what it changed and why.