mapbox-token-security
Skill by mapbox
Mapbox Token Security is a skill that gives security guidance for Mapbox access tokens. It is for developers and teams who create, manage or review Mapbox tokens.
Install mapbox-token-security
Built from the published package, never by AI.
git clone --depth 1 https://github.com/mapbox/mapbox-agent-skills /tmp/mapbox-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/mapbox-agent-skills/skills/mapbox-token-security ~/.claude/skills/mapbox-token-securityRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/mapbox/mapbox-agent-skills /tmp/mapbox-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/mapbox-agent-skills/skills/mapbox-token-security ~/.gemini/antigravity-cli/skills/mapbox-token-securityAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install mapbox-token-security in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant guidance on managing Mapbox access tokens safely. It covers the three token types (public pk.*, secret sk.*, and temporary tk.*), when to use each, and which scopes to grant. It also explains URL restrictions for public tokens, separate tokens per environment, and how to store secret tokens outside source control.
The skill includes a client-side example for Vite that checks for a missing or placeholder token before creating a map. Reference files cover bundler-specific setup, rotation and monitoring, and incident response. It is written for developers, teams and anyone advising on Mapbox token security.
Written from the project's SKILL.md and checked against it.
What it can do
- Token type guidanceExplains when to use public, secret and temporary Mapbox tokens.
- Scope managementShows least-privilege scope combinations for client, server and admin use cases.
- URL restriction patternsLists recommended and unsafe URL patterns for restricting public tokens.
- Token storage rulesGives do and don't rules for storing secret and public tokens.
- Safe client setupProvides a Vite example that validates the token before creating a map.
- Security checklistCovers token creation, management, monitoring and incident response steps.
What you need
- Mapbox access tokens
Try asking
- Which scopes does my public token need for a map on my website?
- Review this code for Mapbox token exposure and suggest fixes.
- Create a token rotation plan for our Mapbox secret tokens.
Good to know
- Provides guidance only and does not create or manage tokens itself.
- Temporary tokens expire after a maximum of 1 hour.
- Framework-specific setup for Next.js, CRA, Angular and CDN is in separate reference files.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/mapbox-token-security/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to mapbox-token-security
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
mapbox-token-security: common questions
What is the difference between public and secret Mapbox tokens?
Public tokens (pk.*) can be used in client-side code and are limited to public scopes. Secret tokens (sk.*) must never be exposed in client-side code and are for server-side use.
How long do Mapbox temporary tokens last?
The skill says temporary tokens (tk.*) are short-lived, with a maximum of 1 hour, and expire automatically.
Should I restrict my Mapbox public token to specific URLs?
Yes. The skill recommends adding URL restrictions to public tokens, such as your production domain, and warns against unrestricted or overly broad patterns like *.
How do I install mapbox-token-security?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is mapbox-token-security free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is mapbox-token-security safe to use?
It scores 75 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to mapbox-token-security?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
