Skip to content

Commit 7bd3dc1

Browse files
[skill+prompt] Add mapbox-style-quality skill and prepare-style-for-production prompt
Adds comprehensive style quality validation capabilities: Skill: - Created mapbox-style-quality skill document (390+ lines) - Pre-production checklist and validation best practices - Guidance on expression validation, GeoJSON validation, and accessibility - Optimization strategies and workflow recommendations - Integration patterns for Git hooks, CI/CD, and code review Prompt: - Created prepare-style-for-production prompt - Orchestrates validation workflow using 5 quality tools: * validate_expression_tool - Validate expressions in filters/paint/layout * validate_geojson_tool - Validate GeoJSON sources * check_color_contrast_tool - WCAG accessibility compliance * optimize_style_tool - Remove redundancies and optimize * compare_styles_tool - Compare versions (implicit in workflow) - Configurable WCAG level (AA/AAA) and optional optimization skip - Generates comprehensive quality report with deployment readiness assessment Testing: - 15 test cases for PrepareStyleForProductionPrompt - All 386 tests passing - Updated prompt registry tests Documentation: - Updated README with new skill listing - Added prompt documentation with usage examples - Cross-referenced skill and prompt Related PRs: - PR #50: validate_geojson_tool - PR #51: validate_expression_tool - PR #52: compare_styles_tool - PR #53: check_color_contrast_tool - PR #54: optimize_style_tool Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e279a15 commit 7bd3dc1

6 files changed

Lines changed: 906 additions & 3 deletions

File tree

README.md

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

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

@@ -673,6 +674,39 @@ Arguments:
673674
color_scheme: "sequential"
674675
```
675676

677+
### prepare-style-for-production
678+
679+
Comprehensive quality validation workflow for Mapbox styles before production deployment.
680+
681+
**Arguments:**
682+
683+
- `style_id_or_json` (required): Either a Mapbox style ID or complete style JSON
684+
- `skip_optimization` (optional): Set to "true" to skip style optimization (default: false)
685+
- `wcag_level` (optional): WCAG compliance level: "AA" or "AAA" (default: "AA")
686+
687+
**What it does:**
688+
689+
1. Loads the style (retrieves from Mapbox or parses JSON)
690+
2. Validates all expressions (filters, paint properties, layout properties)
691+
3. Validates GeoJSON sources for coordinate and structure errors
692+
4. Checks color contrast for text layers (WCAG compliance)
693+
5. Optimizes the style (removes redundancies, simplifies expressions)
694+
6. Generates a comprehensive quality report with deployment readiness assessment
695+
696+
**Example usage:**
697+
698+
```
699+
Use prompt: prepare-style-for-production
700+
Arguments:
701+
style_id_or_json: "username/my-style-id"
702+
wcag_level: "AA"
703+
skip_optimization: "false"
704+
```
705+
706+
**Related:**
707+
708+
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.
709+
676710
## Resources
677711

678712
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)