mapbox-search-patterns

mapbox/mapbox-agent-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-search-patterns
0 commentsdiscussion
summary

Expert guidance for AI assistants on using Mapbox search tools effectively. Covers tool selection, parameter optimization, and best practices for geocoding, POI search, and location discovery.

skill.md

Mapbox Search Patterns Skill

Expert guidance for AI assistants on using Mapbox search tools effectively. Covers tool selection, parameter optimization, and best practices for geocoding, POI search, and location discovery.

Available Search Tools

1. search_and_geocode_tool

Best for: Specific places, addresses, brands, named locations

Use when query contains:

  • Specific names: "Starbucks on 5th Avenue", "Empire State Building"
  • Brand names: "McDonald's", "Whole Foods"
  • Addresses: "123 Main Street, Seattle", "1 Times Square"
  • Chain stores: "Target"
  • Cities/places: "San Francisco", "Portland"

Don't use for: Generic categories ("coffee shops", "museums")

2. category_search_tool

Best for: Generic place types, categories, plural queries

Use when query contains:

  • Generic types: "coffee shops", "restaurants", "gas stations"
  • Plural forms: "museums", "hotels", "parks"
  • Is-a phrases: "any coffee shop", "all restaurants", "nearby pharmacies"
  • Industry terms: "electric vehicle chargers", "ATMs"

Don't use for: Specific names or brands

3. reverse_geocode_tool

Best for: Converting coordinates to addresses, cities, towns, postcodes

Use when:

  • Have GPS coordinates, need human-readable address
  • Need to identify what's at a specific location
  • Converting user location to address

Tool Selection Decision Matrix

User Query Tool Reasoning
"Find Starbucks on Main Street" search_and_geocode_tool Specific brand name
"Find coffee shops nearby" category_search_tool Generic category, plural
"What's at 37.7749, -122.4194?" reverse_geocode_tool Coordinates to address
"Empire State Building" search_and_geocode_tool Specific named POI
"hotels in downtown Seattle" category_search_tool Generic type + location
"Target store locations" search_and_geocode_tool Brand name (even plural)
"any restaurant near me" category_search_tool Generic + "any" phrase
"123 Main St, Boston, MA" search_and_geocode_tool Specific address
"electric vehicle chargers" category_search_tool Industry category
"McDonald's" search_and_geocode_tool Brand name

Parameter Guidance

Proximity vs Bbox vs Country

Three ways to spatially constrain search results:

1. proximity (STRONGLY RECOMMENDED)

What it does: Biases results toward a location, but doesn't exclude distant matches

Use when:

  • User says "near me", "nearby", "close to"
  • Have a reference point but want some flexibility
  • Want results sorted by relevance to a point

Example:

{
  "q": "pizza",
  "proximity": {
    "longitude": -122.4194,
    "latitude": 37.7749
  }
}

Why this works: API returns SF pizza places first, but might include famous NYC pizzerias if highly relevant

Critical: Always set proximity when you have a reference location! Without it, results are IP-based or global.

2. bbox (Bounding Box)

What it does: Hard constraint - ONLY returns results within the box

Use when:

  • User specifies an area: "in downtown", "within this neighborhood"
  • Have a defined service area
  • Need to guarantee results are within bounds

Example:

{
  "q": "hotel",
  "bbox": [-122.51, 37.7, -122.35, 37.83] // [minLon, minLat, maxLon, maxLat]
}

Why this works: Guarantees all hotels are within SF's downtown area

Watch out: Too small = no results; too large = irrelevant results

3. country

What it does: Limits results to specific countries

Use when:

  • User specifies country: "restaurants in France"
  • Building country-specific features
  • Need to respect regional boundaries
  • Or it is otherwise clear they want results within a specific country

Example:

{
  "q": "Paris",
  "country": ["FR"] // ISO 3166 alpha-2 codes
}

Why this works: Finds Paris, France (not Paris, Texas)

Can combine: proximity + country + bbox or any combination of the three

Decision Matrix: Spatial Filters

Scenario Use Why
"Find coffee near me" proximity Bias toward user location
"Coffee shops in downtown Seattle" proximity + bbox Center on downtown, limit to area
"Hotels in France" country Hard country boundary
"Best pizza in San Francisco" proximity + country ["US"] Bias to SF, limit to US
"Gas stations along this route" bbox around route Hard constraint to route corridor
"Restaurants within 5 miles" proximity (then filter by distance) Bias nearby, filter results

Setting limit Parameter

category_search_tool only (1-25, default 10)

Use Case Limit Reasoning
Quick suggestions 5 Fast, focused results
Standard list 10 Default, good balance
Comprehensive search 25 Maximum allowed
Map visualization 25 Show all nearby options
Dropdown/autocomplete 5 Don't overwhelm UI

Performance tip: Lower limits = faster responses

types Parameter (search_and_geocode_tool)

Filter by feature type:

Type What It Includes Use When
poi Points of interest (businesses, landmarks) Looking for POIs, not addresses
address Street addresses Need specific address
place Cities, neighborhoods, regions Looking for area/region
street Street names without numbers Need street, not specific address
postcode Postal codes Searching by ZIP/postal code
district Districts, neighborhoods Area-based search
locality Towns, villages Municipality search
country Country names Country-level search

Example combinations:

// Only POIs and addresses, no cities
{"q": "Paris", "types": ["poi", "address"]}
// Returns Paris Hotel, Paris Street, not Paris, France

// Only places (cities)
{"q": "Paris", "types": ["place"]}
// Returns Paris, France; Paris, Texas; etc.

Default behavior: All types included (usually what you want)

auto_complete Parameter (search_and_geocode_tool)

What it does: Enables partial/fuzzy matching

Setting Behavior Use When
true Matches partial words, typos User typing in real-time
false (default) Exact matching Final query, not autocomplete

Example:

// User types "starb"
{ "q": "starb", "auto_complete": true }
// Returns: Starbucks, Starboard Tavern, etc.

Use for:

  • Search-as-you-type interfaces
  • Handling typos ("mcdonalds" -> McDonald's)
  • Incomplete queries

Don't use for:

  • Final/submitted queries (less precise)
  • When you need exact matches

Anti-Patterns to Avoid

Don't: Use category_search for brands

// BAD
category_search_tool({ category: 'starbucks' });
// "starbucks" is not a category, returns error

// GOOD
search_and_geocode_tool({ q: 'Starbucks' });

Don't: Use search_and_geocode for generic categories

// BAD
search_and_geocode_tool({ q: 'coffee shops' });
// Less precise, may return unrelated results

// GOOD
category_search_tool({ category: 'coffee_shop' });

Don't: Forget proximity for local searches

// BAD - Results may be anywhere globally
category_search_tool({ category: 'restaurant' });

// GOOD - Biased to user location
category_search_tool({
  category: 'restaurant',
  proximity: { longitude: -122.4194, latitude: 37.7749 }
});

Don't: Use bbox when you mean proximity

// BAD - Hard boundary may exclude good nearby results
search_and_geocode_tool({
  q: 'pizza',
  bbox: [-122.42, 37.77, -122.41, 37.78] // Tiny box
});

// GOOD - Bias toward point, but flexible
search_and_geocode_tool({
  q: 'pizza',
  proximity: { longitude: -122.4194, latitude: 37.7749 }
});

Don't: Request ETA unnecessarily

// BAD - Costs API quota for routing calculations
search_and_geocode_tool({
  q: 'museums',
  eta_type: 'navigation',
  navigation_profile: 'driving'
});
// User didn't ask for travel time!

// GOOD - Only add ETA when needed
search_and_geocode_tool({ q: 'museums' });
// If user asks "how long to get there?", then add ETA

Don't: Set limit too high for UI display

// BAD - Overwhelming for simple dropdown
category_search_tool({
  category: 'restaurant',
  limit: 25
});
// Returns 25 restaurants for a 5-item dropdown

// GOOD - Match UI needs
category_search_tool({
  category
how to use mapbox-search-patterns

How to use mapbox-search-patterns on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add mapbox-search-patterns
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-search-patterns

The skills CLI fetches mapbox-search-patterns from GitHub repository mapbox/mapbox-agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/mapbox-search-patterns

Reload or restart Cursor to activate mapbox-search-patterns. Access the skill through slash commands (e.g., /mapbox-search-patterns) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.537 reviews
  • Shikha Mishra· Dec 24, 2024

    We added mapbox-search-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Noor Taylor· Dec 24, 2024

    mapbox-search-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Neel Chawla· Dec 20, 2024

    mapbox-search-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Isabella Okafor· Dec 12, 2024

    mapbox-search-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Yash Thakker· Nov 15, 2024

    mapbox-search-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Neel Malhotra· Nov 15, 2024

    We added mapbox-search-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Sakshi Patil· Nov 7, 2024

    mapbox-search-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Aarav Iyer· Nov 3, 2024

    Keeps context tight: mapbox-search-patterns is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Chaitanya Patil· Oct 26, 2024

    mapbox-search-patterns has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Diego Martinez· Oct 22, 2024

    We added mapbox-search-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 37

1 / 4