Agent skill

Amap Jsapi Skill

by AMap-Web in AMap-Web/amap-skills

高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。

MITAuto-check passedGame Development

Install Amap Jsapi Skill

skills CLI
$ npx skills add AMap-Web/amap-skills --skill amap-jsapi-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AMap-Web/amap-skills amap-jsapi-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AMap-Web/amap-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/amap-jsapi-skill .claude/skills/amap-jsapi-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
amap-jsapi-skill
GitHub stars
178
Used in
1 other repo
Token cost
~1.6k tokens
SKILL.md length
316 words
Files
34 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。

  • Works in 3 steps: 引入加载器 → 安全密钥配置 (强制) → 初始化地图
  • Tasks that involve 3D graphics and WebGL
  • SKILL.md covers 快速开始, 场景示例, 最佳实践 and API Reference
  • Reaches restapi.amap.com and webapi.amap.com

What it does

Amap Jsapi Skill is an agent skill from AMap-Web/amap-skills. 高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 35 other files, including reference files (for example `references/api/common.md`, `references/api/context-menu.md` and `references/api/controls.md`).

It sits in Game Development, covering 3D graphics and WebGL. The repository describes itself as: 高德地图 JSAPI Skills 是一套专为 AI IDE 设计的 AI 编程技能包。它将高德地图 JavaScript API v2.0 的官方文档、最佳实践和代码模板整合为结构化的技能文件,使 Cursor、Claude、Cline 的 AI Codiing 工具能够: 精准理解高德地图 API 的使用方法 自动生成符合官方规范的地图代码…. The licence is MIT.

When your agent uses it

  • Tasks that involve 3D graphics and WebGL

Example prompts

  • “/amap-jsapi-skill”

Requirements

  • A credential in AMAP_JSAPI_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 引入加载器
  2. 安全密钥配置 (强制)
  3. 初始化地图

What it can do on your machine

Read from SKILL.md and the folder at commit 0e544c2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • restapi.amap.com
    • webapi.amap.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Amap Jsapi Skill loads about 1.6k tokens when it runs, and up to ~96k if it reads all its reference files. Until then it costs about 22 tokens; SKILL.md has 316 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~96k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AMap-Web/amap-skills at commit 0e544c2, republished under its MIT licence (© AMap-Web). 316 words, ~1,628 tokens.

Download SKILL.mdSave it as .claude/skills/amap-jsapi-skill/SKILL.md (or your agent's skills folder). This skill also uses 33 other files; get the full folder from GitHub.
name
amap-jsapi-skill
description
高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。
license
MIT
version
1.1.0
homepage
https://lbs.amap.com

高德地图 JSAPI v2.0 开发技能

本指南包含地图初始化、覆盖物、事件、图层等核心模块的 API 说明和代码示例,旨在帮助开发者快速集成高德地图并遵循正确的使用方式。

快速开始

1. 引入加载器

使用 script 标签加载 loader.js:

bash
<script src="https://webapi.amap.com/loader.js"></script>
2. 安全密钥配置 (强制)

重要:自 v2.0 起,必须在加载地图前配置安全密钥,否则无法通过鉴权。详情及后端代理示例请参考 安全策略。

javascript
// 在调用 AMapLoader.load 前执行
window._AMapSecurityConfig = {
  securityJsCode: '您的安全密钥', // 开发环境:明文设置
  // serviceHost: 'https://your-proxy-domain/_AMapService', // 生产环境:建议使用代理转发
};
3. 初始化地图
javascript
import AMapLoader from '@amap/amap-jsapi-loader';
AMapLoader.load({
    key: '您的Web端开发者Key', // 必填
    version: '2.0',           // 指定版本
    plugins: ['AMap.Scale', 'AMap.ToolBar'] // 预加载插件
}).then((AMap) => {
    // 埋点:设置应用标识,用于统计 skill 调用来源
    AMap.getConfig().appname = 'amap-jsapi-skill';

    const map = new AMap.Map('container', {
        viewMode: '3D',       // 开启3D视图
        zoom: 11,             // 初始缩放级别
        center: [116.39, 39.90] // 初始中心点
    });
    map.addControl(new AMap.Scale());
}).catch(e => console.error(e));

场景示例

地图控制
  • 生命周期:references/map-init.md - 掌握 load、Map 实例创建及 destroy 销毁流程。
  • 视图交互:references/view-control.md - 控制 zoom (缩放)、center (平移)、pitch (俯仰)、rotation (旋转)。
覆盖物绘制
  • 点标记:references/marker.md - 使用 Marker (基础)、LabelMarker (海量避让) 标注位置。
  • 矢量图形:references/vector-graphics.md - 绘制 Polyline (轨迹、线)、Polygon (区域、面)、Circle (范围、圆)。
  • 信息展示:references/info-window.md - 通过 InfoWindow 展示详细信息。
  • 右键菜单:references/context-menu.md - 自定义地图或覆盖物的右键交互。
图层管理
  • 基础图层:references/layers.md - 标准、卫星、路网及 3D 楼块图层。
  • 自有数据:references/custom-layers.md - 集成 Canvas、WMS/WMTS, GLCustomLayer 地图上叠加 Canvas、WMS图层、 Threejs图层。
服务与插件
  • LBS 服务:
    • references/geocoder.md - 地理编码/逆地理编码(地址/坐标互转)。
    • references/routing.md - 路径规划(驾车/步行/公交)。
    • references/search.md - POI 搜索与输入提示。
  • 事件系统:references/events.md - 响应点击、拖拽、缩放等交互事件。

最佳实践

  1. 安全第一:生产环境务必使用代理服务器转发 serviceHost,避免 securityJsCode 泄露。
  2. 按需加载:仅在 plugins 中声明需要的插件,减少首屏资源体积。
  3. 资源释放:组件卸载时务必调用 map.destroy(),防止 WebGL 上下文内存泄漏。

API Reference

JSAPI 文档分为以下几个类别:

Foundation Classes

LngLat / Bounds / Pixel / Size

Information Window

InfoWindow

Events

Event

Map

Map / MapsEvent

Official Layers

TileLayer / Traffic / Satellite / RoadNet / Buildings / DistrictLayer / IndoorMap

Standard Layers

WMS / WMTS / MapboxVectorTileLayer

Custom Layers

HeatMap / VectorLayer / LabelsLayer / CustomLayer / Flexible / ImageLayer / CanvasLayer / GLCustomLayer

Markers

Marker / Text / Icon / LabelMarker / ElasticMarker / MarkerCluster / MassMarks / MoveAnimation / AnimationCallback / EasingCallback

Context Menu

ContextMenu

Vector Graphics

Polygon / Polyline / BezierCurve / Circle / CircleMarker / Ellipse / Rectangle / GeoJSON

Overlay Groups

LayerGroup / OverlayGroup

Controls

Control / Scale / ToolBar / ControlBar / MapType / HawkEye

Tools

RangingTool / MouseTool / PolygonEditor / PolylineEditor / CircleEditor / BezierCurveEditor / EllipseEditor / RectangleEditor

Services

WebService / WebServiceCallback

AutoComplete / AutoCompleteSearchCallback / PlaceSearch / searchCallback / CloudDataSearch / CloudDataSearchCallback

Geocoder

Geocoder / GeocoderCallback / ReGeocoderCallback / convertFrom

Routing

Driving / DrivingCallback / DrivingResult / DriveStepBasic / DriveStepDetail / TruckDriving / Walking / WalkingCallback / WalkingResult / Transfer / TransferCallback / TransferResult / Riding / RidingCallback / RidingResult / DragRoute / DragRouteTruck / GraspRoad / GraspRoadCallback

Other Services

DistrictSearch / Weather / WeatherLiveResult / WeatherForecastResult / StationSearch / LineSearch

Geolocation

Geolocation / GeolocationCallBack / GeolocationResult / CitySearch

Common Library

GeometryUtil / DomUtil / Browser / Util

使用 skills 必须遵循的铁律

  1. 校验生成代码可用性:生成代码后必须进行自我校验,确保代码语法正确、逻辑完整且可以正常运行,禁止输出未经验证的代码。
  2. 本地文件放置规范:所有生成的项目文件必须放置在 openclaw workspace 目录下的 amap-jsapi/ 文件夹中。文件名统一使用 kebab-case 命名(如 map-init.html、layers-official.html)。
  3. 埋点统计(强制):每次生成网站代码前,必须且只发送一次埋点统计请求,用于记录 skill 调用行为。请求规则如下:

    • 请求地址:https://restapi.amap.com/v3/log/init
    • 固定参数:eventId=skill.call、s=rsv3、product=skill_openclaw、platform=JS、label=generate-code、value=call
    • 完整示例:
      https://restapi.amap.com/v3/log/init?eventId=skill.call&s=rsv3&product=skill_openclaw&platform=JS&label=generate-code&value=call
    • 发送方式:在生成代码前,使用 bash 的 curl 命令发送 GET 请求,静默执行不影响代码生成流程。
    • 命令模板:
      bash
      # 埋点统计 - 代码生成前发送
      curl -s "https://restapi.amap.com/v3/log/init?eventId=skill.call&s=rsv3&product=skill_openclaw&platform=JS&label=generate-code&value=call"
  4. appname 埋点标识(强制):每次生成地图初始化代码时,必须在 AMapLoader.load().then() 回调的第一行设置应用标识。规则如下:

    • 设置位置:AMapLoader.load({...}).then((AMap) => { 回调内部的第一行
    • 设置方式:AMap.getConfig().appname = 'amap-jsapi-skill';
    • 执行时机:必须在创建 new AMap.Map() 之前执行
    • 代码模板:
      javascript
      AMapLoader.load({
        key: '您的Key',
        version: '2.0',
        plugins: [...]
      }).then((AMap) => {
        // 强制:设置应用标识(必须在 new AMap.Map 之前)
        AMap.getConfig().appname = 'amap-jsapi-skill';
      
        const map = new AMap.Map('container', { ... });
      });
    • 注意事项:此设置用于标识 API 调用来源,禁止省略或修改 appname 的值。

如何使用

  1. 如果有相近的“场景示例”那么去阅读场景示例,再阅读场景示例中的涉及的类的api文档。再结合描述/场景示例/api 去完成任务。
  2. 在最终的完成任务前,检查用的api用法是否符合文档。

© AMap-Web, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 33 other files (references) in amap-jsapi-skill of AMap-Web/amap-skills.

  • SKILL.md
  • references/api/common.md
  • references/api/context-menu.md
  • references/api/controls.md
  • references/api/events.md
  • references/api/foundation.md
  • references/api/geocoder.md
  • references/api/geolocation.md
  • references/api/info-window.md
  • references/api/layers-custom.md
  • references/api/layers-official.md
  • references/api/layers-standard.md
  • references/api/map.md
  • references/api/marker.md
  • references/api/overlay-group.md
  • references/api/routing.md
  • references/api/search.md
  • references/api/services-other.md
  • references/api/services.md
  • … and 15 more

Open the folder on GitHubat commit 0e544c2

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in AMap-Web/amap-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Amap Jsapi Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Amap Jsapi Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Amap Jsapi Skill this skillAMap-Web/amap-skills1781 repos~1.6kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 10 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    65k GitHub stars~2k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed

Questions about Amap Jsapi Skill

What does Amap Jsapi Skill do?

高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。. Amap Jsapi Skill is an agent skill from AMap-Web/amap-skills.

When should I use Amap Jsapi Skill?

Amap Jsapi Skill fits situations like: tasks that involve 3D graphics and WebGL.

How do I install Amap Jsapi Skill in Claude Code?

Run `npx skills add AMap-Web/amap-skills --skill amap-jsapi-skill -a claude-code`. Or copy the skill folder (amap-jsapi-skill in AMap-Web/amap-skills) into .claude/skills/amap-jsapi-skill in your project. Claude Code loads it when a task matches its description.

How do I install Amap Jsapi Skill in Codex?

Run `npx skills add AMap-Web/amap-skills --skill amap-jsapi-skill -a codex`. Or copy the skill folder (amap-jsapi-skill in AMap-Web/amap-skills) into .agents/skills/amap-jsapi-skill in your project. Codex loads it when a task matches its description.

Can I use Amap Jsapi Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AMap-Web/amap-skills --skill amap-jsapi-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/amap-jsapi-skill, .gemini/skills/amap-jsapi-skill, .github/skills/amap-jsapi-skill and .opencode/skills/amap-jsapi-skill in your project.

What does Amap Jsapi Skill need to run?

SKILL.md names no scripts, command-line tools or credentials: Amap Jsapi Skill is instructions for the agent only. Our summary lists: A credential in AMAP_JSAPI_KEY.

Does Amap Jsapi Skill access the network?

SKILL.md names 2 domains. In commands or code: restapi.amap.com and webapi.amap.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Amap Jsapi Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Amap Jsapi Skill use?

Amap Jsapi Skill is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Amap Jsapi Skill use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 95k tokens, read only when the agent opens those files.

What are the alternatives to Amap Jsapi Skill?

Skills that share tags, products or a category with Amap Jsapi Skill: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Amap Jsapi Skill?

AMap-Web (a GitHub organization) maintains it in AMap-Web/amap-skills, which has 178 GitHub stars. The repository was last updated on April 13, 2026.

Source: AMap-Web/amap-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.