New advertisers: 50% off your first month with code FIRSTMONTHSee slots
mapbox avatar

Mapbox Token Security

Security guidance for Mapbox access tokens covering public and secret token types, scope limits, and URL restrictions.

skills.sh installs
2K
GitHub stars
87
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers token types (public pk.*, secret sk.*, temporary tk.*), with when to use each and which scopes each allows
  • Includes scope combinations by use case, URL restriction patterns, and per-environment token separation for production, staging, and development
  • Enforces storage rules that keep secret tokens out of source code and version control, and a token guard before map construction
  • Designed for teams building client-side map displays or server-side Mapbox integrations that need a token security checklist

Install

$ npx -y skills add mapbox/mapbox-agent-skills --skill mapbox-token-security -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Mapbox Token Security Skill

This skill provides security expertise for managing Mapbox access tokens safely and effectively.

Token Types and When to Use Them

Public Tokens (pk.*)

Characteristics:

  • Can be safely exposed in client-side code
  • Limited to specific public scopes only
  • Can have URL restrictions
  • Cannot access sensitive APIs

When to use:

  • Client-side web applications
  • Mobile apps
  • Public-facing demos
  • Embedded maps on websites

Allowed scopes:

  • styles:tiles - Display style tiles (raster)
  • styles:read - Read style specifications
  • fonts:read - Access Mapbox fonts
  • datasets:read - Read dataset data
  • vision:read - Vision API access

Secret Tokens (sk.*)

Characteristics:

  • NEVER expose in client-side code
  • Full API access with any scopes
  • Server-side use only
  • Can create/manage other tokens

When to use:

  • Server-side applications
  • Backend services
  • CI/CD pipelines
  • Administrative tasks
  • Token management

Common scopes:

Details

Repository
github.com/mapbox/mapbox-agent-skills
Categories
Security, Web3 & Crypto
First seen
May 16, 2026

More from mapbox/mapbox-agent-skills

All 18

Similar to Mapbox Token Security

More Security