-
Notifications
You must be signed in to change notification settings - Fork 7
[skill+prompt] Add mapbox-style-quality skill and prepare-style-for-production prompt with automatic validation #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…roduction 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>
Updates all style-creation prompts to explicitly ask users if they want to validate their styles for production readiness: Updated prompts: - create-and-preview-style: Adds validation step 6 - build-custom-map: Adds validation step 6 - design-data-driven-style: Adds validation step 8 - setup-mapbox-project: Adds optional validation section Changes: - Prompts now explicitly ASK users: "Would you like to validate this style for production readiness?" - Provides clear IF/ELSE logic for AI to follow based on user response - If yes: Use prepare-style-for-production prompt with style ID - If no: Note validation can be done later - Makes validation actionable rather than just a suggestion Benefits: - Catches style issues early in development workflow - Ensures production styles meet quality and accessibility standards - Validates complex expressions in data-driven styles - Provides immediate feedback on WCAG compliance Related: prepare-style-for-production prompt in previous commit Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes all style-creation prompts to automatically validate instead of asking the user. Validation is fast (offline only), catches issues early, and provides immediate feedback without friction. Rationale: - All validation tools are offline (no API calls, no cost) - Fast execution (milliseconds) - Follows development tool patterns (ESLint, TypeScript, tests) - Results are informational - users can ignore warnings for prototypes - Better to show issues immediately than discover them later Updated prompts: - create-and-preview-style: Step 5 now validates automatically - build-custom-map: Step 5 now validates automatically - design-data-driven-style: Step 8 now validates automatically - setup-mapbox-project: Validates before presenting final summary Changes: - Removed user question "Would you like to validate?" - Added automatic validation step after style creation - Validation results included in final summary - Note added that warnings can be ignored for prototypes Benefits: - Catches expression errors before runtime - Ensures WCAG accessibility compliance by default - Identifies optimization opportunities immediately - Especially valuable for AI-generated styles (build-custom-map) - Data-driven styles get complex expression validation Example flow: 1. Create style ✓ 2. Generate preview ✓ 3. Automatically validate ✓ (new - runs without asking) 4. Present: Preview URL + Validation report Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9 tasks
39a8e17 to
ea796dd
Compare
Valiunia
reviewed
Jan 12, 2026
skills/mapbox-style-quality/SKILL.md
Outdated
Comment on lines
26
to
29
| - Always validate external GeoJSON with `validate_geojson_tool` before using as a source | ||
| - Check coordinate validity (longitude: -180 to 180, latitude: -90 to 90) | ||
| - Verify polygon ring closure | ||
| - Validate feature properties structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These instructions seem redundant if using validate_geojson_tool
Valiunia
previously approved these changes
Jan 12, 2026
Valiunia
approved these changes
Jan 12, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive style quality validation capabilities through a new skill and prompt, with automatic validation integrated into all style-creation workflows.
New Skill: mapbox-style-quality
Created comprehensive skill document (390+ lines) teaching AI assistants when and how to use quality validation tools:
New Prompt: prepare-style-for-production
Created production-ready workflow prompt that orchestrates 5 validation tools:
Features:
Arguments:
style_id_or_json(required): Style ID or complete style JSONskip_optimization(optional): Set to "true" to skip optimizationwcag_level(optional): "AA" or "AAA" (default: "AA")Automatic Validation Integration
Updated all 4 style-creation prompts to automatically validate after creating styles:
Updated Prompts:
Validation Flow:
Results Shown to Users:
Why Automatic Validation?
Following development tool patterns (ESLint, TypeScript, test runners):
Testing
Documentation
Related Work
This work depends on and integrates with:
Example Usage
Using the Prompt Directly:
Automatic Validation in Workflows:
When a user runs
create-and-preview-style, the AI will now:Benefits
🤖 Generated with Claude Code