[prompts] Add MCP prompts for multi-step workflows#46
Merged
mattpodwysocki merged 2 commits intomainfrom Dec 19, 2025
Merged
Conversation
Implement three high-value prompts that orchestrate multiple tools: 1. create-and-preview-style: Create a map style with automatic token management. Checks for existing public tokens, creates one if needed, then creates the style and generates a preview link. 2. build-custom-map: Use conversational AI to build themed map styles (e.g., "dark cyberpunk", "nature-focused"). Leverages the Style Builder tool for AI-powered style generation. 3. analyze-geojson: Complete GeoJSON analysis workflow with validation, bounding box calculation, coordinate conversion, and visualization. Infrastructure: - BasePrompt abstract class for all prompts - promptRegistry for centralized prompt management - Integration with MCP server using Zod schemas - Full test coverage (37 new tests, all passing) Documentation updated in README.md and CLAUDE.md with usage examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds three essential workflow prompts to complement the existing three: New Prompts: - setup-mapbox-project: Complete project initialization with tokens, styles, and integration guidance. Handles web, mobile, backend, and fullstack projects with proper security (URL restrictions, secret token management). - debug-mapbox-integration: Systematic 6-phase troubleshooting workflow. Diagnoses token issues, style problems, and API errors. Provides specific solutions for 401, 403, and layer/source errors. - design-data-driven-style: Guide for creating styles with data-driven expressions. Supports color/size/heatmap visualizations with sequential, diverging, and categorical color schemes. Includes advanced expressions and best practices. Test Coverage: - 3 new prompt implementation files - 3 new comprehensive test files (44 tests total) - Updated promptRegistry test (now validates 6 prompts) - All 370 tests passing ✅ Documentation: - Updated README with detailed prompt descriptions, arguments, and examples - Each prompt includes workflow steps and example usage 🤖 Generated with Claude Code
zmofei
approved these changes
Dec 19, 2025
Member
zmofei
left a comment
There was a problem hiding this comment.
Nice prompt implementation, good for multi-step workflows.
- [NIT]
BasePrompt.ts:24mentions "snake_case", but the prompts usekebab-case. Not blocking.
| */ | ||
| export abstract class BasePrompt { | ||
| /** | ||
| * Unique identifier for the prompt (snake_case) |
Member
There was a problem hiding this comment.
[Nit] Here we mentioned snake_case but actually the prompt uses kebab-case , e..g create-and-preview-style
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
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
Implements three high-value MCP prompts that orchestrate multiple tools to guide AI assistants through complex multi-step workflows with built-in best practices.
Addresses the need for automatic token management when creating and previewing styles (as discussed in #45).
New Prompts
1. create-and-preview-style
Create a map style with automatic token management:
styles:readscope2. build-custom-map
Use conversational AI to build themed map styles:
3. analyze-geojson
Complete GeoJSON analysis workflow:
Infrastructure
Changes
src/prompts/directory with prompt implementationstest/prompts/directory with comprehensive test coveragesrc/index.tsto register prompts with MCP serverREADME.mdwith prompts documentation and examplesCLAUDE.mdwith prompt architecture patternsTesting
All 323 tests pass including 37 new prompt tests.
Documentation
Complete documentation added to README.md with:
🤖 Generated with Claude Code