skills/mapcn/SKILL.md
Technical guide to integrate mapcn in React + shadcn projects. Use when the user asks to integrate mapcn, add mapcn to a shadcn app, use mapcn MapControls/Markers/Routes/Clusters, implement controlled viewport state, use the useMap hook, or access MapLibre through mapcn.
npx skillsauth add ferminrp/agent-skills mapcnInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user needs to install, integrate, customize, or troubleshoot mapcn in a React + shadcn/ui codebase.
Typical triggers:
integrate mapcnadd mapcn to shadcn projectmapcn MapControls/Markers/Routes/Clusterscontrolled map viewport with mapcnuseMap hook mapcnMapLibre with mapcn componentsmapcn provides copy-paste style map components built on top of MapLibre GL JS and aligned with shadcn/ui workflows.
Assumptions:
Default behavior:
Canonical install command:
npx shadcn@latest add @mapcn/map
Expected integration result:
components/ui).import { Map } from "@/components/ui/map";
Use a fixed-height container and render Map with MapControls.
import { Map, MapControls } from "@/components/ui/map";
export function BasicMap() {
return (
<div className="h-[500px] w-full overflow-hidden rounded-xl border">
<Map
initialViewState={{
longitude: -58.3816,
latitude: -34.6037,
zoom: 11,
}}
>
<MapControls
showZoom
showCompass
showLocate
showFullscreen
position="top-right"
/>
</Map>
</div>
);
}
Important:
Use uncontrolled mode for simple cases, and controlled mode when state synchronization is needed.
const [viewport, setViewport] = useState({
longitude: -58.3816,
latitude: -34.6037,
zoom: 11,
});
<Map viewport={viewport} onViewportChange={setViewport} />
MapControls supports common toggles and placement:
showZoomshowCompassshowLocateshowFullscreenpositionUse marker composition for richer UI:
MapMarkerMarkerContentMarkerPopupMarkerTooltipMarkerLabelUse MapPopup for popup UI not strictly attached to a marker component.
Use MapRoute to draw path-based overlays and route-like lines.
Use MapClusterLayer with GeoJSON input for dense point datasets.
MapRefUse MapRef for imperative map actions such as flyTo, custom camera transitions, and direct map instance operations.
useMapUse useMap to access map context safely and wire event listeners with lifecycle-aware cleanup.
Use styles prop (or the corresponding map style config option) with MapLibre-compatible style URLs/specs when default tiles are not enough.
MapClusterLayer).Check:
Local references:
references/docs-pages.mdreferences/api-cheatsheet.mdCanonical docs:
https://www.mapcn.dev/docshttps://www.mapcn.dev/docs/installationhttps://www.mapcn.dev/docs/api-referencehttps://www.mapcn.dev/docs/basic-maphttps://www.mapcn.dev/docs/controlshttps://www.mapcn.dev/docs/markershttps://www.mapcn.dev/docs/popupshttps://www.mapcn.dev/docs/routeshttps://www.mapcn.dev/docs/clustershttps://www.mapcn.dev/docs/advanced-usagedevelopment
Audit and improve user-provided writing for clarity, concision, and impact. Use when the user asks to audit, review, improve, edit, or rewrite text. Apply seven checks (sentence length, clutter, unsupported modifiers, weasel words, jargon/acronyms, "so what", and flow), then return severity-ranked findings and a full rewrite suggestion.
development
Consulta promociones de viajes desde Argentina usando Anduin Promos API. Usar cuando el usuario pida promos de viaje en Argentina, promociones de vuelos, hoteles o paquetes, mejores ofertas del dia, promos a brasil/usa/europa, ranking por score o ultimas promos de promociones-aereas.
development
Consulta riesgo pais de Argentina con serie historica desde Anduin API. Usar cuando el usuario pida "riesgo pais argentina", "ultimo riesgo pais", "serie historica de riesgo pais", "riesgo pais por fecha o periodo", o "evolucion del riesgo pais".
development
Consulta IPC de Argentina con la serie de inflacion mensual desde Anduin API. Usar cuando el usuario pida "inflacion argentina", "ipc argentina", "inflacion mensual", "ultimo dato de inflacion", "serie historica de inflacion", "inflacion por fecha", "inflacion por periodo" o "variacion mensual ipc".