-
Notifications
You must be signed in to change notification settings - Fork 6
[skills] Add Mapbox Agent Skills for domain expertise #47
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
base: main
Are you sure you want to change the base?
Conversation
Add three Agent Skills that provide domain expertise complementing the MCP server's tools and prompts: 1. mapbox-cartography: Map design principles, color theory, visual hierarchy, typography, and cartographic best practices. Teaches Claude how to make informed design decisions. 2. mapbox-token-security: Security best practices for token management including scope control, URL restrictions, rotation strategies, and incident response. 3. mapbox-style-patterns: Common style patterns and layer configurations for typical mapping scenarios (restaurant finders, real estate, data viz, navigation, dark mode). Skills work alongside MCP components: - MCP Tools: Execute actions (create_style_tool) - MCP Prompts: Orchestrate workflows (create-and-preview-style) - Agent Skills: Provide expertise (design principles, security) Skills are filesystem-based and discoverable by Claude Code, uploadable to Claude API, or usable in Claude.ai. Documentation includes: - Complete skills/README.md with usage instructions - Updated main README.md with skills section - Updated CLAUDE.md with architecture notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Resolved conflict by including both Agent Skills and Prompts sections - Agent Skills section appears first, followed by Prompts section - All prompts from main are now included in this branch
|
✅ Merge conflict resolved! The README conflict between Skills and Prompts has been resolved. This branch now includes:
The branch is now up to date with main and ready for review. |
Adds comprehensive framework integration patterns based on create-web-app: New Skill: mapbox-integration-patterns - React pattern (useRef + useEffect + cleanup) - Vue pattern (mounted + unmounted) - Svelte pattern (onMount + onDestroy) - Angular pattern (ngOnInit + ngOnDestroy + SSR handling) - Vanilla JS patterns (with and without bundler) - Next.js patterns (App Router and Pages Router) Key Topics: - Framework-specific lifecycle management - Proper cleanup to prevent memory leaks - Token management across different bundlers - Mapbox Search JS integration - Common mistakes and how to avoid them - SSR handling for Angular and Next.js - Testing patterns for maps Based on official patterns from: https://github.com/mapbox/create-web-app This complements existing skills: - mapbox-cartography: Design principles - mapbox-token-security: Security best practices - mapbox-style-patterns: Common style configurations 🤖 Generated with Claude Code
|
✨ New skill added: mapbox-integration-patterns Based on the team's scaffolding tool, I've added a comprehensive 4th skill: 🔧 mapbox-integration-patternsWhat it covers:
Based on: https://github.com/mapbox/create-web-app Why this matters: This skill complements the existing three:
PR now has 4 comprehensive skills ready for review! 🚀 |
Adds comprehensive version guidance section: New "Version Requirements" Section: - Mapbox GL JS: v3.x recommended, v3.0.0 minimum - Framework minimum versions (React 16.8+, Vue 3.x, etc.) - Mapbox Search JS versions - Migration notes for v2.x → v3.x CDN Updates: - Use placeholder "v3.x.x" instead of hardcoded version - Add strong warning: "Prototyping only, not for production" - Explain why CDN is problematic (network dependency, no tree-shaking) - Recommend npm for production: npm install mapbox-gl@^3.0.0 Key Principles: - Use version ranges (^3.0.0) not specific patches (3.15.0) - Document breaking changes between major versions - Explain minimum framework versions for patterns (hooks, etc.) - Guide users toward npm/bundler for production This ensures the skill stays relevant as versions update while providing clear guidance on compatibility requirements. 🤖 Generated with Claude Code
|
|
||
| **Angular:** | ||
|
|
||
| - Minimum: 15+ (standalone components) |
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.
Our angular implementation (in create-web-app) & tutorial are based on Angular 19+
| ```bash | ||
| npm install @mapbox/search-js-react # React | ||
| npm install @mapbox/search-js-web # Vanilla/Vue/Svelte | ||
| npm install @mapbox/search-js-core # Core library |
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.
I'm not exactly sure what the context here is, but @mapbox/search-js-core dependency is included in the first 2 (web & reac) and is generally only needed if you want to build your own custom UI around the core search classes.
Not sure if it's beneficial to include this, based on the context, or if it will cause 'noise' in the skill definition.
Fixes based on PR #47 review feedback: 1. Update Angular minimum version - Changed from 15+ to 19+ - Reflects current create-web-app implementation and tutorial - #47 (comment) 2. Remove @mapbox/search-js-core from install instructions - Already included as dependency in search-js-react and search-js-web - Only needed for custom search UI implementations - Removing to reduce noise in skill definition - Added note explaining when -core is needed Changes: - Angular: 19+ minimum (was 15+) - Search JS: Removed redundant -core package from install commands - Added clarifying note about when -core is needed 🤖 Generated with Claude Code
|
✅ PR feedback addressed Fixed both issues from review: 1. Angular version updated
2. Removed @mapbox/search-js-core from install instructions
Changes pushed! 🚀 |
Aligns with create-web-app implementation which targets React 19: https://github.com/mapbox/create-web-app/blob/main/templates/react/package.json Changed from: - Minimum: 16.8+ (requires hooks) - Recommended: 18.x To: - Minimum: 19+ (current implementation in create-web-app) - Recommended: Latest 19.x This matches the Angular 19+ requirement and reflects actual versions used in Mapbox's official scaffolding tool.
Summary
Adds three comprehensive Agent Skills that provide domain expertise to AI assistants working with Mapbox. Skills complement MCP tools (which provide capabilities) and prompts (which provide workflows) by teaching AI assistants how to make informed decisions about map design, security, and patterns.
Key Distinction:
create_style_tool,list_tokens_tool)setup-mapbox-project,debug-mapbox-integration)New Skills
🎨 mapbox-cartography (~300 lines)
Expert guidance on map design principles:
🔐 mapbox-token-security (~490 lines)
Security best practices for token management:
📐 mapbox-style-patterns (~800 lines)
Common implementation patterns with full code examples:
Documentation
skills/README.mdwith:README.mdwith skills sectionCLAUDE.mdwith skills architectureFile Structure
Usage Example
With skills, when a user asks "Create a map for my restaurant finder app", Claude will:
Relationship to Other PRs
This PR is independent of the prompts PR (#46). They can be merged in any order:
Testing
No code changes - all skills are markdown files that are consumed by Claude Code/API/Claude.ai. Skills have been tested manually with Claude Code to verify:
🤖 Generated with Claude Code