Skip to content

Commit 3e1e166

Browse files
Merge pull request #55 from mapbox/add-style-quality-skill-and-prompt
[skill+prompt] Add mapbox-style-quality skill and prepare-style-for-production prompt with automatic validation
2 parents c89f2ec + 195a2ba commit 3e1e166

File tree

10 files changed

+990
-9
lines changed

10 files changed

+990
-9
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ This repository includes [Agent Skills](https://agentskills.io) that provide dom
746746
- **🔐 mapbox-token-security**: Token management, scope control, URL restrictions, rotation strategies
747747
- **📐 mapbox-style-patterns**: Common style patterns and layer configurations for typical scenarios
748748
- **🔧 mapbox-integration-patterns**: Framework-specific integration patterns for React, Vue, Svelte, Angular, and vanilla JS
749+
- **✅ mapbox-style-quality**: Expert guidance on validating, optimizing, and ensuring quality of Mapbox styles through validation, accessibility checks, and optimization
749750

750751
Skills complement the MCP server by providing expertise (how to think about design) while tools provide capabilities (how to execute actions).
751752

@@ -956,6 +957,39 @@ Arguments:
956957
color_scheme: "sequential"
957958
```
958959

960+
### prepare-style-for-production
961+
962+
Comprehensive quality validation workflow for Mapbox styles before production deployment.
963+
964+
**Arguments:**
965+
966+
- `style_id_or_json` (required): Either a Mapbox style ID or complete style JSON
967+
- `skip_optimization` (optional): Set to "true" to skip style optimization (default: false)
968+
- `wcag_level` (optional): WCAG compliance level: "AA" or "AAA" (default: "AA")
969+
970+
**What it does:**
971+
972+
1. Loads the style (retrieves from Mapbox or parses JSON)
973+
2. Validates all expressions (filters, paint properties, layout properties)
974+
3. Validates GeoJSON sources for coordinate and structure errors
975+
4. Checks color contrast for text layers (WCAG compliance)
976+
5. Optimizes the style (removes redundancies, simplifies expressions)
977+
6. Generates a comprehensive quality report with deployment readiness assessment
978+
979+
**Example usage:**
980+
981+
```
982+
Use prompt: prepare-style-for-production
983+
Arguments:
984+
style_id_or_json: "username/my-style-id"
985+
wcag_level: "AA"
986+
skip_optimization: "false"
987+
```
988+
989+
**Related:**
990+
991+
See the [mapbox-style-quality skill](skills/mapbox-style-quality/SKILL.md) for detailed guidance on when to use validation tools, best practices, and optimization strategies.
992+
959993
## Resources
960994

961995
This server exposes static reference documentation as MCP Resources. While these are primarily accessed through the `get_reference_tool`, MCP clients that fully support the resources protocol can access them directly.

0 commit comments

Comments
 (0)