# Customizing with AI

> Change the Index theme's code by describing what you want to an AI coding tool: which tools work, setting up once, asking for a change, and checking it.

Source: https://docs.pachathemes.com/index/advanced/ai-coding-tools/

Index is ready for AI coding tools. You describe a change in plain words, and the tool edits the
theme, checks it, and builds a new `index.zip` for you to upload. You don't need to know the code.

Before you start, check whether the change needs code at all. Layouts, typefaces, colors, and
menus are in Ghost's settings: see [homepage](https://docs.pachathemes.com/index/settings/homepage/),
[site-wide](https://docs.pachathemes.com/index/settings/site-wide/), and the [accent color](https://docs.pachathemes.com/index/customizations/accent-color/).

## which tools work

Any tool that reads `AGENTS.md`, the shared instruction file for coding agents: Claude Code,
Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Zed, and others. They all get the same
guide, so use whichever you like, and switch whenever you want.

## what the tool reads

| File | What it's for |
|---|---|
| `AGENTS.md` | The guide: what each file does, how the 20 settings work, what's already built, step-by-step recipes for common changes, and when to ask you first. |
| `CLAUDE.md`, `GEMINI.md` | Point Claude Code and Gemini CLI to `AGENTS.md`. |
| `package.json`, `package-lock.json` | The theme's settings, and the exact build and check tools Index was tested with. |
| `MY-CHANGES.md` | Doesn't exist at first. The tool starts it with your first change and adds to it each time. |

## set up once

1. Keep the `index.zip` you downloaded, unchanged, somewhere safe. It's your way back.
2. Unzip a copy into a folder of its own.
3. Install [Node.js](https://nodejs.org/) 22 or newer.
4. Open the folder in your AI coding tool: as a project in an editor like Cursor, or by starting
   a tool like Claude Code in that folder. The first time, it runs `npm ci` to install the build
   tools.

## ask for a change

Describe what you want, as you would to a person. For example:

- "Make the page background off-white in light mode."
- "Add more space between the projects on the homepage."
- "Change the word 'journal' to 'notes' everywhere."
- "How does the homepage decide which photo to show on hover?" The tool explains, and changes
  nothing.

Index already uses all 20 theme settings that Ghost allows, so for a new on or off choice the
tool uses a [private tag](https://docs.pachathemes.com/index/essentials/project-layouts/) or a page of its own instead. It
asks you before renaming or removing a setting, deleting a file, or adding anything that loads
from another website.

## check and upload

When the change is done, the tool runs `npm run verify`, which builds the theme and checks it
with GScan, the same checker Ghost runs when you upload a theme. Then `npm run zip` makes a new
`index.zip` next to the folder.

Upload it in Ghost: open Settings, then Theme (under Site), then Change theme, then Upload theme.
Only the theme's files change. Your posts, pages, members, Ghost settings, and the choices you
made in the theme settings all stay as they are. Look at your site, and if something isn't
right, tell the tool what you see.

## when Index updates

A new version of Index doesn't include your changes, so they need to be carried over. Unzip the
new version into a new folder, then either:

- copy `MY-CHANGES.md` into it and ask your tool to make those changes again, or
- open both folders in your tool and ask it to bring your changes from the old one to the new
  one.

See [updating](https://docs.pachathemes.com/index/advanced/updating/) for what an update replaces and what it keeps.

## help

Our support covers the theme as it ships. We can't help with custom code, whoever or whatever
wrote it. If something breaks, upload the original `index.zip` you kept, and your site looks just
as it did before your changes.
