mapbox-style-quality▌
mapbox/mapbox-agent-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
This skill provides expert guidance on ensuring Mapbox style quality through validation, accessibility, and optimization tools.
Mapbox Style Quality Skill
This skill provides expert guidance on ensuring Mapbox style quality through validation, accessibility, and optimization tools.
When to Use Quality Tools
Pre-Production Checklist
Before deploying any Mapbox style to production:
- Validate all expressions - Catch syntax errors before runtime
- Check color contrast - Ensure text is readable (WCAG compliance)
- Validate GeoJSON sources - Ensure data integrity
- Optimize style - Reduce file size and improve performance
- Compare versions - Understand what changed
- Remove empty layers - Delete layers with no visible paint properties as a final cleanup step
- Simplify redundant boolean expressions - Clean up filters with unnecessary boolean logic (e.g.,
["all", expr]→expr,["any", false, expr]→expr)
During Development
When adding GeoJSON data:
- Always validate external GeoJSON with
validate_geojson_toolbefore using as a source
When writing expressions:
- Validate expressions with
validate_expression_toolas you write them - Catch type mismatches early (e.g., using string operator on number)
- Verify operator availability in your Mapbox GL JS version
- Test expressions with expected data types
When styling text/labels:
- Check foreground/background contrast with
check_color_contrast_tool - Aim for WCAG AA minimum (4.5:1 for normal text, 3:1 for large text)
- Use AAA standard (7:1 for normal text) for better accessibility
- Consider different background scenarios (map tiles, overlays)
Before Committing Changes
Compare style versions:
- Use
compare_styles_toolto generate a diff report - Review all layer changes, source modifications, and expression updates
- Understand the impact of your changes
- Document significant changes in commit messages
Before Deployment
Optimize the style:
- Run
optimize_style_toolto reduce file size - Remove unused sources that reference deleted layers
- Eliminate duplicate layers with identical properties
- Simplify redundant boolean expressions in filters (e.g., collapse
["all", expr]toexpr, remove tautological conditions) - Remove empty layers (layers with no visible paint properties) as a final cleanup step
Validation Best Practices
GeoJSON Validation
Always validate when:
- Loading GeoJSON from user uploads
- Fetching GeoJSON from external APIs
- Processing GeoJSON from third-party sources
- Converting between data formats
Common GeoJSON errors:
- Invalid coordinate ranges (longitude > 180 or < -180)
- Unclosed polygon rings (first and last coordinates must match)
- Wrong coordinate order (should be [longitude, latitude], not [latitude, longitude])
- Missing required properties (type, coordinates, geometry)
- Invalid geometry types or nesting
Example workflow:
1. Receive GeoJSON data
2. Validate with validate_geojson_tool
3. If valid: Add as source to style
4. If invalid: Fix errors, re-validate
Expression Validation
Validate expressions for:
- Filter conditions (
filterproperty on layers) - Data-driven styling (
paintandlayoutproperties) - Feature state expressions
- Dynamic property calculations
Common expression errors:
- Type mismatches (string operators on numbers)
- Invalid operator names or wrong syntax
- Wrong number of arguments for operators
- Nested expression errors
- Using unavailable operators for your GL JS version
Prevention strategies:
- Validate as you write expressions, not at runtime
- Test expressions with representative data
- Use type checking (expectedType parameter)
- Validate in context (layer, filter, paint, layout)
Accessibility Validation
WCAG Levels:
- AA (minimum): 4.5:1 for normal text, 3:1 for large text
- AAA (enhanced): 7:1 for normal text, 4.5:1 for large text
Text size categories:
- Normal: < 18pt or < 14pt bold
- Large: ≥ 18pt or ≥ 14pt bold
Common scenarios to check:
- Text labels on map tiles
- POI labels with background colors
- Custom markers with text
- UI overlays on maps
- Legend text and symbols
- Attribution text
Testing strategy:
- Test against both light and dark map tiles
- Consider overlay backgrounds (popups, modals)
- Test in different lighting conditions (mobile outdoor use)
- Verify contrast at different zoom levels
Quality Workflow Examples
Basic Quality Check
1. Validate expressions in style
2. Check color contrast for text layers
3. Optimize if needed
Full Pre-Production Workflow
1. Validate all GeoJSON sources
2. Validate all expressions (filters, paint, layout)
3. Check color contrast for all text layers
4. Compare with previous production version
5. Optimize style
6. Test optimized style
7. Deploy
Troubleshooting Workflow
1. Compare working vs. broken style
2. Identify differences
3. Validate suspicious expressions
4. Check GeoJSON data if source-related
5. Verify color contrast if visibility issue
Common Issues and Solutions
Runtime Expression Errors
Problem: Map throws expression errors at runtime
Solution: Validate expressions with validate_expression_tool during development
Prevention: Add expression validation to pre-commit hooks or CI/CD
Poor Text Readability
Problem: Text labels are hard to read on map
Solution: Check contrast with check_color_contrast_tool, adjust colors to meet WCAG AA
Prevention: Test text on both light and dark backgrounds, check at different zoom levels
Large Style File Size
Problem: Style takes long to load or transfer
Solution: Run optimize_style_tool to remove redundancies and simplify
Prevention: Regularly optimize during development, remove unused sources immediately
Invalid GeoJSON Source
Problem: GeoJSON source fails to load or render
Solution: Validate with validate_geojson_tool, fix coordinate issues, verify structure
Prevention: Validate all external GeoJSON before adding to style
Unexpected Style Changes
Problem: Style changed but unsure what modified
Solution: Use compare_styles_tool to generate diff report
Prevention: Compare before/after for all significant changes, document modifications
Tool Quick Reference
| Tool | Use When | Output |
|---|---|---|
validate_geojson_tool |
Adding GeoJSON sources | Valid/invalid + error list |
validate_expression_tool |
Writing expressions | Valid/invalid + error list |
check_color_contrast_tool |
Styling text labels | Passes/fails + WCAG levels |
compare_styles_tool |
Reviewing changes | Diff report with paths |
optimize_style_tool |
Before deployment | Optimized style + savings |
Reference Files
For detailed guidance on specific topics, load the relevant reference:
references/optimization.md— Optimization types, strategies, recommended order, and maintenance best practicesreferences/comparison.md— Style comparison workflows, ignoreMetadata usage, and refactoring workflowreferences/ci-integration.md— Git pre-commit hooks, CI/CD pipeline steps, and code review checklist
Load instruction: Read the reference file when the user needs in-depth guidance on that topic.
Additional Resources
How to use mapbox-style-quality on Cursor
AI-first code editor with Composer
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-style-quality
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches mapbox-style-quality from GitHub repository mapbox/mapbox-agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate mapbox-style-quality. Access the skill through slash commands (e.g., /mapbox-style-quality) 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
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.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 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▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★25 reviews- ★★★★★James Sanchez· Dec 8, 2024
mapbox-style-quality is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Yusuf Yang· Nov 27, 2024
Keeps context tight: mapbox-style-quality is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Rahul Santra· Nov 19, 2024
Useful defaults in mapbox-style-quality — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Fatima Johnson· Oct 18, 2024
We added mapbox-style-quality from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Pratham Ware· Oct 10, 2024
Registry listing for mapbox-style-quality matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Yash Thakker· Sep 25, 2024
Keeps context tight: mapbox-style-quality is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Fatima Garcia· Sep 25, 2024
mapbox-style-quality fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Nikhil Gupta· Sep 9, 2024
mapbox-style-quality is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Sofia Martin· Aug 28, 2024
mapbox-style-quality reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Dhruvi Jain· Aug 16, 2024
We added mapbox-style-quality from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 25