mapbox-style-quality

mapbox-style-quality is a skill for Claude Code, Codex from mapbox/mapbox-agent-skills. It costs 44 tokens per session (1,763 once invoked), scanned A, original, MIT.

A checklist and set of checks for Mapbox map styles, which control how maps look and display geographic data.

In plain words
What is it for?
Use it to validate GeoJSON data and style expressions, check text contrast, reduce style size, compare style versions, and clean up unused or overly complex map rules.
Why use it?
It helps catch invalid map expressions, bad geographic data, unreadable colours, unnecessary layers, and avoidable performance problems before release.

Skill for Claude CodeCodex

Part of the mapbox plugin — 20 skills, 3 MCP servers shipped together

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.

agentmods
npx agentmods add skills/mapbox/mapbox-agent-skills/mapbox-style-quality
Any agent
npx skills add mapbox/mapbox-agent-skills --skill mapbox-style-quality
Clone the repo
git clone --depth 1 https://github.com/mapbox/mapbox-agent-skills

Made for: Claude Code, Codex.

Or install mapbox, the plugin that ships this one along with the rest of its 20 skills, 3 MCP servers.

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 mapbox-style-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/mapbox/mapbox-agent-skills/mapbox-style-quality.svg)](https://agentmods.dev/skills/mapbox/mapbox-agent-skills/mapbox-style-quality)
Your own site
<a href="https://agentmods.dev/skills/mapbox/mapbox-agent-skills/mapbox-style-quality"><img src="https://agentmods.dev/badge/skills/mapbox/mapbox-agent-skills/mapbox-style-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00044 $0.01763
Opus 5 $0.00022 $0.00881
Sonnet 5 $0.00009 $0.00353
Haiku 4.5 $0.00004 $0.00176

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

Security

Grade A, and why

mapbox-style-quality 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 5d ago.

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/mapbox-style-quality/SKILL.md · 233 lines

How it starts

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

Mapbox Style Quality Skill

This skill provides expert guidance on ensuring Mapbox style quality through validation, accessibility, and optimization tools.

When to Use Quality Tools

Pre-Production Checklist

Before deploying any Mapbox style to production:

  1. Validate all expressions - Catch syntax errors before runtime
  2. Check color contrast - Ensure text is readable (WCAG compliance)
  3. Validate GeoJSON sources - Ensure data integrity
  4. Optimize style - Reduce file size and improve performance
  5. Compare versions - Understand what changed
  6. Remove empty layers - Delete layers with no visible paint properties as a final cleanup step
  7. Simplify redundant boolean expressions - Clean up filters with unnecessary boolean logic (e.g., ["all", expr]expr, ["any", false, expr]expr)

During Development

When adding GeoJSON data:

  • Always validate external GeoJSON with validate_geojson_tool before using as a source

When writing expressions:

  • Validate expressions with validate_expression_tool as you write them
  • Catch type mismatches early (e.g., using string operator on number)
  • Verify operator availability in your Mapbox GL JS version
  • Test expressions with expected data types

When styling text/labels:

  • Check foreground/background contrast with check_color_contrast_tool
  • Aim for WCAG AA minimum (4.5:1 for normal text, 3:1 for large text)
  • Use AAA standard (7:1 for normal text) for better accessibility
  • Consider different background scenarios (map tiles, overlays)

Before Committing Changes

Compare style versions:

  • Use compare_styles_tool to generate a diff report
  • Review all layer changes, source modifications, and expression updates
  • Understand the impact of your changes
  • Document significant changes in commit messages

Before Deployment

Optimize the style:

  • Run optimize_style_tool to reduce file size
  • Remove unused sources that reference deleted layers
  • Eliminate duplicate layers with identical properties
  • Simplify redundant boolean expressions in filters (e.g., collapse ["all", expr] to expr, remove tautological conditions)
  • Remove empty layers (layers with no visible paint properties) as a final cleanup step

Read the full file on GitHub · 233 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 233 lines · 44 tokens per session scan A d72c58e34e6e

Subscribe to this mod's changes

mapbox-style-quality is a skill published in the GitHub repository mapbox/mapbox-agent-skills (74 stars, last pushed 10d ago), licensed MIT. It adds 44 tokens to every session and 1,763 once invoked, about $0.0002 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-30.