preview-leaflet

preview-leaflet is a skill for Claude Code from veelenga/preview-skills. It costs 19 tokens per session (2,790 once invoked), scanned A, original, MIT.

A browser preview tool for interactive maps built with Leaflet, a JavaScript library for displaying geographic data. It can show locations, routes, and custom map overlays.

In plain words
What is it for?
Use it to prototype maps with markers, routes, geographic data, and custom overlays, then open the result in a browser or generate it without opening one.
Why use it?
It lets you see map code as an interactive map without manually assembling the surrounding webpage. Temporary map content can be piped directly to the preview command.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to prototype maps with markers, routes, geographic data, and custom overlays, then open the result in a browser or generate it without opening one.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/veelenga/preview-skills/preview-leaflet
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add veelenga/preview-skills --skill preview-leaflet
Clone the repo
git clone --depth 1 https://github.com/veelenga/preview-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview-leaflet

README.md
[![agentmods](https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-leaflet/github.svg)](https://agentmods.dev/skills/veelenga/preview-skills/preview-leaflet)
Your own site
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-leaflet"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-leaflet/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for preview-leaflet

Your own site · 80×15
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-leaflet"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-leaflet.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,790 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.02790
Opus 5 $0.00010 $0.01395
Sonnet 5 $0.00004 $0.00558
Haiku 4.5 $0.00002 $0.00279

Measured 8d ago against content hash f8e391fc7307, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

preview-leaflet scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (config.sh, lib/browser-utils.sh, lib/content-utils.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/preview-leaflet/SKILL.md · 423 lines

How it starts

The opening of the file, as written. The whole thing — 423 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preview Leaflet Skill

Interactive map visualization viewer using Leaflet library for geographic data, markers, routes, and custom overlays.

Agent Usage

When the user asks to create a map visualization, write the Leaflet code and pipe it to the script. Use the Bash tool to execute this skill's run.sh script:

# Pipe Leaflet code
cat route.js | ./run.sh

# Or from a file
./run.sh city-map.leaflet

The script handles all HTML generation and automatically opens the result in the browser. Do NOT open the file manually to avoid duplicate tabs.

Usage

# Preview a Leaflet map file
/preview-leaflet city-map.leaflet

# Or use .map extension
/preview-leaflet route.map

# Pipe Leaflet code (preferred for temporary content)
cat route.js | /preview-leaflet
echo "const map = L.map('map').setView([51.505, -0.09], 13);" | /preview-leaflet

Best Practice: For temporary or generated maps, prefer piping over creating temporary files. This avoids cluttering your filesystem and the content is automatically cleaned up.

Options

The script works with sensible defaults but supports these flags for flexibility:

  • -o, --output PATH - Custom output path
  • --no-browser - Skip browser, output file path only

Features

  • Interactive maps with pan and zoom
  • Markers and popups for locations
  • Routes and paths with polylines
  • Shapes and areas with polygons and circles
  • Multiple tile layers (OpenStreetMap, CartoDB, etc.)
  • Tooltips on hover
  • Fit bounds to show all points
  • Reset view button
  • Code viewer toggle
  • Responsive design adapts to window size

When to Use This Skill

Use this skill when the user wants to:

  • Visualize geographic data on maps
  • Plot locations with markers
  • Draw routes between points
  • Show service areas or regions
  • Create interactive location-based visualizations

Leaflet Code Requirements

Your code should:

  1. Initialize the map with L.map('map').setView([lat, lng], zoom)
  2. Add a tile layer (provides map imagery)
  3. Add markers, paths, or other features

Read the full file on GitHub · 423 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 423 lines · 19 tokens per session scan A f8e391fc7307

Subscribe to this mod's changes

preview-leaflet is a skill published in the GitHub repository veelenga/preview-skills (8 stars, last pushed 28d ago), licensed MIT. It adds 19 tokens to every session and 2,790 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

oneshot-website

Generate immersive, one-shot single-file HTML websites with embedded CSS and JS. No external images. Hostable on CodePen or Vercel. Use for writeup showcases, AI capability demos, and portfolio pieces.

cafe3310/public-agent-skills · 48 tokens

design-taste-frontend

Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.

firstsun-dev/skills · 61 tokens

impeccable

Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Not for backend-only or non-UI tasks.

cafe3310/public-agent-skills · 59 tokens

image-to-code

Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then implement the website to match them as closely as possible. In Codex, it must prefer large, readable, section-specific images instead of tiny compressed boards…

firstsun-dev/skills · 116 tokens

imagegen-frontend-web

Elite frontend image-direction skill for generating premium, conversion-aware website design references. CRITICAL OUTPUT RULE — generate ONE separate horizontal image FOR EVERY section. A landing page with 8 sections produces 8 images. Never compress multiple sections into one image. Enforces composition variety (not…

firstsun-dev/skills · 126 tokens

design-taste-frontend-v1

The original v1 taste-skill, preserved for projects depending on its exact behavior. The current default is design-taste-frontend (v2 experimental), which is a substantial rewrite. Use this v1 install name only if you need exact backward compatibility.

firstsun-dev/skills · 61 tokens