Skip to content

feat: add algolia-migration skill for API client upgrades#26

Open
MarioAlexandruDan wants to merge 47 commits into
mainfrom
feat/add-algolia-migration
Open

feat: add algolia-migration skill for API client upgrades#26
MarioAlexandruDan wants to merge 47 commits into
mainfrom
feat/add-algolia-migration

Conversation

@MarioAlexandruDan

@MarioAlexandruDan MarioAlexandruDan commented May 20, 2026

Copy link
Copy Markdown

Covers JS v4→v5, Python v3→v4, Go v3→v4, PHP v3→v4, Java v3→v4, C# v6→v7, Ruby v2→v3, Kotlin v2→v3, Scala v1→v2, and Swift v8→v9. Dart is a new client with no legacy version, so it's excluded from scope. Includes universal breaking-change patterns, per-language reference files with primary-source code examples, 5 evals, and marketplace registration.

What does this skill do?

Gives AI agents accurate, language-specific migration recipes so developers can upgrade Algolia backend clients to the current major version without reading long changelogs or guessing renamed methods.

Checklist

  • python3 scripts/validate_skills.py . passes (0 errors)
  • Skill description is under 1024 chars and includes WHEN and WHEN NOT to trigger
  • evals/evals.json exists with at least 1 realistic prompt
  • Skill is self-contained — no ../other-skill/ references
  • Registered in .claude-plugin/marketplace.json (new skills only)
  • Goes in skills/ here if useful to customers; internal-only skills → algolia/internal-skills

Covers JS v4→v5, Python v3→v4, Go v3→v4, PHP v3→v4, Java v3→v4,
C# v6→v7, Ruby v2→v3, Kotlin v2→v3, Scala v1→v2, Swift v8→v9,
and Dart (new client). Includes universal breaking-change patterns,
per-language reference files with primary-source code examples,
5 evals, and marketplace registration.
@MarioAlexandruDan MarioAlexandruDan marked this pull request as draft May 20, 2026 12:39
- dart.md: replace non-existent saveObjects with saveObject/batch pattern
- go.md: fix cross-app copy (SettingsResponse→IndexSettings JSON round-trip, handle NewClient errors)
- evals: add coverage for Java, C#, Kotlin, Scala, Swift, Dart (11 evals total)
- README: fix trailing whitespace on instantsearch table row
…ation

go.md: handle json.Marshal/Unmarshal errors in cross-app copy
java.md: fix replaceAllObjects (args not ReplaceAllObjectsParams model),
  fix browseObjects (Iterable<T> pattern, not consumer callback)
kotlin.md: searchParamsObject -> searchParams parameter name
ruby.md: replace_all_objects uses positional args, not keyword scopes:
evals: fix Python save_objects body= -> objects=, Java saveObjects
  singular/plural and waitForTasks pattern
ReplaceAllObjects, PartialUpdateObjects, and BrowseObjects all use
variadic option functions, not params structs:
- ReplaceAllObjects(indexName, objects, WithScopes([...]))
- PartialUpdateObjects(indexName, objects, WithCreateIfNotExists(false))
- BrowseObjects(indexName, BrowseParamsObject{}, WithAggregator(func(any,error)))

Also fixes BrowseObjects aggregator callback type: func(any, error) not
func(*search.BrowseResponse)
saveObjects(String, Iterable, boolean) does not exist — the 3-arg
overload takes RequestOptions. Use the 4-arg form: saveObjects(indexName,
objects, true, null)
… files

csharp.md:
- OperationIndexAsync: Operation = OperationType.Copy/Move (not string)
- BrowseObjectsAsync: returns IEnumerable<T>, use foreach (not callback)
- Helper changes note corrected accordingly

php.md:
- browseObjects returns ObjectIterator, iterate with foreach (not callback)
- Wait pattern: saveObject singular for single-task wait; saveObjects with
  third bool arg for multi-object wait (saveObjects result is array)

ruby.md:
- browse_objects block receives individual hits, not page response

python.md:
- SearchParams import: from algoliasearch.search.models import SearchParams

javascript.md:
- accountCopyIndex: clarify it is on the algoliasearch meta-package client

evals.json:
- eval #7 C#: SaveObjectsAsync returns List<BatchResponse>; use built-in
  waitForTasks param instead of chaining WaitForTaskAsync on list result
go.md: remove spurious pointer dereference on TaskID (int64 not *int64)
kotlin.md: browseRules/browseSynonyms helpers don't exist in v3; replace
  cross-app copy with confirmed browseObjects + note about rules/synonyms
swift.md: browseObjects requires browseParams: + aggregator: labels (not
  trailing closure); add saveObjects helper with waitForTasks param
…g round

python.md: transformation helpers require TransformationOptions object
  not transformation_region string at init
javascript.md: split replaceAllRules/replaceAllSynonyms rename rows —
  rules use clearExistingRules:true, synonyms use replaceExistingSynonyms:true
csharp.md: ChunkedBatch/IndexExists helpers have Async suffix
php.md: generateSecuredApiKey is static and takes a plain array, not a
  typed SecuredApiKeyRestrictions model
WithChunkedBatchWaitForTasks -> WithWaitForTasks (correct ChunkedBatchOption)
WithReplaceAllObjectsBatchSize -> WithBatchSize (correct option, former does not exist)
Java, PHP and C# use Iterable/IEnumerable/ObjectIterator (foreach loop),
not an aggregator callback — clarify universal #6 accordingly
@MarioAlexandruDan MarioAlexandruDan marked this pull request as ready for review May 20, 2026 14:26
@MarioAlexandruDan MarioAlexandruDan marked this pull request as draft May 20, 2026 14:32
@MarioAlexandruDan MarioAlexandruDan self-assigned this May 20, 2026
…erable

Official docs and source confirm BrowseObjectsAsync accepts an Action<T>
aggregator, not an IEnumerable<T>. Fix SKILL.md universal #6 accordingly.
… docs

Rewrote every language reference file based on content fetched directly
from https://www.algolia.com/doc/libraries/sdk/upgrade/<lang>.md:

- Full method rename tables sourced from official docs
- Correct helper signatures (ReplaceAllObjectsParams struct for Go,
  browseObjects iterator for PHP, aggregator callback for C#/Java/Ruby)
- Cross-app copy patterns for all languages
- Transformation helpers with correct init requirements
- waitForApiKey, waitForAppTask documented for all languages
- Complete Recommend API rename tables included

Key corrections vs previous version:
- Go: ReplaceAllObjects/PartialUpdateObjects/BrowseObjects use correct
  struct/params forms from official docs
- PHP: browseObjects returns iterator (foreach), not aggregator
- Ruby: browse block receives full page response (response.hits), not hits
- C#: BrowseObjectsAsync confirmed aggregator (reverted IEnumerable fix)
- Java: browseObjects uses aggregator callback (confirmed from docs)
- Python: save_objects uses objects= param; transformation via SearchConfig
- SKILL.md §6: Java moved to aggregator group
…e guides

All 11 language reference files now mirror the content of the official
Algolia SDK upgrade guides at algolia.com/doc/libraries/sdk/upgrade/<lang>.
Includes full method rename tables, all helper changes, cross-app copy
patterns, transformation helpers, and wait helpers per language.

dart.md: verified against actual client source — fixed wrong package names
(algolia_client_abtesting_v3, removed non-existent analytics/ingestion),
waitTask/waitAppTask/waitKeyCreation method names, SearchForHits direct
usage, correct enum values.
Comment thread .claude-plugin/marketplace.json Outdated
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>

@Fluf22 Fluf22 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few other generic observations:

  • add a trailing newline at the end of each reference file
  • cleanup the doc-site rendering artifacts in reference files
    • code fence decorators (icon=, theme=, highlight=, expandable)
    • absolute /doc/ paths
    • JSX/MDX components

It's noise for the agents, or it can even break their tool calls (no trailing newline can mess with cat, diff, etc)

Comment thread skills/algolia-migration/SKILL.md Outdated
Comment thread skills/algolia-migration/SKILL.md Outdated
Comment thread skills/algolia-migration/SKILL.md Outdated
Comment thread skills/algolia-migration/references/dart.md Outdated
Comment thread skills/algolia-migration/SKILL.md Outdated
Comment thread skills/algolia-migration/SKILL.md Outdated
Comment thread README.md Outdated
MarioAlexandruDan and others added 9 commits May 22, 2026 13:20
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
- Delete references/kotlin.md (out of scope)
- Delete references/dart.md (new client, no migration needed)
- Remove Kotlin eval (#8) from evals.json
- SKILL.md: remove Kotlin from supported migrations table,
  description, and browse aggregator list
- marketplace.json: remove Kotlin from description
…files

- Strip code fence decorators (icon=, theme=, highlight=, expandable)
  so language hints are bare identifiers agents can parse
- Remove JSX/MDX tags (<Tip>, <Note>, </Tip>, </Note>) while
  preserving their content
- Convert absolute /doc/ paths to plain text (broken outside algolia.com)
- Add trailing newlines to all 9 reference files
@MarioAlexandruDan MarioAlexandruDan marked this pull request as ready for review June 2, 2026 07:59
@MarioAlexandruDan MarioAlexandruDan marked this pull request as draft June 2, 2026 07:59
- Strip doc-site rendering artifacts (code fence decorators, JSX components, /doc/ links)
- Use direct enum access (OperationType.Copy, ScopeType.Rules, SynonymType.Synonym) instead of verbose .entries.first
- Mark scopes optional with default in replaceAllObjects
- Fix SettingsResponse → IndexSettings conversion in copyIndexBetweenApplications
- Add saveObjectsWithTransformation, replaceAllObjectsWithTransformation, partialUpdateObjectsWithTransformation sections
- Bring Kotlin into scope in SKILL.md, marketplace.json, and README
Fills the empty slot in the eval IDs (1–7, 9–11) and brings Kotlin to parity
with the other 9 supported languages. Exercises imports, type-wrapper removal,
DSL removal, initIndex removal, and the saveObjects+waitForTasks pattern.
…ides

- waitForTask maxRetries default corrected to 100 in all languages
- transformation helper sections aligned to the transformationOptions API:
  JS transformationOptions prop (transformation deprecated), Java/C#
  withTransformation + deprecation notes, Go TransformationOptions
  (not IngestionTransporter), Python transformation_options, PHP
  client-configuration wording
- add missing WithTransformation sections for Swift and Ruby, restore
  Kotlin sections with the withTransformation setup
- consistent 'In version X and later:' phrasing across references
…ation

# Conflicts:
#	.claude-plugin/marketplace.json
#	README.md
…ade guides

Mechanical copy of doc/libraries/sdk/upgrade/*.mdx from docs-new main
(includes algolia/docs-new#904) with doc-site formatting stripped:
frontmatter converted to plain title/description, code-fence decorators
removed, Note/Tip components flattened to indented text, internal /doc/
links flattened to plain text. Anchor and external links are kept.

@Fluf22 Fluf22 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks
Let's put it reviewable so the algolia/skills team can give its opinion

@MarioAlexandruDan MarioAlexandruDan marked this pull request as ready for review July 6, 2026 18:29
@MarioAlexandruDan MarioAlexandruDan enabled auto-merge (squash) July 7, 2026 06:11
@MarioAlexandruDan MarioAlexandruDan requested a review from Copilot July 9, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new algolia-migration skill to guide agents through major-version upgrades of Algolia API clients across multiple backend languages, with per-language reference guides, eval prompts, and marketplace registration.

Changes:

  • Introduces skills/algolia-migration skill definition plus “universal breaking changes” guidance.
  • Adds language-specific migration reference docs (JS, Python, Go, PHP, Java, C#, Ruby, Kotlin, Scala, Swift).
  • Registers the skill in the marketplace and lists it in the repo README; adds eval scenarios.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
skills/algolia-migration/SKILL.md Skill frontmatter + universal migration guidance and workflow.
skills/algolia-migration/references/javascript.md JS v4 → v5 migration reference.
skills/algolia-migration/references/python.md Python v3 → v4 migration reference.
skills/algolia-migration/references/go.md Go v3 → v4 migration reference.
skills/algolia-migration/references/php.md PHP v3 → v4 migration reference.
skills/algolia-migration/references/java.md Java v3 → v4 migration reference.
skills/algolia-migration/references/csharp.md C# v6 → v7 migration reference.
skills/algolia-migration/references/ruby.md Ruby v2 → v3 migration reference.
skills/algolia-migration/references/kotlin.md Kotlin v2 → v3 migration reference.
skills/algolia-migration/references/scala.md Scala v1 → v2 migration reference.
skills/algolia-migration/references/swift.md Swift v8 → v9 migration reference.
skills/algolia-migration/evals/evals.json Adds eval prompts/expectations for common upgrade scenarios.
README.md Adds algolia-migration to the skills list and install examples.
.claude-plugin/marketplace.json Registers the new skill in the marketplace manifest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/algolia-migration/SKILL.md Outdated
Comment thread skills/algolia-migration/SKILL.md
Comment thread skills/algolia-migration/references/python.md
Comment thread skills/algolia-migration/references/php.md
Comment thread skills/algolia-migration/references/php.md
Comment thread skills/algolia-migration/evals/evals.json Outdated
Comment thread skills/algolia-migration/evals/evals.json Outdated
- python.md: fix invalid v3 save_objects example (positional arg after keyword arg)
- SKILL.md: make waitForTask pseudo-signature language-agnostic, point to per-language references
- evals.json: align JS expected_output with waitForTasks: true expectation
- evals.json: fix Go SaveObjects expectation to match reference (index name as first argument)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants