/anglesite:searchfrom anglesite
Adds client-side site search using Pagefind, building a search index from static HTML at build time with no external API or ongoing costs.
Ships in anglesite. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Add on-site search powered by Pagefind. Builds a search index at build time from the site's static HTML output. Visitors search entirely client-side with no external API, no account, and no ongoing cost. The ~6 KB JavaScript loader only runs on the /search page.
/search page, matching the Turnstile pattern on /contact.Read EXPLAIN_STEPS from .site-config. If true or not set, explain before every tool call that will trigger a permission prompt. If false, proceed without pre-announcing.
Read .site-config for SEARCH_ENABLED. If it's already true, tell the owner: "Your site already has search set up. Would you like to reconfigure it, or is something not working?" Then troubleshoot as needed.
Verify the site builds cleanly: run npm run build. If the build fails, fix it before proceeding.
Most of the pieces ship with the site. In Steps 1–4, check each one first and only add what is missing — never overwrite a file that is already there.
Read package.json. astro-pagefind is normally already listed under dependencies. Only if it is missing, install it:
npm install astro-pagefind
It provides the Astro integration that runs Pagefind after each build.
Read astro.config.ts. If it already imports astro-pagefind, skip this step. Otherwise use the Edit tool to add the import next to the other integration imports:
import pagefind from "astro-pagefind";
Then add pagefind(), as the last entry of the existing integrations array, after the sitemap(...) entry (it runs post-build). Leave every other entry exactly as it is.
Read src/layouts/BaseLayout.astro. It normally already has data-pagefind-body on <main> (so Pagefind only indexes page content) and data-pagefind-ignore on <header> and <footer>. Only if an attribute is missing, add it with the Edit tool:
<main id="main" data-pagefind-body>
<header class="h-card" data-pagefind-ignore>
<footer data-pagefind-ignore>
src/pages/search.astro ships with the site — leave it as it is. Only if the file is missing (an older site), read ${CLAUDE_PLUGIN_ROOT}/template/src/pages/search.astro and write the same content to src/pages/search.astro.
The search container on that page carries data-pagefind-ignore so the search page itself is not indexed (avoids circular results).
Read src/layouts/BaseLayout.astro. Add a search link to the <header> with the Edit tool:
<header class="h-card" data-pagefind-ignore>
<a href="/" class="p-name u-url">{siteName}</a>
<nav>
<a href="/search">Search</a>
</nav>
</header>
If the site already has a <nav> in the header, add the search link to the existing nav. If there's no nav yet, create one.
Style the nav link to match existing navigation. Add minimal CSS if needed:
header {
display: flex;
justify-content: space-between;
align-items: center;
}
header nav a {
color: var(--color-primary);
text-decoration: none;
}
header nav a:hover {
text-decoration: underline;
}
Add to .site-config with the Edit tool:
SEARCH_ENABLED=true
Run npm run build to generate the site and Pagefind index.
After a successful build, verify:
dist/pagefind/ directory exists and contains index files (the search page loads /pagefind/pagefind-ui.js from it)dist/search/index.htmlIf the build fails, diagnose and fix before presenting to the owner.
Tell the owner: "Search is ready! Your site now has a /search page where visitors can find any content. The search index updates automatically every time you deploy. Want to preview it?"
If /anglesite:search is run again on a site that already has search:
.site-config for SEARCH_ENABLEDIf the site has more than ~200 pages and the owner reports slow search or large page loads, consult ADR-0015 for upgrade paths:
Present these as options only when Pagefind proves insufficient. For most small business sites (5-50 pages), Pagefind is the right choice.
What SKILL.md sets; muted values are Claude Code's defaults
Use when the site has enough pages or posts that visitors need a search box to find things.
npx claudepluginhub anglesite/anglesite-skills --plugin anglesite56 skills in this plugin
/bookingEmbed appointment scheduling (Cal.com or Calendly) into the siteOther plugins' skills for the same job