Baidu Ai Map logo

Baidu Ai Map

Community
infometa
baidu-ai-map

使用百度地图 Agent Plan 直接完成普通或复杂的地理任务,包括语义化地点检索、路线规划、地理编码与逆地理编码、天气查询。仅在已配置环境变量 BAIDU_MAP_AUTH_TOKEN,或本连接器的 baidu-map MCP 工具(map_*)无法满足需求时使用;普通地点、路线、地址、天气问题默认使用 baidu-map。不用于生成地图调用代码、纯官方文档查询,也不用于登录、AK、样式、配额等账户资源管理。

Overview

Publisherinfometa
Repositoryworkbuddyskills
Skill namebaidu-ai-map
Stars
376
Forks
124
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by infometa on GitHub. Read the source before you install it.

Installation

Install the Baidu Ai Map AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/infometa/workbuddyskills/tree/main/connectors/baidu-maps/skills/baidu-ai-map
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/infometa/workbuddyskills.git /tmp/workbuddyskills
mkdir -p .claude/skills
cp -r /tmp/workbuddyskills/connectors/baidu-maps/skills/baidu-ai-map .claude/skills/baidu-ai-map
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Baidu Ai Map in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Baidu Ai Map on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Baidu Ai Map is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

百度地图服务 Agent Plan

提供大模型友好调用的地图工具,支持语义化 AI 搜索、语义化 AI 路线规划、地理编码与逆地理编码、天气查询。

定位:直接得到地理结果

无需成为百度地图开发者,无需申请 AK——只要登录态就能用。这是本 skill 相对同 plugin 内 baidu-map-webapi / baidu-map-jsapi-gl 的核心差异:

本 skill(Agent Plan)webapi / jsapi-gl skill
凭据Agent Plan SK,登录即得需对应端 AK,可能要新建
产出地理问题的答案可交付的代码
入参用户原话(user_raw_request)结构化参数、坐标、UID

适用:用户想直接知道「附近有什么」「怎么走」「这个坐标是哪」「天气如何」。本连接器已通过 baidu-map MCP 工具(map_*)提供这些能力,默认优先使用 baidu-map;仅当已配置 BAIDU_MAP_AUTH_TOKEN,或 map_* 工具无法满足需求时才使用本 skill。

不适用:

  • 用户要能运行的 HTML / 前端代码:使用 baidu-map-jsapi-gl。
  • 用户要服务端 API 调用代码:使用 baidu-map-webapi。
  • 用户明确询问官方接口参数、字段、限制或版本定义:说明需以百度地图开放平台官方文档为准,不凭记忆作答。
  • 用户要登录、AK、样式、配额或账户资源管理:引导用户前往百度地图开放平台控制台自行操作。

禁止在本 skill 中触发 AK 流程:不执行 ak list、不创建 AK、不询问 AK 类型。误入凭据申请流程会毁掉本 skill 零配置的价值。

使用准则

准则 1:API 端点

所有能力统一使用:

Base URL: https://api.map.baidu.com/

准则 2:SK 凭证安全处理

SK(Service Key)是调用所有 API 的必须凭证,按以下顺序获取:

  1. 读取环境变量 BAIDU_MAP_AUTH_TOKEN,有值则直接使用。
  2. 无值时,提示用户前往 百度地图 Agent Plan 申请 SK 并自行设置环境变量。SK 属于明文凭据,禁止整段回显给用户;仅在需要说明时按「前 4 位 + **** + 后 4 位」遮掩陈述:
bash
export BAIDU_MAP_AUTH_TOKEN="你的SK"

准则 3:统一鉴权方式(Header 传入)

调用所有 API 时,统一通过 Header 传入:

  • Authorization: Bearer $BAIDU_MAP_AUTH_TOKEN

示例:

bash
curl --get "https://api.map.baidu.com/agent_plan/v1/place" \
  -H "Authorization: Bearer $BAIDU_MAP_AUTH_TOKEN" \
  --data-urlencode "user_raw_request=帮我找北京可带宠物的咖啡馆" \
  --data-urlencode "region=北京市"

全局参数与行为约束

  1. user_raw_request 必须是完整的用户需求,不可压缩为关键词。
  2. user_raw_request 出现“我附近”等非明确地点时,可根据上下文为用户推理为具体地点名称,但不可对坐标进行推理。
  3. user_raw_request 需保留定语/约束词,例如“评分最高”“最近”“最便宜”“3公里内”。
  4. 不得编造坐标;center / location / refer_pois 仅可来自用户明确提供或可信来源,当无可靠坐标时,必须先向用户澄清或先调用 geocoding / place 等工具获取。
  5. 统一使用 Header 鉴权:Authorization: Bearer $BAIDU_MAP_AUTH_TOKEN。
  6. 经纬度至少保留小数点后 6 位。
  7. 所有工具返回坐标类型统一为 gcj02。
  8. 禁止使用 grep/sed/awk/jq/python脚本 正则裁剪响应后再推断字段,这会造成百度地图 Agent Plan 巨额的token消耗;短时间内遇到相同或高度相似请求时,应优先基于结果直接推理,避免重复发起请求。
  9. direction 可能返回两类结果:路线结果,或起终点澄清结果。当返回起终点澄清结果时,应先根据用户需求推理最合理候选;若仍无法唯一确定,应引导用户在候选中选择后再继续规划。

执行工作流

  1. 按需求选择 place、direction、geocoding、reverse_geocoding 或 weather。
  2. 调用前读取 references/agent-plan-api.md 中对应接口的必填参数、约束和示例;不要一次加载无关接口资料。
  3. 使用 curl --get 与 --data-urlencode 发起请求,凭据只放在 Authorization Header,不放进 URL、日志或最终回答。
  4. 直接解析完整 JSON 响应;不要用文本正则裁剪响应后猜测字段。
  5. 结果有歧义时先利用响应候选和用户上下文消歧,仍无法唯一确定再询问用户。
  6. API 返回参数错误时,重新读取对应 reference;涉及精确字段、限制或最新定义时以官方文档为准,不凭记忆补齐。

API 索引

需求接口读取位置
语义化地点检索GET /agent_plan/v1/placereferences/agent-plan-api.md#place
语义化路线规划GET /agent_plan/v1/directionreferences/agent-plan-api.md#direction
地址转坐标GET /agent_plan/v1/geocodingreferences/agent-plan-api.md#geocoding
坐标转地址GET /agent_plan/v1/reverse_geocodingreferences/agent-plan-api.md#reverse-geocoding
天气查询GET /agent_plan/v1/weatherreferences/agent-plan-api.md#weather

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Baidu Ai Map AI skill do?

使用百度地图 Agent Plan 直接完成普通或复杂的地理任务,包括语义化地点检索、路线规划、地理编码与逆地理编码、天气查询。仅在已配置环境变量 BAIDU_MAP_AUTH_TOKEN,或本连接器的 baidu-map MCP 工具(map_*)无法满足需求时使用;普通地点、路线、地址、天气问题默认使用 baidu-map。不用于生成地图调用代码、纯官方文档查询,也不用于登录、AK、样式、配额等账户资源管理。

Why use Baidu Ai Map on TypingMind?

Because you install it once and use it with any model. Baidu Ai Map is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Baidu Ai Map in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/infometa/workbuddyskills/tree/main/connectors/baidu-maps/skills/baidu-ai-map. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Baidu Ai Map?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Baidu Ai Map?

As many as you like. As long as a model supports skills, you can use Baidu Ai Map with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Baidu Ai Map AI skill free?

Yes. It is published on GitHub by infometa under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇