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:
joy1129-com
2026-09-03 14:05:58 +08:00
committed by GitHub
parent 43a8cbd549
commit c83f917901
21 changed files with 2668 additions and 8 deletions

View File

@@ -0,0 +1,154 @@
---
name: tianyancha-risk
description: >-
天眼查企业风险查询——输入企业名称,返回风险画像(自身风险/周边风险/历史风险/预警提醒含分类统计与明细。Use when 用户提到"查风险"、"企业风险"、"风险画像"、"司法风险"、"经营风险"、"开庭公告"、"裁判文书"、"被执行人"、"天眼查"。
version: 1.0.0
type: procedural
risk_level: low
status: enabled
tags:
- due-diligence
- risk
- tianyancha
- corporate
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: 天眼查企业风险查询
short_desc: 输入企业名称,返回自身/周边/历史/预警四类风险画像
description: >-
天眼查企业风险查询——输入企业名称,返回风险画像(自身风险/周边风险/历史风险/预警提醒含分类统计与明细。Use when 用户提到"查风险"、"企业风险"、"风险画像"、"司法风险"、"经营风险"、"开庭公告"、"裁判文书"、"被执行人"、"天眼查"。
body: ./SKILL.zh-CN.md
source_hash: sha256:b58091c7ef9e968e
translated_by: human
en-US:
name: Tianyancha Risk Query
short_desc: Enterprise risk profile by company name — self/related/historical/warning risk
description: >-
Tianyancha enterprise risk query — input a company name and return a structured risk profile (self risk / related-party risk / historical risk / early warnings, with category counts and details). Use when the user asks about enterprise risk, judicial risk, litigation announcements, court rulings, dishonest debtors, or Tianyancha.
body: ./SKILL.md
source_hash: sha256:b58091c7ef9e968e
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 3l7 2.8v5.4c0 4.5-3 8-7 9.8-4-1.8-7-5.3-7-9.8V5.8L12 3Z" stroke="#FF9500" stroke-width="1.6" stroke-linejoin="round"/><path d="M12 8.5v4" stroke="#FF3B30" stroke-width="1.8" stroke-linecap="round"/><circle cx="12" cy="15.5" r="1" fill="#FF3B30"/></svg>
category: business
maintainer:
name: DesireCore Official
verified: true
compatible_agents: []
channel: latest
required_client_version: 10.0.115
---
# Tianyancha Risk Query
## L0: One-Sentence Summary
Input a company name, call the Tianyancha risk-info API, and return a structured risk profile (self / related-party / historical / warning, four categories).
## L1: Overview
- **Data source**: Tianyancha Open Platform `risk/riskInfo/2.0`
- **Auth**: Token (`Authorization` header, **without** the `Bearer` prefix)
- **Invocation**: HTTP GET (curl / HttpRequest tool)
- **Prerequisites**: a valid Token with the risk API enabled
## Credential Setup
This skill requires a Tianyancha Open Platform Token:
1. Register an enterprise account at the [Tianyancha Open Platform](https://open.tianyancha.com/)
2. Purchase/enable an API package (`risk/riskInfo/2.0` is authorized per package tier)
3. Export the token as the environment variable `TIANYANCHA_TOKEN`, or replace the `{TIANYANCHA_TOKEN}` placeholder below
## L2: Procedure
### 1. Build the request
```bash
curl -s --max-time 30 --ssl-no-revoke \
"https://open.api.tianyancha.com/services/open/risk/riskInfo/2.0?keyword={company-name-URL-encoded}" \
-H "Authorization: ${TIANYANCHA_TOKEN}"
```
**Parameters**:
| Param | Value | Notes |
|---|---|---|
| keyword | Company name (URL-encoded) | e.g. `华为技术有限公司` |
| Authorization | `{TIANYANCHA_TOKEN}` | **Token in header, no `Bearer` prefix** (adding one returns 300009) |
### 2. Interpret the response
- `error_code == 0` and `reason == "ok"`: success, extract `result.riskList[]`
- `error_code == 300009`: account error — wrong token or a `Bearer` prefix was added
- `error_code == 300005`: no permission for this API — the token does not cover it
- `error_code == 300008`: missing parameter — check keyword
### 3. Response structure
`result` contains:
- `riskLevel`: overall risk level
- `riskList[]`: four risk categories (each with name / count / type / list[])
| Category | type | Meaning |
|---|---|---|
| Self risk | 1 | The company's own judicial/business risks (court hearings / rulings / case filings / court announcements / judicial auctions) |
| Related-party risk | 2 | Risks of shareholders, executives, invested companies |
| Historical risk | 3 | Closed historical risks (historical filings / hearings / dishonest-debtor history) |
| Early warnings | 0 | Business-registration changes (investor / key-personnel / registered-capital / legal-representative changes, bankruptcy cases) |
Each category's `list[]` holds sub-items with `title` (e.g. "开庭公告") / `total` / `tag` (warning / high-risk / info) / `list[]` (top details with id / title / desc / riskCount).
### 4. Normalized mapping
```json
{
"query_status": "success",
"source": "tianyancha",
"company_name": "{company name}",
"risk_level": "{result.riskLevel}",
"summary": {
"self_risk_count": 3127,
"related_risk_count": 1505,
"history_risk_count": 9113,
"warning_count": 815
},
"self_risks": [
{ "risk_type": "开庭公告", "count": 1501, "level": "警示", "title": "该公司起诉他人或公司的开庭公告", "detail_count": 1096 }
],
"timestamp": "2026-08-31T21:00:00+08:00"
}
```
### 5. Due-diligence highlights
Prioritize as follows when composing the report:
1. **High-risk entries** (tag=高风险): e.g. "被执行人", "清算信息", "失信被执行人" — list as major risk items
2. **Large warning counts** (total > 100): e.g. 1,501 hearing announcements — list as judicial-activity indicators
3. **Change warnings**: recent investor / legal-representative / capital changes — list as business dynamics
## Known Limitations
- **Tiered token authorization**: APIs are authorized per package; unauthorized APIs return 300005 — full-dimension packages unlock business/shareholder/IP endpoints
- **QPS throttling**: rate limits depend on the package; keep ≥1 s between calls
- **Large responses**: big companies can return 98KB+ — extract summaries plus top-N details to keep context small
## Troubleshooting
| Code | Meaning | Fix |
|---|---|---|
| 0 | Success | — |
| 300005 | No permission for this API | Confirm the endpoint is covered by your package |
| 300008 | Missing parameter | Check the keyword parameter |
| 300009 | Account error | Wrong token / Bearer prefix / expired token — remove the prefix and retry; if still failing, update the token |

View File

@@ -0,0 +1,106 @@
# 天眼查企业风险查询
## L0
输入企业名称,调用天眼查风险信息 API返回结构化风险画像自身/周边/历史/预警四类)。
## L1 概述
- **数据源**:天眼查开放平台 `risk/riskInfo/2.0`
- **认证**Token`Authorization` Header**不带 `Bearer` 前缀**
- **调用方式**HTTP GETcurl / HttpRequest 工具)
- **前置条件**Token 有效(需在天眼查开放平台开通对应接口权限)
## 凭证获取
本技能需要天眼查开放平台 Token
1. 访问 [天眼查开放平台](https://open.tianyancha.com/) 注册企业账号
2. 购买/开通接口套餐(风险信息接口 `risk/riskInfo/2.0` 按套餐分级授权)
3. 将 Token 配置为环境变量 `TIANYANCHA_TOKEN`,或替换下文命令中的 `{TIANYANCHA_TOKEN}` 占位符
## L2 操作步骤
### 1. 构造请求
```bash
curl -s --max-time 30 --ssl-no-revoke \
"https://open.api.tianyancha.com/services/open/risk/riskInfo/2.0?keyword={企业名称URL编码}" \
-H "Authorization: ${TIANYANCHA_TOKEN}"
```
**参数说明**
| 参数 | 值 | 说明 |
|---|---|---|
| keyword | 企业名称URL 编码) | 如"华为技术有限公司" |
| Authorization | `{TIANYANCHA_TOKEN}` | **Header 传 Token不带 `Bearer` 前缀**(带前缀返回 300009 |
### 2. 判断响应
- `error_code == 0``reason == "ok"`:成功,提取 `result.riskList[]`
- `error_code == 300009`账号信息有误——Token 错误或加了 Bearer 前缀
- `error_code == 300005`:无权限访问此 API——当前 Token 未授权该接口
- `error_code == 300008`:缺少必要参数——检查 keyword
### 3. 响应结构解析
`result` 包含两个字段:
- `riskLevel`:整体风险等级
- `riskList[]`:四类风险(每类含 name / count / type / list[]
四类风险:
| 类型 | type | 含义 |
|---|---|---|
| 自身风险 | 1 | 该企业自身的司法/经营风险(开庭公告/裁判文书/立案信息/法院公告/司法拍卖等) |
| 周边风险 | 2 | 关联方(股东/高管/投资企业)的风险 |
| 历史风险 | 3 | 已了结的历史风险(历史立案/历史开庭/被执行人_历史等 |
| 预警提醒 | 0 | 工商变更提醒(投资人变更/主要人员变更/注册资本变更/法定代表人变更/破产案件等) |
每类下 `list[]` 为子项,每子项含 `title`(如"开庭公告"/ `total`(条数)/ `tag`(警示/高风险/提示信息)/ `list[]`(前几条明细,含 id / title / desc / riskCount
### 4. 标准化映射
```json
{
"query_status": "success",
"source": "tianyancha",
"company_name": "{企业名称}",
"risk_level": "{result.riskLevel}",
"summary": {
"self_risk_count": 3127,
"related_risk_count": 1505,
"history_risk_count": 9113,
"warning_count": 815
},
"self_risks": [
{ "risk_type": "开庭公告", "count": 1501, "level": "警示", "title": "该公司起诉他人或公司的开庭公告", "detail_count": 1096 }
],
"timestamp": "2026-08-31T21:00:00+08:00"
}
```
### 5. 尽调要点提炼
输出报告时按以下优先级提炼:
1. **高风险条目**tag=高风险):如"被执行人"、"清算信息"、"失信被执行人"——直接列为重大风险项
2. **警示条目大额计数**total > 100如开庭公告 1501 条——列为司法活跃度指标
3. **预警变更**:近期投资人/法定代表人/注册资本变更——列为经营动态
## 已知限制
- **Token 分级授权**:接口按套餐授权,未授权接口返回 300005——购买全维度套餐后可扩展工商/股权/知产等接口
- **QPS 限流**:天眼查 API 按套餐有 QPS 限制,连续调用注意间隔(建议 ≥1 秒)
- **响应体量大**:大企业响应可达 98KB+,解析时注意内存与上下文压缩(只提取汇总+前 N 条明细)
## 故障排查
| 错误码 | 含义 | 处理 |
|---|---|---|
| 0 | 成功 | — |
| 300005 | 无权限访问此 API | 当前 Token 未授权该接口;确认调用的接口在授权范围内 |
| 300008 | 缺少必要参数 | 检查 keyword 参数 |
| 300009 | 账号信息有误 | Token 错误 / 加了 Bearer 前缀 / Token 过期——去掉前缀重试,仍失败则更新 Token |

View File

@@ -0,0 +1,74 @@
{
"$schema": "../../schemas/catalog-metadata.v1.schema.json",
"schemaVersion": 1,
"identity": {
"kind": "skill",
"id": "tianyancha-risk"
},
"presentation": {
"defaultLocale": "en-US",
"i18n": {
"zh-CN": {
"name": "天眼查企业风险查询",
"summary": "输入企业名称,返回自身/周边/历史/预警四类风险画像",
"description": "天眼查企业风险查询——输入企业名称,返回风险画像(自身风险/周边风险/历史风险/预警提醒含分类统计与明细。Use when 用户提到\"查风险\"、\"企业风险\"、\"风险画像\"、\"司法风险\"、\"经营风险\"、\"开庭公告\"、\"裁判文书\"、\"被执行人\"、\"天眼查\"。"
},
"en-US": {
"name": "Tianyancha Risk Query",
"summary": "Enterprise risk profile by company name — self/related/historical/warning risk",
"description": "Tianyancha enterprise risk query — input a company name and return a structured risk profile (self risk / related-party risk / historical risk / early warnings, with category counts and details). Use when the user asks about enterprise risk, judicial risk, litigation announcements, court rulings, dishonest debtors, or Tianyancha."
}
},
"category": "business",
"tags": [
"due-diligence",
"risk",
"tianyancha",
"corporate"
]
},
"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"
}
}