mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-09-05 21:43:46 +08:00
feat(skills): add 6 due-diligence data-source skills (#111)
## Summary
Adds six enterprise due-diligence data-source skills as local built-in
skills (SKILL.md + SKILL.zh-CN.md + catalog-metadata sidecar), per
ADR-038.
| Skill | Category | Risk | Source |
|---|---|---|---|
| baidu-poi-search | data | low | Baidu Map Place API (REST) |
| tianyancha-risk | business | low | Tianyancha risk API (REST) |
| ccgp-gov-procurement | business | medium | ccgp.gov.cn (WebBridge) |
| cnipa-patent-search | business | medium | CNIPA pss-system (WebBridge)
|
| creditchina-query | business | high | creditchina.gov.cn (WebBridge +
ddddocr) |
| multi-source-sentiment | research | medium | Douyin Index/Featured +
WebSearch |
## Changes
- 6 x skills/<id>/{SKILL.md, SKILL.zh-CN.md, catalog-metadata.v1.json}
- builtin-skills.json: 34 -> 40
- manifest.json: totalSkills 63 -> 69
- README.md counts + list
## Security
- Credentials replaced with env-var placeholders (BAIDU_MAP_AK,
TIANYANCHA_TOKEN); verified no secrets in diff
## Validation
- validate-i18n.py: 0 errors (remaining warnings pre-existing repo-wide)
- zh/en heading parity verified; source_hash computed per repo algorithm
Co-authored-by: yi-ge <yi-ge@desirecore.net>
This commit is contained in:
152
skills/baidu-poi-search/SKILL.md
Normal file
152
skills/baidu-poi-search/SKILL.md
Normal file
@@ -0,0 +1,152 @@
|
||||
---
|
||||
name: baidu-poi-search
|
||||
description: >-
|
||||
百度地图企业 POI 搜索——输入企业名称,返回 POI 名称/地址/经纬度/分支机构。Use when 用户提到"查企业地址"、"查公司位置"、"POI搜索"、"企业地图"、"经纬度"、"查分支机构"、"百度地图"、"企业网点"、"周边企业"。
|
||||
version: 1.0.0
|
||||
type: procedural
|
||||
risk_level: low
|
||||
status: enabled
|
||||
tags:
|
||||
- due-diligence
|
||||
- baidu-map
|
||||
- poi
|
||||
- geolocation
|
||||
metadata:
|
||||
author: desirecore
|
||||
updated_at: '2026-09-03'
|
||||
i18n:
|
||||
default_locale: en-US
|
||||
source_locale: zh-CN
|
||||
locales:
|
||||
- zh-CN
|
||||
- en-US
|
||||
zh-CN:
|
||||
name: 百度地图POI搜索
|
||||
short_desc: 输入企业名称,返回 POI 名称/地址/经纬度/分支机构
|
||||
description: >-
|
||||
百度地图企业 POI 搜索——输入企业名称,返回 POI 名称/地址/经纬度/分支机构。Use when 用户提到"查企业地址"、"查公司位置"、"POI搜索"、"企业地图"、"经纬度"、"查分支机构"、"百度地图"、"企业网点"、"周边企业"。
|
||||
body: ./SKILL.zh-CN.md
|
||||
source_hash: sha256:24e98eab4d4e0f04
|
||||
translated_by: human
|
||||
en-US:
|
||||
name: Baidu Map POI Search
|
||||
short_desc: Enterprise POI lookup by company name — name, address, coordinates, branches
|
||||
description: >-
|
||||
Baidu Map enterprise POI search — input a company name and return POI name, address, latitude/longitude, and branch listings. Use when the user asks to look up a company address, location, POI, enterprise map, coordinates, branches, or nearby companies.
|
||||
body: ./SKILL.md
|
||||
source_hash: sha256:24e98eab4d4e0f04
|
||||
translated_by: human
|
||||
market:
|
||||
icon: >-
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M12 21c4.97-4.36 7.5-8.1 7.5-11.5a7.5 7.5 0 1 0-15 0C4.5 12.9 7.03 16.64 12 21Z" stroke="#007AFF" stroke-width="1.6" stroke-linejoin="round"/><circle cx="12" cy="9.5" r="2.6" stroke="#34C759" stroke-width="1.6"/></svg>
|
||||
category: data
|
||||
maintainer:
|
||||
name: DesireCore Official
|
||||
verified: true
|
||||
compatible_agents: []
|
||||
channel: latest
|
||||
required_client_version: 10.0.115
|
||||
---
|
||||
|
||||
# Baidu Map POI Search
|
||||
|
||||
## L0: One-Sentence Summary
|
||||
|
||||
Input a company name, call the Baidu Map Place Search API, and return normalized POI data (name / address / coordinates / province & city).
|
||||
|
||||
## L1: Overview
|
||||
|
||||
- **Data source**: Baidu Map Open Platform Place Search API v2
|
||||
- **Auth**: AK (free quota for individual developers)
|
||||
- **Invocation**: HTTP GET (curl / HttpRequest tool)
|
||||
- **Prerequisites**: no browser, no extra dependencies — pure REST API
|
||||
|
||||
## Credential Setup
|
||||
|
||||
This skill requires a Baidu Map AK (access key):
|
||||
|
||||
1. Register a developer account at the [Baidu Map Open Platform](https://lbsyun.baidu.com/)
|
||||
2. Console → App Management → Create an app (enable the "Place Search" service; choose the empty-whitelist `0.0.0.0/0` AK type)
|
||||
3. Export the AK as the environment variable `BAIDU_MAP_AK`, or replace the `{BAIDU_MAP_AK}` placeholder in the commands below
|
||||
|
||||
> If the local DesireCore service catalog already registers the Baidu Map service (endpoint `https://api.map.baidu.com`), prefer calling it through the catalog so credentials are managed centrally.
|
||||
|
||||
## L2: Procedure
|
||||
|
||||
### 1. Build the request
|
||||
|
||||
```bash
|
||||
curl -s --max-time 15 --ssl-no-revoke \
|
||||
"https://api.map.baidu.com/place/v2/search?query={company-name-URL-encoded}®ion={city-or-nationwide}&output=json&page_size=20&ak=${BAIDU_MAP_AK}"
|
||||
```
|
||||
|
||||
**Parameters**:
|
||||
|
||||
| Param | Value | Notes |
|
||||
|---|---|---|
|
||||
| query | Company name (URL-encoded) | e.g. `华为技术有限公司` → `%E5%8D%8E%E4%B8%BA%E6%8A%80%E6%9C%AF%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8` |
|
||||
| region | City name or `全国` (nationwide) | Scope; use nationwide when unsure |
|
||||
| output | json | Fixed |
|
||||
| page_size | 20 | Max 20 per page |
|
||||
| ak | `{BAIDU_MAP_AK}` | Baidu Map AK (free for individual developers) |
|
||||
|
||||
### 2. Interpret the response
|
||||
|
||||
- `status == 0`: success, extract `results[]`
|
||||
- `status != 0`: failure, check `message` (101 = AK missing, 200 = AK disabled, 302 = quota exceeded)
|
||||
|
||||
### 3. Normalized mapping
|
||||
|
||||
Map each entry in `results[]` to:
|
||||
|
||||
```json
|
||||
{
|
||||
"source": "baidu-poi",
|
||||
"company_name": "{user input}",
|
||||
"poi_name": "{result.name}",
|
||||
"address": "{result.address}",
|
||||
"latitude": "{result.location.lat}",
|
||||
"longitude": "{result.location.lng}",
|
||||
"province": "{result.province}",
|
||||
"city": "{result.city}"
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Homonym filtering (due-diligence scenario)
|
||||
|
||||
POI results may contain same-name noise (e.g. "南岗华为公司" is not "华为技术有限公司"). Filtering suggestion:
|
||||
|
||||
- Exact match: `result.name` equals the full company name → `match=exact`
|
||||
- Partial match: `result.name` contains the full name or its short name → `match=partial`
|
||||
- Otherwise → `match=related`, listed separately in due-diligence reports
|
||||
|
||||
### 5. Output format
|
||||
|
||||
```json
|
||||
{
|
||||
"query_status": "success",
|
||||
"source": "baidu-poi",
|
||||
"total": 5,
|
||||
"results": [
|
||||
{ "poi_name": "华为技术有限公司", "address": "广东省深圳市龙岗区...", "latitude": "22.656137", "longitude": "114.066131", "match": "exact" }
|
||||
],
|
||||
"timestamp": "2026-08-31T21:00:00+08:00"
|
||||
}
|
||||
```
|
||||
|
||||
## Known Limitations
|
||||
|
||||
- Free quota: QPS (~3/s) and daily caps (~100 place-search calls/day) for individual developers, per console quota management
|
||||
- POI ≠ registered business address: results are map annotations and may differ from the registered address (note the distinction in due diligence)
|
||||
- Homonyms: short names of famous companies hit many non-target POIs — prefer the full company name
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Code | Meaning | Fix |
|
||||
|---|---|---|
|
||||
| 0 | Success | — |
|
||||
| 101 | AK param missing | Check the ak parameter |
|
||||
| 200 | AK disabled | Check app status in the Baidu console |
|
||||
| 201 | AK/SN check failed | This recipe uses an empty-whitelist `0.0.0.0/0` AK; no SN needed |
|
||||
| 302 | Quota exceeded | Wait for the daily reset or upgrade the quota |
|
||||
| 240 | API service invalid | The AK has not enabled "Place Search" — fix the app in the console |
|
||||
102
skills/baidu-poi-search/SKILL.zh-CN.md
Normal file
102
skills/baidu-poi-search/SKILL.zh-CN.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# 百度地图 POI 搜索
|
||||
|
||||
## L0
|
||||
|
||||
输入企业名称,调用百度地图地点检索 API,返回标准化 POI 数据(名称/地址/经纬度/省市)。
|
||||
|
||||
## L1 概述
|
||||
|
||||
- **数据源**:百度地图开放平台地点检索 API v2
|
||||
- **认证**:AK(个人开发者免费配额)
|
||||
- **调用方式**:HTTP GET(curl / HttpRequest 工具)
|
||||
- **前置条件**:无浏览器依赖、无额外依赖——纯 REST API
|
||||
|
||||
## 凭证获取
|
||||
|
||||
本技能需要百度地图 AK(访问令牌):
|
||||
|
||||
1. 访问 [百度地图开放平台](https://lbsyun.baidu.com/) 注册开发者账号
|
||||
2. 控制台 → 应用管理 → 创建应用(启用"地点检索"服务,AK 类型选"浏览器白名单"并将白名单留空 `0.0.0.0/0`)
|
||||
3. 将 AK 配置为环境变量 `BAIDU_MAP_AK`,或替换下文命令中的 `{BAIDU_MAP_AK}` 占位符
|
||||
|
||||
> 若本机 DesireCore 服务目录已注册百度地图服务(端点 `https://api.map.baidu.com`),优先通过服务目录调用,凭证由服务配置统一管理。
|
||||
|
||||
## L2 操作步骤
|
||||
|
||||
### 1. 构造请求
|
||||
|
||||
```bash
|
||||
curl -s --max-time 15 --ssl-no-revoke \
|
||||
"https://api.map.baidu.com/place/v2/search?query={企业名称URL编码}®ion={城市或全国}&output=json&page_size=20&ak=${BAIDU_MAP_AK}"
|
||||
```
|
||||
|
||||
**参数说明**:
|
||||
|
||||
| 参数 | 值 | 说明 |
|
||||
|---|---|---|
|
||||
| query | 企业名称(URL 编码) | 如"华为技术有限公司"→ `%E5%8D%8E%E4%B8%BA%E6%8A%80%E6%9C%AF%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8` |
|
||||
| region | 城市名或"全国" | 限定检索范围;不确定时用"全国" |
|
||||
| output | json | 固定 |
|
||||
| page_size | 20 | 每页条数(最大 20) |
|
||||
| ak | `{BAIDU_MAP_AK}` | 百度地图 AK(个人开发者免费申请) |
|
||||
|
||||
### 2. 判断响应
|
||||
|
||||
- `status == 0`:成功,提取 `results[]`
|
||||
- `status != 0`:失败,查看 `message`(如 101=AK参数不存在,200=AK被禁用,302=配额超限)
|
||||
|
||||
### 3. 标准化映射
|
||||
|
||||
对 `results[]` 中每条记录映射为:
|
||||
|
||||
```json
|
||||
{
|
||||
"source": "baidu-poi",
|
||||
"company_name": "{用户输入的企业名称}",
|
||||
"poi_name": "{result.name}",
|
||||
"address": "{result.address}",
|
||||
"latitude": "{result.location.lat}",
|
||||
"longitude": "{result.location.lng}",
|
||||
"province": "{result.province}",
|
||||
"city": "{result.city}"
|
||||
}
|
||||
```
|
||||
|
||||
### 4. 同名词过滤(尽调场景)
|
||||
|
||||
POI 结果可能包含同名词干扰(如"南岗华为公司"不是"华为技术有限公司")。过滤建议:
|
||||
|
||||
- 精确匹配:`result.name` 与企业全名一致 → 标记 `match=exact`
|
||||
- 包含匹配:`result.name` 包含企业全名或其简称 → 标记 `match=partial`
|
||||
- 其他 → 标记 `match=related`,尽调报告单独归类
|
||||
|
||||
### 5. 输出格式
|
||||
|
||||
```json
|
||||
{
|
||||
"query_status": "success",
|
||||
"source": "baidu-poi",
|
||||
"total": 5,
|
||||
"results": [
|
||||
{ "poi_name": "华为技术有限公司", "address": "广东省深圳市龙岗区...", "latitude": "22.656137", "longitude": "114.066131", "match": "exact" }
|
||||
],
|
||||
"timestamp": "2026-08-31T21:00:00+08:00"
|
||||
}
|
||||
```
|
||||
|
||||
## 已知限制
|
||||
|
||||
- 免费配额:个人开发者有 QPS(约 3 次/秒)与日量上限(地点检索约 100 次/日,以控制台额度管理为准)
|
||||
- POI ≠ 工商注册地址:返回的是地图标注地址,可能与工商注册地址不同(尽调时注意区分)
|
||||
- 同名词:知名企业简称(如"华为")会命中大量非目标 POI,建议输入企业全名
|
||||
|
||||
## 故障排查
|
||||
|
||||
| 错误码 | 含义 | 处理 |
|
||||
|---|---|---|
|
||||
| 0 | 成功 | — |
|
||||
| 101 | AK 参数不存在 | 检查 ak 参数是否正确传递 |
|
||||
| 200 | AK 被禁用 | 到百度地图开放平台控制台检查应用状态 |
|
||||
| 201 | AK 校验失败 / SN 校验失败 | 本方案使用白名单 0.0.0.0/0 类型 AK,无需 SN |
|
||||
| 302 | 配额超限 | 查看控制台额度管理,等待次日或升级配额 |
|
||||
| 240 | API 服务无效 | AK 未勾选"地点检索"服务——到控制台修改应用勾选 |
|
||||
74
skills/baidu-poi-search/catalog-metadata.v1.json
Normal file
74
skills/baidu-poi-search/catalog-metadata.v1.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "../../schemas/catalog-metadata.v1.schema.json",
|
||||
"schemaVersion": 1,
|
||||
"identity": {
|
||||
"kind": "skill",
|
||||
"id": "baidu-poi-search"
|
||||
},
|
||||
"presentation": {
|
||||
"defaultLocale": "en-US",
|
||||
"i18n": {
|
||||
"zh-CN": {
|
||||
"name": "百度地图POI搜索",
|
||||
"summary": "输入企业名称,返回 POI 名称/地址/经纬度/分支机构",
|
||||
"description": "百度地图企业 POI 搜索——输入企业名称,返回 POI 名称/地址/经纬度/分支机构。Use when 用户提到\"查企业地址\"、\"查公司位置\"、\"POI搜索\"、\"企业地图\"、\"经纬度\"、\"查分支机构\"、\"百度地图\"、\"企业网点\"、\"周边企业\"。"
|
||||
},
|
||||
"en-US": {
|
||||
"name": "Baidu Map POI Search",
|
||||
"summary": "Enterprise POI lookup by company name — name, address, coordinates, branches",
|
||||
"description": "Baidu Map enterprise POI search — input a company name and return POI name, address, latitude/longitude, and branch listings. Use when the user asks to look up a company address, location, POI, enterprise map, coordinates, branches, or nearby companies."
|
||||
}
|
||||
},
|
||||
"category": "data",
|
||||
"tags": [
|
||||
"due-diligence",
|
||||
"baidu-map",
|
||||
"poi",
|
||||
"geolocation"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"state": "known",
|
||||
"version": "1.0.0",
|
||||
"versionScheme": "semver"
|
||||
},
|
||||
"timestamps": {
|
||||
"catalogUpdatedAt": {
|
||||
"state": "known",
|
||||
"value": "2026-09-03T05:45:00Z",
|
||||
"precision": "second"
|
||||
},
|
||||
"releasePublishedAt": {
|
||||
"state": "unknown"
|
||||
},
|
||||
"reviewedAt": {
|
||||
"state": "unknown"
|
||||
},
|
||||
"upstreamObservedAt": {
|
||||
"state": "unknown"
|
||||
}
|
||||
},
|
||||
"provenance": {},
|
||||
"governance": {
|
||||
"stewardship": "official",
|
||||
"availability": "installable",
|
||||
"license": {
|
||||
"state": "unknown"
|
||||
},
|
||||
"redistribution": "verify-package-terms",
|
||||
"listingMaintainer": {
|
||||
"name": "DesireCore Official",
|
||||
"verified": true
|
||||
}
|
||||
},
|
||||
"compatibility": {
|
||||
"platforms": {
|
||||
"state": "unknown"
|
||||
},
|
||||
"requiredClientVersion": "10.0.115"
|
||||
},
|
||||
"spec": {
|
||||
"kind": "skill",
|
||||
"riskLevel": "low"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user