Integrate Search
SkillWeb & browsingUpdate onsite search behavior in website-docs when the task changes the search page, search box flows, Algolia client wiring, result categorization, external search fallbacks, or search-related routing. Edit the relevant Gatsby page creator, search template or components, and shared search utilities while keeping locale, category, and tracking behavior aligned.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Integrate Search skill
What this skill tells your AI
The instructions your AI receives, as published by pingcap/website-docs in .agents/skills/integrate-search/SKILL.md and read by ahel’s review.
Overview
Use this skill for search experience changes in this repo. Search behavior spans Gatsby page creation, the search page template, UI components, Algolia wiring, category labeling, and external search fallbacks.
Workflow
1) Locate the affected search layer
Common files:
gatsby/create-pages/create-search.tssrc/templates/DocSearchTemplate.tsxsrc/components/Search/index.tsxsrc/components/Search/Results.tsxsrc/shared/utils/algolia.tssrc/shared/utils/searchCategory.ts
Choose the correct layer before editing:
- Page route creation
- Search box interactions
- Result rendering and paging
- Category resolution
- Algolia client configuration
2) Preserve current locale and route assumptions
Search in this repo currently:
- creates
/search/ - navigates to
/search/?q=... - uses
gatsby-plugin-react-i18nexthelpers in UI - mixes onsite search with Google or Bing fallbacks
If you change search route shape or category prefixes, review i18n routing and resolveSearchCategory().
3) Update Algolia and category logic carefully
When touching search data wiring:
- Keep
GATSBY_ALGOLIA_APPLICATION_IDandGATSBY_ALGOLIA_API_KEYusage intact unless the task explicitly changes them - Reuse
normalizeSearchResultPath()andresolveSearchCategory()patterns - Update translation keys if new labels or UI strings are introduced
When adding a new top-level docs section, search categorization may need updates.
4) Review tracking and external search behavior
src/components/Search/index.tsx includes GTM events and Google/Bing fallbacks.
If you alter submit behavior, preserve or intentionally update:
- onsite vs external search selection
- query propagation to the search page
- GTM events
5) Validate
At minimum:
- Confirm the search route still resolves
- Confirm query string handling still works
- Confirm category chips still resolve correctly for representative URLs
- Run
yarn buildwhen feasible
Output Checklist
Report:
- Which search files changed
- Whether route, Algolia, category, or tracking behavior changed
- Any new translation keys or route-prefix dependencies
- Whether
yarn buildwas run
Signals
- GitHub stars
- 23
- Forks
- 33
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
integrate-search- Source
- github.com/pingcap/website-docs