add-synonym
БесплатноБез исполняемых скриптовНе проверенAdd search synonyms to the Algolia synonym list. Use when someone wants to add, update, or extend synonym groups for site search.
от owid★ 1 574 звезды на GitHubОб этом скилле
Add Search Synonyms
Add or update synonym entries in site/search/synonymUtils.ts so that our Algolia-powered site search returns better results.
Assumptions
- The user is on a macOS (Apple) laptop.
- The user may not be a developer — they may not have Node.js, Yarn, or even Homebrew installed. Guide them through any setup with clear explanations.
Steps
Start from a clean, up-to-date main branch and create a feature branch. Run:
git checkout masterto switch to the main branch.git pullto get the latest changes.- If either command fails (e.g. uncommitted changes), explain clearly what's happening and help resolve it. For uncommitted changes,
git stashis usually the right fix. - Create and checkout a new branch:
git checkout -b add-synonym-<username>-<date>where<username>is the GitHub username and<date>is today's date as YYYYMMDD (e.g.add-synonym-bastianherre-20260413).
Ask the user what synonyms they want to add. They can describe it in natural language (e.g. "add WHO as a synonym for World Health Organization" or "make 'EV' and 'electric vehicle' synonyms").
Read
site/search/synonymUtils.tsto see the current synonym groups and section comments.Determine which existing synonym group the new terms belong in:
- Find the group where the requested terms best fit and add the new terms to it.
- Prefer adding to an existing group, and never create a new thematic section (the
// Organizations,// Health, … comment blocks). - Exception for producers/organizations: in the
// Organizationssection each producer is its own array (e.g.["imf", "international monetary fund"]). Adding a new producer means adding a new array under that section — that's expected, not a "new group" in the forbidden sense. Never merge two distinct organizations into one array, since every term in an array is treated as interchangeable (that would make IMF and the OECD synonyms of each other). - Preserve the existing formatting: each group is an array of strings, groups are separated by blank lines between sections.
Edit the file. Use double quotes for all strings. Keep entries in the same style as surrounding code.
Validate the change. Before running any commands, check that the environment is ready:
- Run
which yarnto check if Yarn is available. - If Yarn is not found, explain to the user: "I need to install a couple of tools to validate the changes. This is a one-time setup." Then:
- Check if Node.js is installed (
which node). If not, install it viabrew install node(install Homebrew first via its install script ifwhich brewfails). - Install Yarn via
corepack enable && corepack prepare yarn@stable --activate. If corepack is not available, fall back tonpm install -g yarn. - Run
yarn installto install project dependencies.
- Check if Node.js is installed (
- If Yarn is found but
node_modulesdoesn't exist, runyarn installfirst. - Then run:
yarn fixFormatChanged > /dev/null 2>&1 && yarn typecheckand fix any errors.yarn testLintChangedand fix any errors.yarn test run --reporter dot site/search/synonymUtils.test.tsand fix any errors.
- Run
Pause and ask the user to confirm the changes look correct before proceeding. Show them what was added and wait for their go-ahead.
Commit to the feature branch with a message in this exact format:
- Prefix:
✨🤖 - Followed by a short description, e.g.
✨🤖 Add "WHO" synonym for "World Health Organization" - Add
Co-Authored-By: Claude <[email protected]>as a trailer.
- Prefix:
Push the branch and create a PR:
- Push with
git push -u origin HEAD. - Create the PR with
gh pr create --title "<same as commit message>" --reviewer edomtand a proper description (don't leave--bodyempty). The description should briefly cover:- What terms were added and which group they went into.
- Why they're grouped that way (especially if you created a new array rather than extending an existing group).
- The validation results (typecheck / lint / synonym test).
- A note that synonyms ship to Algolia automatically on deploy via
baker/algolia/configureAlgolia.ts.
- Push with
Conventions & lessons
These apply to synonyms in general (not just organizations) — apply them proactively and suggest the relevant variants to the user when you add a term:
- Beware acronyms/terms that are common English words. A synonym expands every query containing that token, so a common-word term pollutes unrelated searches. The classic case is WHO: don't add the bare
"who"for the World Health Organization, since "who has the highest income" would pull WHO datasets. When a term collides with a common word, flag it to the user and prefer the full name and/or a non-colliding variant. ("un"is borderline but accepted;"pip"is a real word but low practical risk on our corpu
Установить add-synonym в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-synonym?
Add search synonyms to the Algolia synonym list. Use when someone wants to add, update, or extend synonym groups for site search.
Как установить скилл add-synonym?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-synonym запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub