Skip to content
Back to skills

Mapbox

ASecurity

Mapbox provides APIs for maps, geocoding, and routing. This skill focuses on the Mapbox Search (Geocoding) and Navigation APIs for backend services.

  • 13 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 5, 2026
ai-agentsbashreactvueapifrontendbackendsecurity

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add ashish7802/awesome-api-skills --skill mapbox --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mapbox?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mapbox
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-mapbox/badge)](https://www.skillsdirectory.com/skills/ashish7802-mapbox)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Mapbox API Skill

## Overview
Mapbox provides APIs for maps, geocoding, and routing. This skill focuses on the Mapbox Search (Geocoding) and Navigation APIs for backend services.

## Installation
```bash
npm install @mapbox/mapbox-sdk
pip install mapbox
```

## Authentication
Authenticate using Access Tokens. Default public tokens (`pk.*`) are for frontends. Secret tokens (`sk.*`) are for backends.

## Core Concepts
- **Geocoding**: Converting text (addresses) into geographic coordinates.
- **Isochrone**: Calculating areas reachable within a given time.
- **Matrix API**: Travel times between many points.

## Common Workflows
1. Instantiate the client with your Secret Token.
2. Call `geocodingService.forwardGeocode`.
3. Extract `features[0].center` for coordinates.

## Error Handling
Catch network errors and parse the `message` from Mapbox. Check HTTP 422 for unprocessable geometry.

## Security
Always use URL restrictions (Referrer matching) on Public Tokens. Keep Secret Tokens completely out of client-side code.

## Rate Limits
Geocoding is limited to 600 requests per minute on standard plans.

## Best Practices
Cache geocoding results permanently where legally allowed by the Terms of Service to dramatically reduce API costs and latency.

## Troubleshooting
If reverse geocoding returns inaccurate results, ensure you are passing the correct `types` filter (e.g., `address`, `poi`).

## References
- [API Reference](https://docs.mapbox.com/api/)

## Why use this skill
Use this when your agent works with **mapbox** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Referencing CLI flags or config keys that do not exist
- Using outdated major versions of tools
- Skipping lockfile or version pinning in examples

## Production checklist
- [ ] Secrets in environment variables, not source code
- [ ] Error handling and logging in place
- [ ] Rate limits and timeouts configured

## Related skills
- [`react`](../react/SKILL.md) — integrates with
- [`vue`](../vue/SKILL.md) — integrates with

---
> **Last Verified:** 2026-07-02

Files in this skill

  • SKILL.md2 KB
  • examples/example.py70 B
  • examples/example.ts131 B
  • prompts/geocode.md137 B
  • tests/skill.test.ts29 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.