← 返回 Skills 市场
🔌

Mapbox Style Patterns

作者 Mapbox · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
108
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install mapbox-style-patterns
功能描述
Common style patterns, layer configurations, and recipes for typical mapping scenarios including restaurant finders, real estate, data visualization, navigat...
使用说明 (SKILL.md)

Mapbox Style Patterns Skill

This skill provides battle-tested style patterns and layer configurations for common mapping scenarios.

Pattern Library

Pattern 1: Restaurant/POI Finder

Use case: Consumer app showing restaurants, cafes, bars, or other points of interest

Visual requirements:

  • POIs must be immediately visible
  • Street context for navigation
  • Neutral background (photos/content overlay)
  • Mobile-optimized

Recommended layers:

{
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": {
        "background-color": "#f5f5f5"
      }
    },
    {
      "id": "water",
      "type": "fill",
      "source": "mapbox-streets",
      "source-layer": "water",
      "paint": {
        "fill-color": "#d4e4f7",
        "fill-opacity": 0.6
      }
    },
    {
      "id": "landuse-parks",
      "type": "fill",
      "source": "mapbox-streets",
      "source-layer": "landuse",
      "filter": ["==", "class", "park"],
      "paint": {
        "fill-color": "#e8f5e8",
        "fill-opacity": 0.5
      }
    },
    {
      "id": "roads-minor",
      "type": "line",
      "source": "mapbox-streets",
      "source-layer": "road",
      "filter": ["in", "class", "street", "street_limited"],
      "paint": {
        "line-color": "#e0e0e0",
        "line-width": {
          "base": 1.5,
          "stops": [
            [12, 0.5],
            [15, 2],
            [18, 6]
          ]
        }
      }
    },
    {
      "id": "roads-major",
      "type": "line",
      "source": "mapbox-streets",
      "source-layer": "road",
      "filter": ["in", "class", "primary", "secondary", "tertiary"],
      "paint": {
        "line-color": "#ffffff",
        "line-width": {
          "base": 1.5,
          "stops": [
            [10, 1],
            [15, 4],
            [18, 12]
          ]
        }
      }
    },
    {
      "id": "restaurant-markers",
      "type": "symbol",
      "source": "restaurants",
      "layout": {
        "icon-image": "restaurant-15",
        "icon-size": 1.5,
        "icon-allow-overlap": false,
        "text-field": ["get", "name"],
        "text-offset": [0, 1.5],
        "text-size": 12,
        "text-allow-overlap": false
      },
      "paint": {
        "icon-color": "#FF6B35",
        "text-color": "#333333",
        "text-halo-color": "#ffffff",
        "text-halo-width": 2
      }
    }
  ]
}

Key features:

  • Desaturated base map (doesn't compete with photos)
  • High-contrast markers (#FF6B35 orange stands out)
  • Clear road network (white on light gray)
  • Parks visible but subtle
  • Text halos for readability

Pattern Selection Guide

Decision Tree

Question 1: What is the primary content?

  • User-generated markers/pins -> POI Finder Pattern
  • Property data/boundaries -> Real Estate Pattern
  • Statistical/analytical data -> Data Visualization Pattern
  • Routes/directions -> Navigation Pattern
  • Real-time tracking/delivery zones -> Delivery/Logistics Pattern (customer markers should include a pulse animation via second circle layer + requestAnimationFrame + setPaintProperty; see references/delivery-logistics.md)

Question 2: What is the viewing environment?

  • Daytime/office -> Light theme
  • Night/dark environment -> Dark Mode Pattern
  • Variable -> Provide theme toggle

Question 3: What is the user's primary action?

  • Browse/explore -> Focus on POIs, rich detail
  • Navigate -> Focus on roads, route visibility
  • Track delivery/logistics -> Real-time updates, zones, status
  • Analyze data -> Minimize base map, maximize data
  • Select location -> Clear boundaries, context

Question 4: What is the platform?

  • Mobile -> Simplified, larger touch targets, less detail
  • Desktop -> Can include more detail and complexity
  • Both -> Design mobile-first, enhance for desktop

Layer Optimization Patterns

Performance Pattern: Simplified by Zoom

{
  "id": "roads",
  "type": "line",
  "source": "mapbox-streets",
  "source-layer": "road",
  "filter": [
    "step",
    ["zoom"],
    ["in", "class", "motorway", "trunk"],
    8,
    ["in", "class", "motorway", "trunk", "primary"],
    12,
    ["in", "class", "motorway", "trunk", "primary", "secondary"],
    14,
    true
  ],
  "paint": {
    "line-width": {
      "base": 1.5,
      "stops": [
        [4, 0.5],
        [10, 1],
        [15, 4],
        [18, 12]
      ]
    }
  }
}

Reference Files

Additional patterns and configurations are available in the references/ directory. Load the relevant file when a specific pattern is needed.

File Contents
references/real-estate.md Pattern 2: Real Estate Map -- property boundaries, price color-coding, amenity markers
references/data-viz-base.md Pattern 3: Data Visualization Base Map -- minimal grayscale base for choropleth/heatmap overlays
references/navigation.md Pattern 4: Navigation/Routing Map -- route display, user location, turn arrows
references/dark-mode.md Pattern 5: Dark Mode / Night Theme -- near-black background, reduced brightness
references/delivery-logistics.md Pattern 6: Delivery/Logistics Map -- real-time tracking, zones, driver markers, ETA badges
references/expressions-clustering.md Data-driven expression patterns + clustering for dense POIs
references/common-modifications.md 3D Buildings, Terrain/Hillshade, Custom Markers

Loading instructions: Read the reference file that matches the user's use case. For example, if implementing a delivery tracking map, load references/delivery-logistics.md.

Testing Patterns

Visual Regression Checklist

  • Test at zoom levels: 4, 8, 12, 16, 20
  • Verify on mobile (375px width)
  • Verify on desktop (1920px width)
  • Test with dense data
  • Test with sparse data
  • Check label collision
  • Verify color contrast (WCAG)
  • Test loading performance

When to Use This Skill

Invoke this skill when:

  • Starting a new map style for a specific use case
  • Looking for layer configuration examples
  • Implementing common mapping patterns
  • Optimizing existing styles
  • Need proven recipes for typical scenarios
  • Debugging style issues
  • Learning Mapbox style best practices
安全使用建议
This skill is a coherent library of Mapbox style patterns and appears safe to install: it requests no secrets and has no install step. Before using: (1) ensure you supply and manage your own Mapbox access token securely (the skill does not provide or request one); (2) when following examples that load images (map.loadImage), avoid loading assets from untrusted remote URLs — use your own hosted assets or vetted CDNs; (3) the pulsing animation examples use requestAnimationFrame and map.setPaintProperty in the client (browser) — they are CPU/animation operations for the app and not server-side code; (4) standard caution: review any code you copy into production for performance and input validation. Overall the skill is internally consistent with its stated purpose.
功能分析
Type: OpenClaw Skill Name: mapbox-style-patterns Version: 1.0.0 The mapbox-style-patterns skill bundle is a legitimate collection of Mapbox GL JS styling recipes and best practices for various mapping scenarios (e.g., real estate, logistics, navigation). The files, including SKILL.md, AGENTS.md, and the reference directory, contain standard JSON layer configurations and JavaScript API usage for data-driven styling and animations without any signs of malicious intent, data exfiltration, or prompt injection attacks.
能力评估
Purpose & Capability
The name/description (Mapbox style patterns) matches the contents: style JSON snippets, layer patterns, and implementation notes for POI, real-estate, data-viz, navigation, and delivery maps. No unrelated credentials, binaries, or platform access are requested.
Instruction Scope
SKILL.md and reference files instruct the agent/developer to run browser-side Mapbox GL JS patterns (map.addLayer, map.setPaintProperty, requestAnimationFrame). These instructions are narrowly scoped to styling and client-side animation. As a note: several examples assume a browser/Mapbox environment (e.g., map.loadImage('path/to/arrow-icon.png'), requestAnimationFrame loops) — they are not directives to read system files or fetch secrets, but when applied by a developer they will cause network fetches for images if given remote URLs.
Install Mechanism
Instruction-only skill with no install spec and no code execution or downloads declared. Nothing is written to disk by the skill itself; lowest-risk install mechanism.
Credentials
requires.env is empty and no primary credential or config paths are requested. The examples assume you will provide your own Mapbox token in your application — the skill does not request or handle credentials itself.
Persistence & Privilege
always is false and disable-model-invocation is default (agent may call the skill autonomously), which is normal. The skill does not request persistent or elevated system privileges or modify other skills' configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mapbox-style-patterns
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mapbox-style-patterns 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
mapbox-style-patterns 1.0.0 initial release - Provides a library of Mapbox style patterns and layer configurations for common mapping scenarios. - Includes a detailed POI finder pattern tailored for restaurant and points-of-interest maps. - Offers a decision tree and selection guide for choosing the right style pattern by use case and environment. - Lists reference files for real estate, data visualization, navigation, dark mode, delivery/logistics, clustering, and more. - Contains best practices for performance, visual regression testing, and layer optimization. - Designed for developers seeking proven map style recipes and implementation guidance.
元数据
Slug mapbox-style-patterns
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Mapbox Style Patterns 是什么?

Common style patterns, layer configurations, and recipes for typical mapping scenarios including restaurant finders, real estate, data visualization, navigat... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 Mapbox Style Patterns?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install mapbox-style-patterns」即可一键安装,无需额外配置。

Mapbox Style Patterns 是免费的吗?

是的,Mapbox Style Patterns 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Mapbox Style Patterns 支持哪些平台?

Mapbox Style Patterns 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Mapbox Style Patterns?

由 Mapbox(@mapbox)开发并维护,当前版本 v1.0.0。

💬 留言讨论