Agent skill
maps
Use when building interactive map tools - Explains MapLibre setup, tiles, and common UI patterns.
Install this agent skill to your Project
npx add-skill https://github.com/dave1010/tools/tree/main/.agents/skills/maps
SKILL.md
MapLibre basics
- Include MapLibre's CSS before your styles and load the script from https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js.
- Keep the map container absolutely positioned to fill the viewport (see
#mapstyles intools/map-explorer/index.html). - Use the OpenFreeMap Liberty style (
https://tiles.openfreemap.org/styles/liberty) unless a different basemap is required. - Add navigation controls with
map.addControl(new maplibregl.NavigationControl(), 'top-right');. - Guard against missing globals: if
typeof maplibregl === 'undefined', disable map-dependent UI and show an error.
Geolocation pattern
- Provide a dedicated button for
navigator.geolocation.getCurrentPosition. - Disable the button while locating, apply a loading state, and reset it in success/error callbacks.
- On success, create or update a
maplibregl.Markerandmap.easeTothe new center. - On errors, surface user-friendly messages for permission, availability, and timeout cases.
Overlay & interaction tips
- Keep status text in small, unobtrusive elements and update it via helper functions.
Accessibility & layout
- Generally prefer maps that take up the whole viewport, with UI controls and panels overlayed
- Footer links in an overlay too.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
cloudflare-kv
Use when persisting tool data in Cloudflare KV - Describes bindings, key naming, and function conventions.
writing-skills
Use when creating or updating SKILL.md documentation - Explains how and why to create a skill.
llm-inference
Use when wanting to interact with any LLM - Explains available inference endpoints so the agent selects suitable models.
github-integration
Use when building GitHub-based features - Explains auth token usage, Gist reading/writing and rendering helpers.
cdn-usage
Use when adding external browser dependencies via CDN - Provides CDN selection guidance to ensure reliable script loading.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?