Install any skill in seconds. Free to start, no credit card required.
Get Started Free →terminalskills/leaflet
Build interactive maps with Leaflet.js.
Passed 19 of 22 test cases with the skill, and 14 of 22 without it.
and 3 more in the full report
5 fixed14 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are starting a standard open-source web mapping feature in a production React application. Which version of Leaflet should we install from npm today, and why should we avoid 2.0 alpha releases for standard React projects?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends installing stable version 1.9.4. | Passed | Passed |
| Explains that Leaflet 2.0 alpha drops global L and factory functions, breaking react-leaflet compatibility. | Missed | Passed |
The instructions your model reads when the skill loads.
Leaflet is a lightweight open-source JavaScript library for interactive maps: raster tile layers, markers, popups, vector shapes, GeoJSON and map events, with clustering and other features added by plugins. It has no API key of its own — the tiles come from a provider you choose, such as OpenStreetMap. In React it is used through react-leaflet, which wraps the same Leaflet objects in components.
The stable release is 1.9.4 (May 2023) and it is what npm install leaflet installs. Leaflet 2.0 is still an alpha (2.0.0-alpha.1, August 2025): it is ESM-only and drops the global L and the factory functions (L.marker(latlng) becomes new Marker(latlng)), while react-leaflet 5 and plugins written for the global L still require 1.9. Use 1.9.4 unless the user asks for 2.0.
npm install leaflet
npm install -D @types/leaflet # TypeScript types (Leaflet 1.9 ships none)
# React 19
npm install react-leaflet react-leaflet-cluster # react-leaflet 5, cluster 4
# React 18 (the unpinned command above fails there with ERESOLVE)
npm install react-leaflet@4 react-leaflet-cluster@3
Without a build step, load the pinned CDN files as in Example 1. The map container needs an explicit height and leaflet.css must be loaded: without the height the map is invisible, without the CSS the tiles are scattered over the page.
import L from "leaflet";
import "leaflet/dist/leaflet.css";
const map = L.map("map").setView([52.3738, 4.888], 13); // id of a <div> with a height
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
maxZoom: 19,
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);
L.marker([52.3738, 4.888]).addTo(map).bindPopup("<b>Amsterdam HQ</b><br>Herengracht 182");
L.circle([52.3738, 4.888], { radius: 1500, color: "#2563eb" }).addTo(map); // radius in metres
test cases passed, vs 14 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.