map-generator

SKILL开发
开发 未标注权限 许可证不明确

This skill generates interactive maps using the Leaflet JavaScript library. Use this skill when users need to create geographic visualizations, location-based data displays, or interactive maps for educational textbooks. The skill creates complete MicroSim packages with HTML, CSS, and documentation, optimized for iframe embedding in narrow MkDocs pages with navbar and TOC.

一句话选型结论

按资料字段整理

map-generator是开发类的 Agent Skill,安装方式:GitHub 仓库,权限级别未标注,许可证不明确,没有现成安装命令,需按说明手动放置 SKILL.md。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式GitHub 仓库 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 1 仓库 database-management
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    按安装说明或仓库 README,把 SKILL.md 放到客户端的 skills 目录(一般一个技能一个文件夹)。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方vishalsachdev仓库 database-management · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式GitHub 仓库安装包 vishalsachdev/database-management
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 未标注
正文体量9.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按说明装一个试试。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有现成安装命令,要按安装说明或仓库 README 手动放置。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
map-generator当前 未标注权限 GitHub 仓库 未标注 未标注 无
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

9.3 KB
模型实际读到的说明书原文,来自技能仓库

Map Generator Skill

This skill creates interactive Leaflet maps as MicroSims for intelligent textbooks built with MkDocs Material theme.

When to Use This Skill

Use this skill when users request:

  • Geographic visualizations (regions, countries, cities)
  • Location-based data displays (historical sites, landmarks)
  • Campus or facility maps
  • Travel route visualizations
  • Custom maps with markers, layers, or highlighted borders
  • Educational geography content

Workflow

Step 1: Gather Map Requirements

Ask the user for the following information:

  1. Map Purpose: What geographic data are we visualizing?
  2. Geographic Region: Region name, country, city, or coordinates
  3. Markers/Points: What locations need markers? (names, coordinates, descriptions)
  4. Map Layers: Do you need multiple layers (satellite, terrain, street map)?
  5. Borders/Regions: Do any borders or regions need to be highlighted?
  6. Zoom Level: Initial zoom level (1-18, where 1 is world view, 18 is building level)
  7. Interactive Features: Popups, custom markers, layer controls?
  8. Educational Context: Related concepts, Bloom's taxonomy level, target audience

Example user input: "Create a map showing major universities in California with markers for each campus"

Step 2: Create Directory Structure

Create the MicroSim directory:

docs/sims/[map-name]/

Naming convention: Use kebab-case (e.g., california-universities, ancient-rome-map, world-capitals)

Step 3: Create map-data.json (Optional)

If the map includes markers or GeoJSON data, create a map-data.json file:

{
  "center": {
    "lat": 37.7749,
    "lng": -122.4194
  },
  "zoom": 10,
  "title": "Map Title",
  "subtitle": "Map Subtitle",
  "markers": [
    {
      "lat": 37.7749,
      "lng": -122.4194,
      "title": "Location Name",
      "description": "Location description",
      "category": "category-name"
    }
  ]
}

For borders/regions: Use GeoJSON format for complex geometries.

Step 4: Create main.html

Create main.html using the template from assets/template-iframe-main.html:

Key elements:

  • Leaflet CDN links (CSS and JS)
  • Map container div with id="map"
  • Optional controls section for layer toggles
  • Script reference to script.js
  • Minimal padding/margins for iframe embedding

Replace placeholders:

  • {{TITLE}} - Map title
  • {{SUBTITLE}} - Map subtitle
  • {{MAP_HEIGHT}} - Map container height (default: 400px)

Step 5: Create style.css

Create style.css using the template from assets/template-iframe-style.css:

Critical requirements for iframe embedding:

  • body { margin: 0; padding: 0; } - No body margins
  • Minimal margins throughout (2px max for headings)
  • Fixed height for #map container
  • Responsive breakpoints for mobile
  • aliceblue background (repository standard)

Customization options:

  • Map height (adjust based on content needs)
  • Control button styling
  • Marker popup styling

Step 6: Create script.js

Create script.js using the template from assets/template-script.js:

Core functionality:

  1. Initialize Leaflet map with center coordinates and zoom level
  2. Add tile layer (OpenStreetMap default, or custom)
  3. Add markers with popups
  4. Optional: Add GeoJSON layers for borders/regions
  5. Optional: Add layer controls for toggling map types

Replace placeholders:

  • {{CENTER_LAT}}, {{CENTER_LNG}} - Map center coordinates
  • {{ZOOM}} - Initial zoom level
  • {{MARKERS}} - Marker data array
  • {{TILE_LAYER}} - Tile layer URL (OpenStreetMap, satellite, etc.)

Common tile layers:

  • OpenStreetMap: https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
  • Satellite: https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}
  • Terrain: https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png

Step 7: Create index.md

Create index.md using the template from assets/template-index.md:

Structure:

  • Title and overview
  • iframe embed (width="100%", height="700", frameborder="0")
  • Link to fullscreen view
  • Features section (interactive elements)
  • Customization guide (how to modify the map)
  • Technical details (library version, dependencies)
  • Use cases
  • References

iframe embed format:

<iframe src="main.html" width="100%" height="700" frameborder="0"></iframe>

[View Fullscreen](main.html){:target="_blank"}

Step 8: Create metadata.json

Create metadata.json using the template from assets/template-metadata.json:

Dublin Core fields:

  • title, description, subject, creator, date, type, format, language
  • coverage, rights, audience

Map-specific fields:

  • map_type: "interactive", "choropleth", "route", etc.
  • center_lat, center_lng: Center coordinates
  • zoom_level: Initial zoom level
  • marker_count: Number of markers
  • concepts: Array of related concepts
  • bloom_taxonomy: Cognitive level (Remember, Understand, Apply, etc.)

Step 9: Update mkdocs.yml Navigation

Add the new map to the navigation in mkdocs.yml:

nav:
  - MicroSims:
      - Introduction: sims/index.md
      - [Map Name]: sims/[map-name]/index.md

Naming: Use Title Case for navigation labels

Step 10: Test and Validate

Perform these validation steps:

  1. Direct HTML test: Open docs/sims/[map-name]/main.html in browser
    - Verify map loads correctly
    - Test zoom and pan controls
    - Click markers to verify popups
    - Test responsive behavior (resize window)

  2. MkDocs test: Run mkdocs serve and navigate to the map page
    - Verify iframe embedding works
    - Check margins/padding (should be minimal)
    - Test fullscreen link
    - Verify navigation link works

  3. Browser compatibility: Test in Chrome, Firefox, Safari

  4. Mobile test: Verify responsive behavior on mobile devices

Common Map Patterns

Simple Marker Map

Basic map with multiple markers:

const markers = [
  { lat: 40.7128, lng: -74.0060, title: "New York", description: "The Big Apple" },
  { lat: 34.0522, lng: -118.2437, title: "Los Angeles", description: "City of Angels" }
];

markers.forEach(marker => {
  L.marker([marker.lat, marker.lng])
    .bindPopup(`<b>${marker.title}</b><br>${marker.description}`)
    .addTo(map);
});

Highlighted Region (GeoJSON)

Show a highlighted border or region:

const region = {
  "type": "Feature",
  "geometry": {
    "type": "Polygon",
    "coordinates": [[...]]
  }
};

L.geoJSON(region, {
  style: { color: 'red', weight: 3, fillOpacity: 0.2 }
}).addTo(map);

Layer Controls

Toggle between map types:

const street = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
const satellite = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}');

const baseMaps = {
  "Street": street,
  "Satellite": satellite
};

L.control.layers(baseMaps).addTo(map);
street.addTo(map); // Default layer

Custom Marker Icons

Use custom icons for different categories:

const universityIcon = L.icon({
  iconUrl: 'university-icon.png',
  iconSize: [32, 32],
  iconAnchor: [16, 32],
  popupAnchor: [0, -32]
});

L.marker([lat, lng], { icon: universityIcon }).addTo(map);

Educational Considerations

Bloom's Taxonomy Alignment

  • Remember: Identify locations on a map
  • Understand: Explain geographic relationships
  • Apply: Use maps for problem-solving (routes, distances)
  • Analyze: Compare geographic patterns
  • Evaluate: Assess geographic data quality
  • Create: Design custom maps for specific purposes

Accessibility

  • Ensure marker popups have descriptive text
  • Provide text alternatives for visual information
  • Use high-contrast colors for highlighted regions
  • Include keyboard navigation support

Performance

  • Limit markers to <100 for optimal performance
  • Use marker clustering for large datasets:
    javascript const markers = L.markerClusterGroup(); markers.addLayer(L.marker([lat, lng])); map.addLayer(markers);

Troubleshooting

Map not displaying

  • Check that Leaflet CDN links are correct
  • Verify #map div has a fixed height in CSS
  • Ensure coordinates are in decimal format (not DMS)

Markers not appearing

  • Verify latitude/longitude order (lat first, lng second)
  • Check that coordinates are within valid ranges (-90 to 90 lat, -180 to 180 lng)
  • Ensure markers are added after map initialization

Iframe not fitting properly

  • Verify body { margin: 0; padding: 0; } in CSS
  • Check iframe height in index.md (adjust if needed)
  • Ensure container has minimal margins

References

  • Leaflet Documentation
  • Leaflet Tutorials
  • OpenStreetMap Tile Usage Policy
  • GeoJSON Format Specification

Version History

  • v1.0 (2025-01-16): Initial release with basic marker maps, layer controls, and GeoJSON support

常见问题

5 问
答案由本站依据条目字段整理
map-generator怎么安装?

没有现成安装命令:按安装说明或仓库 README,把 SKILL.md 放进客户端的 skills 目录(一般一个技能一个文件夹)。

map-generator支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

map-generator权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

map-generator收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

map-generator用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。