Token导航 LogoToken导航TokenDH.com
待分类操作浏览器github未标认证来源可访问许可证需确认审计异常

map-generator地图生成器

Agent Skill

map-generator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

245

周安装

10

GitHub Stars

2

下载量

78
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:map-generator(地图生成器)
来源仓库:https://github.com/vishalsachdev/claude-skills
仓库路径:skills/map-generator
安装命令:
npx skills add https://github.com/vishalsachdev/claude-skills --skill map-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vishalsachdev/claude-skills --skill map-generator

简介

map-generator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 它能协助处理仓库状态、代码变更及协作相关事项。
  • 可通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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)

  1. 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

  1. Browser compatibility: Test in Chrome, Firefox, Safari
  2. 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: 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

Version History

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.35%
按下载量换算30

Claude

31.25%
按下载量换算24

Cursor

16.99%
按下载量换算13

Gemini CLI

9.47%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills