This is the documentation of version 1.0.0-rc.2. Go to the latest version, 1.0.0-rc.5.

AI coding with the SDK

The SDK ships a skill, tomtom-maps-sdk-js, for AI coding agents such as Claude Code, Cursor, GitHub Copilot, Windsurf and many more. It loads the SDK's patterns, coordinate conventions, service APIs and pitfalls into the agent's context, so the agent writes code against the real API instead of guessing it.

What the skill covers

A skill is a set of curated reference documents the agent reads when a task needs them, rather than searching the web. This one has a document per area:

Area What the agent learns
Map setup TomTomMap, the two kinds of modules, the base map, terrain, geopolitical views
Styles and styling setStyle and style switching, styling knobs, map colours, presets, theming from a website or an image
Events User events on each module, and module lifecycle events such as config-change
Places and search discoverPlaces, geocoding, reverse geocoding, getSearchSuggestions, POI categories, EV charging stations, PlacesModule
Routing calculateRoute, waypoints, alternatives, guidance, reachable ranges, RoutingModule
Traffic Flow, incidents, incident details, area analytics
Core types and utilities Place, Route, section types, bboxFromGeoJSON, getPosition, formatDistance, formatDuration, route progress
Services config API key, language, request validation, cancellation with AbortSignal and createLatestRequest, error classes
MapLibre and custom data When to use an SDK feature or raw MapLibre, layer placement, CustomGeoJSONModule
Plugins Map effects, fly-over, landmarks 3D, Map Theme, and the Agent Toolkit

Installing the skill

Run this once in your project root:

npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js tomtom-maps-sdk-js-feedback

Invoking the skill

The agent loads the skill itself when a task mentions the SDK. To load it explicitly, name it with one or more topics:

/tomtom-maps-sdk-js map-setup
/tomtom-maps-sdk-js places routing

What to expect

With the skill loaded, the agent:

Tips for best results

Reporting SDK problems

The tomtom-maps-sdk-js-feedback skill lets the agent report what the SDK got wrong while it built for you, so the SDK team can fix it. For example, a guide left out a step, an API couldn't do what you asked or a call failed when used as documented.

To send a report yourself, tell the agent "report this".

Related guides