Preface¶
When integrating Tencent Maps JavaScript GL (JSAPI GL) into the Web, the common problem is not “whether it can be drawn”, but scattered documentation, inconsistent example versions, and pitfalls when combining overlays and layers. When using general-purpose LLMs to write map code, issues often arise where initialization parameters, event binding, or Key usage methods are inconsistent with the current API.
The following introduces the enterprise-level Skill on SkillHub “Tencent Maps JSAPI GL Development Skill”, published by the Tencent Maps Location Services team, which is used to make the Agent follow the same set of development guidelines when writing, reviewing, or debugging code related to the Tencent Maps API.
What Is This¶
“Tencent Maps JSAPI GL Development Skill” is a development-guide-type Skill for Tencent Maps JavaScript GL (JSAPIGL), with the identifier @tencent-adm/tencentmap-jsapi-gl-skill, current version 1.0.4, source labeled as enterprise, and SkillHub category dev-programming. The Skill page is labeled requires_api_key=true, and actual development requires configuring a Tencent Maps JSAPI Key.
Official entry points:
- API page: https://api.skillhub.cn/tencent-adm/tencentmap-jsapi-gl-skill
- SkillHub showcase page: https://www.skillhub.cn/skills/tencent-adm/tencentmap-jsapi-gl-skill
Core Features¶
The scope of applicable tasks listed in the Skill introduction is as follows, all from official descriptions. You can understand, by module, on which issues the Agent will align with the guidelines:
- Map basics: Map initialization, layer control, event handling, control interactions.
- Display and rendering: Overlay display, visualization rendering, 3D model display, performance optimization.
- Map capabilities: Map tools, search, route planning, address lookup, administrative divisions, IP geolocation, geometric calculations.
Trigger conditions: When “Tencent Maps”, “jsapi”, “jsapi-gl”, or related map development needs appear in the conversation, this Skill should be loaded.
Mandatory behavior after loading (as required by the official text): The first action must be to check whether a formal Key exists—the environment variable TMAP_JSAPI_KEY, or a Key already provided by the user in the conversation. If a formal Key already exists, handle the user request directly; if not, the Agent must first show the user a Key selection prompt (formal Key registration guidance + preset experience Key option), and must not perform analysis, read files, plan, or write code before the user makes a selection.
Installation and Activation¶
Install via SkillHub CLI¶
First confirm whether skillhub is installed on your machine:
command -v skillhub && skillhub --version
If not installed, you can follow the SkillHub installation documentation (full installation or CLI only):
# Full installation (CLI + default Skills, recommended)
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
# CLI-only installation
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
When installing this Skill, you must use --dir to point to the current Agent’s skills directory; otherwise it will be installed into the default ./skills/, which the Agent may not be able to recognize. Paths differ across clients; common examples given in the installation documentation are as follows:
| Environment | skills directory (example) |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
Installation command form:
skillhub install @tencent-adm/tencentmap-jsapi-gl-skill --dir <your Agent skills directory>
You can also, on the SkillHub Skill page, send the prompt to an AI and have it complete the installation per https://skillhub.cn/install/skillhub.md:
Please install `@tencent-adm/tencentmap-jsapi-gl-skill` according to https://skillhub.cn/install/skillhub.md.
Key Configuration¶
A formal Key can be provided to the Agent and local projects via an environment variable:
export TMAP_JSAPI_KEY="Your Tencent Maps JSAPI Key"
If not configured, the Skill requires the Agent to first guide the user to choose between a formal Key or an experience Key before proceeding with subsequent development steps.
Typical Usage¶
After the above installation and Key preparation, the typical workflow can be summarized as follows:
- Enable
@tencent-adm/tencentmap-jsapi-gl-skillin a Skills-supporting client such as Cursor, Claude Code, or Codex. - Initiate a request related to Tencent Maps JSAPI GL (e.g., initializing a map, adding overlays, route planning, address search, etc.).
- The Agent follows the Skill rules to first validate
TMAP_JSAPI_KEYor the Key in the conversation; after it passes, it proceeds to write, review, or debug code. - When capabilities such as search, routes, administrative divisions, or IP geolocation are involved, the implementation approach is constrained by the development guidelines inside the Skill, reducing deviations from official API usage.
Public materials do not provide the full body of SKILL.md or copy-and-run official example snippets. For specific API calls, defer to the guidelines the Agent follows after loading the Skill and the Tencent Maps JSAPI GL official documentation.
Applicable Scenarios and Notes¶
Who it’s for
- Front-end / full-stack developers who are building map applications or internal map tools.
- Teams that want the Agent to participate in code review and joint debugging/troubleshooting, and need to unify Tencent Maps JSAPI GL terminology and workflows.
Usage notes
- A Key must be reserved: the label
requires_api_key=truemeans the Skill enforces handling the Key first; the Agent will not directly modify code before a Key is selected. - Installation path must be correct: be sure to use
skillhub install ... --dir <Agent skills directory>to avoid installing into the default./skills/, which would prevent it from taking effect. - Version and data: the Skill is currently v1.0.4; the rating shown on the SkillHub page is 100000, with 3795 downloads and 4 installations (subject to the page display, which may change over time).
Closing¶
“Tencent Maps JSAPI GL Development Skill” packages the JSAPI GL development guidelines organized by the Tencent Maps Location Services team into an Agent Skill, covering common tasks from map initialization to search, routes, geometries, and performance, and prioritizes handling Key compliance after loading. If you use tools like Cursor for Tencent Maps-related development, you can install @tencent-adm/tencentmap-jsapi-gl-skill from SkillHub, configure TMAP_JSAPI_KEY, and integrate it into your daily conversations.
Official address: https://api.skillhub.cn/tencent-adm/tencentmap-jsapi-gl-skill