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,228 @@
---
name: cnipa-patent-search
description: >-
国家知识产权局专利检索——输入企业名称(作为申请人),返回专利列表(申请号/申请日/发明名称/专利类型/专利状态/主分类号/申请人/发明人/公开号/公开日/代理机构。Use when 用户提到"查专利"、"知识产权"、"专利检索"、"专利申请"、"cnipa"、"pss-system"、"发明"、"实用新型"、"外观设计"、"专利状态"。
version: 1.0.0
type: procedural
risk_level: medium
status: enabled
tags:
- due-diligence
- patent
- cnipa
- intellectual-property
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: 登录态检索 pss-system返回企业专利列表申请号/类型/状态等)
description: >-
国家知识产权局专利检索——输入企业名称(作为申请人),返回专利列表(申请号/申请日/发明名称/专利类型/专利状态/主分类号/申请人/发明人/公开号/公开日/代理机构。Use when 用户提到"查专利"、"知识产权"、"专利检索"、"专利申请"、"cnipa"、"pss-system"、"发明"、"实用新型"、"外观设计"、"专利状态"。
body: ./SKILL.zh-CN.md
source_hash: sha256:08c8cb6ca63c6dd9
translated_by: human
en-US:
name: CNIPA Patent Search
short_desc: Logged-in pss-system patent search by applicant company name
description: >-
CNIPA patent search — input a company name (as applicant) and return a patent list (application number / date / title / type / status / main class / applicant / inventors / publication). Use when the user asks about patents, intellectual property, patent applications, cnipa, pss-system, inventions, utility models, or designs.
body: ./SKILL.md
source_hash: sha256:08c8cb6ca63c6dd9
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="M9 18h6M10 21h4" stroke="#34C759" stroke-width="1.6" stroke-linecap="round"/><path d="M12 3a6.5 6.5 0 0 0-3.5 12c.6.45 1 1.15 1 1.9V18h5v-1.1c0-.75.4-1.45 1-1.9A6.5 6.5 0 0 0 12 3Z" stroke="#FFCC00" stroke-width="1.6" stroke-linejoin="round"/></svg>
category: business
maintainer:
name: DesireCore Official
verified: true
compatible_agents: []
channel: latest
required_client_version: 10.0.115
---
# CNIPA Patent Search
## L0: One-Sentence Summary
Input a company name, drive the CNIPA pss-system patent search via Kimi WebBridge browser automation, and return a structured patent list.
## L1: Overview
- **Data source**: CNIPA Patent Search and Analysis System (`pss-system.cponline.cnipa.gov.cn`)
- **Auth**: logged-in account (**registration required** — anonymous search redirects to login)
- **Invocation**: Kimi WebBridge browser automation (navigate + evaluate + CDP insertText)
- **Prerequisites**:
- Kimi WebBridge daemon running
- the user has **logged into pss-system** in the browser (login persists; log in once and reuse)
## Account Registration
pss-system requires real-name registration (phone + SMS):
1. Open `https://pss-system.cponline.cnipa.gov.cn/` in the browser
2. Click "注册" and complete real-name registration
3. Log in once — the browser keeps the session for later automation
## L2: Procedure
### 1. Check the WebBridge daemon
```bash
~/.kimi-webbridge/bin/kimi-webbridge.exe status
```
If down or disconnected, start it: `kimi-webbridge.exe start`.
### 2. Navigate to pss-system
Write `C:\tmp\cnipa-nav.json`:
```json
{
"action": "navigate",
"args": {
"url": "https://pss-system.cponline.cnipa.gov.cn/",
"newTab": true,
"group_title": "专利检索"
},
"session": "cnipa-patent"
}
```
```bash
curl.exe -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
--data-binary "@C:\tmp\cnipa-nav.json" --max-time 30
```
Wait 5 seconds.
### 3. Confirm login, accept the disclaimer, enter search
Write `C:\tmp\cnipa-agree.json`:
```json
{
"action": "evaluate",
"args": {
"code": "(async function(){var txt=document.body.innerText||'';var hasLogout=txt.includes('退出');if(txt.includes('免责声明')){var btns=document.querySelectorAll('button.el-button--primary');for(var b of btns){if((b.innerText||'').replace(/\\s+/g,'')==='同意'){b.click();break;}}await new Promise(function(r){setTimeout(r,4000);});}txt=document.body.innerText||'';return JSON.stringify({url:location.href.slice(0,80),isSearch:txt.includes('常规检索'),inputs:document.querySelectorAll('input').length,hasLogout:hasLogout});})()"
},
"session": "cnipa-patent"
}
```
**Login check**: if `hasLogout=false`, the user must log into pss-system in the browser first.
### 4. Focus the search box + CDP input
Write `C:\tmp\cnipa-focus.json`:
```json
{
"action": "evaluate",
"args": {
"code": "(function(){for(var i of document.querySelectorAll('input')){if((i.placeholder||'').includes('请输入关键词')){i.value='';i.dispatchEvent(new Event('input',{bubbles:true}));i.focus();return 'focused';}}return 'not-found';})()"
},
"session": "cnipa-patent"
}
```
Then write `C:\tmp\cnipa-insert.json` (CDP real input, Vue-compatible):
```json
{
"action": "cdp",
"args": {
"method": "Input.insertText",
"params": { "text": "{company name}" }
},
"session": "cnipa-patent"
}
```
### 5. Click search + wait for results
Write `C:\tmp\cnipa-click.json`:
```json
{
"action": "evaluate",
"args": {
"code": "(async function(){var clicked=false;for(var el of document.querySelectorAll('div.btn')){if((el.innerText||'').replace(/\\s+/g,'')==='检索'){el.click();clicked=true;break;}}await new Promise(function(r){setTimeout(r,8000);});var tables=document.querySelectorAll('table').length;var rows=document.querySelectorAll('table tr').length;var hits=(document.body.innerText.match(/共[\\d,]+[条篇]/)||[])[0]||'';return JSON.stringify({clicked:clicked,url:location.href.slice(0,80),tables:tables,rows:rows,hits:hits});})()"
},
"session": "cnipa-patent"
}
```
### 6. Extract the result table
Write `C:\tmp\cnipa-table.json`:
```json
{
"action": "evaluate",
"args": {
"code": "(function(){var table=document.querySelector('table');if(!table)return JSON.stringify({err:'no-table'});var headers=[];table.querySelectorAll('thead th').forEach(function(th){headers.push((th.innerText||'').trim())});var rows=[];table.querySelectorAll('tbody tr').forEach(function(tr){var cells=[];tr.querySelectorAll('td').forEach(function(td){cells.push((td.innerText||'').trim().slice(0,60))});rows.push(cells)});return JSON.stringify({headers:headers,rowCount:rows.length,rows:rows});})()"
},
"session": "cnipa-patent"
}
```
### 7. Normalized mapping
```json
{
"query_status": "success",
"source": "cnipa",
"company_name": "{company name}",
"total_found": 1,
"patents": [
{
"patent_number": "202310104843.5",
"application_date": "2023.01.16",
"patent_name": "一种通信方法及装置",
"patent_type": "发明",
"patent_status": "实质审查的生效",
"main_class_code": "H04W72/54",
"applicant": "华为技术有限公司",
"applicant_address": "广东省深圳市",
"publication_number": "CN117834529A",
"publication_date": "2024.04.05"
}
],
"timestamp": "2026-08-31T21:00:00+08:00"
}
```
### 8. Close the session
```json
{
"action": "close_session",
"session": "cnipa-patent"
}
```
## Known Limitations
- **Login required**: anonymous searches redirect to login or silently fail (unstable behavior); logged-in sessions return results reliably
- **Session persistence**: browser cookies keep the login valid for a long time, but re-login may be needed after long idle periods
- **Vue compatibility**: real input must go through CDP `Input.insertText` (not DOM setters), otherwise the Vue autocomplete ignores the text
- **Pagination**: when results exceed 10, click the pager and extract each page
## Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Search click redirects to login | not logged in | log into pss-system in the browser |
| Search click does nothing | Vue event not triggered | confirm CDP insertText was used; check the login state |
| Table empty | async results loading | retry extraction after 8 s |
| Stuck on the disclaimer | agree button not clicked | re-run the evaluate that clicks 同意 |

View File

@@ -0,0 +1,178 @@
# 国家知识产权局专利检索
## L0
输入企业名称,通过 Kimi WebBridge 浏览器自动化操作 pss-system 专利检索系统,返回结构化专利列表。
## L1 概述
- **数据源**:国家知识产权局专利检索及分析系统(`pss-system.cponline.cnipa.gov.cn`
- **认证**:账号登录态(**必须先注册登录**——匿名检索会跳转登录页)
- **调用方式**Kimi WebBridge 浏览器自动化navigate + evaluate + CDP insertText
- **前置条件**
- Kimi WebBridge daemon 运行中
- 用户已在浏览器中**登录 pss-system 账号**(登录态长期有效,登录一次即可复用)
## 账号注册
pss-system 需实名注册(手机号 + 短信验证):
1. 浏览器访问 `https://pss-system.cponline.cnipa.gov.cn/`
2. 点击"注册"完成实名注册
3. 登录一次——登录态由浏览器保存,后续自动化复用
## L2 操作步骤
### 1. 检查 WebBridge daemon
```bash
~/.kimi-webbridge/bin/kimi-webbridge.exe status
```
若 daemon 未运行或扩展断开,启动:`kimi-webbridge.exe start`
### 2. 导航 pss-system
写入 `C:\tmp\cnipa-nav.json`
```json
{
"action": "navigate",
"args": {
"url": "https://pss-system.cponline.cnipa.gov.cn/",
"newTab": true,
"group_title": "专利检索"
},
"session": "cnipa-patent"
}
```
```bash
curl.exe -s -X POST "http://127.0.0.1:10086/command" \
-H "Content-Type: application/json" \
--data-binary "@C:\tmp\cnipa-nav.json" --max-time 30
```
等待 5 秒。
### 3. 确认登录态 + 同意声明 + 进入检索页
写入 `C:\tmp\cnipa-agree.json`
```json
{
"action": "evaluate",
"args": {
"code": "(async function(){var txt=document.body.innerText||'';var hasLogout=txt.includes('退出');if(txt.includes('免责声明')){var btns=document.querySelectorAll('button.el-button--primary');for(var b of btns){if((b.innerText||'').replace(/\\s+/g,'')==='同意'){b.click();break;}}await new Promise(function(r){setTimeout(r,4000);});}txt=document.body.innerText||'';return JSON.stringify({url:location.href.slice(0,80),isSearch:txt.includes('常规检索'),inputs:document.querySelectorAll('input').length,hasLogout:hasLogout});})()"
},
"session": "cnipa-patent"
}
```
**登录态判断**:若 `hasLogout=false`,说明未登录——需用户在浏览器中登录 pss-system 后重试。
### 4. 聚焦检索框 + CDP 真实输入
写入 `C:\tmp\cnipa-focus.json`
```json
{
"action": "evaluate",
"args": {
"code": "(function(){for(var i of document.querySelectorAll('input')){if((i.placeholder||'').includes('请输入关键词')){i.value='';i.dispatchEvent(new Event('input',{bubbles:true}));i.focus();return 'focused';}}return 'not-found';})()"
},
"session": "cnipa-patent"
}
```
执行后,写入 `C:\tmp\cnipa-insert.json`CDP 真实输入Vue 组件兼容):
```json
{
"action": "cdp",
"args": {
"method": "Input.insertText",
"params": { "text": "{企业名称}" }
},
"session": "cnipa-patent"
}
```
### 5. 点击检索 + 等待结果
写入 `C:\tmp\cnipa-click.json`
```json
{
"action": "evaluate",
"args": {
"code": "(async function(){var clicked=false;for(var el of document.querySelectorAll('div.btn')){if((el.innerText||'').replace(/\\s+/g,'')==='检索'){el.click();clicked=true;break;}}await new Promise(function(r){setTimeout(r,8000);});var tables=document.querySelectorAll('table').length;var rows=document.querySelectorAll('table tr').length;var hits=(document.body.innerText.match(/共[\\d,]+[条篇]/)||[])[0]||'';return JSON.stringify({clicked:clicked,url:location.href.slice(0,80),tables:tables,rows:rows,hits:hits});})()"
},
"session": "cnipa-patent"
}
```
### 6. 提取表格数据
写入 `C:\tmp\cnipa-table.json`
```json
{
"action": "evaluate",
"args": {
"code": "(function(){var table=document.querySelector('table');if(!table)return JSON.stringify({err:'no-table'});var headers=[];table.querySelectorAll('thead th').forEach(function(th){headers.push((th.innerText||'').trim())});var rows=[];table.querySelectorAll('tbody tr').forEach(function(tr){var cells=[];tr.querySelectorAll('td').forEach(function(td){cells.push((td.innerText||'').trim().slice(0,60))});rows.push(cells)});return JSON.stringify({headers:headers,rowCount:rows.length,rows:rows});})()"
},
"session": "cnipa-patent"
}
```
### 7. 标准化映射
```json
{
"query_status": "success",
"source": "cnipa",
"company_name": "{企业名称}",
"total_found": 1,
"patents": [
{
"patent_number": "202310104843.5",
"application_date": "2023.01.16",
"patent_name": "一种通信方法及装置",
"patent_type": "发明",
"patent_status": "实质审查的生效",
"main_class_code": "H04W72/54",
"applicant": "华为技术有限公司",
"applicant_address": "广东省深圳市",
"publication_number": "CN117834529A",
"publication_date": "2024.04.05"
}
],
"timestamp": "2026-08-31T21:00:00+08:00"
}
```
### 8. 关闭会话
```json
{
"action": "close_session",
"session": "cnipa-patent"
}
```
## 已知限制
- **必须登录态**:匿名状态下点击检索会跳转 login 页或静默无响应(行为不稳定);登录态下检索正常返回结果
- **登录态会话保持**:浏览器登录 pss-system 后 cookie 长期有效WebBridge 会话可复用——但长时间未操作后可能需要重新登录
- **Vue 组件兼容性**:必须用 CDP `Input.insertText` 真实输入(非 DOM setter否则 Vue 下拉联想组件不接收文本
- **翻页**:结果超过 10 条时,点击页面分页按钮翻页,提取每页表格数据
## 故障排查
| 问题 | 原因 | 处理 |
|---|---|---|
| 点击检索后 URL 跳转到 login | 未登录 | 用户在浏览器中登录 pss-system |
| 点击检索后无响应 | Vue 事件未触发 | 确认用 CDP insertText 输入了检索词;检查登录态是否有效 |
| 表格为空 | 结果异步加载中 | 等待 8 秒后重新提取表格 |
| "免责声明"页卡住 | 同意按钮未点击成功 | 重新执行 evaluate 点击同意按钮 |

View File

@@ -0,0 +1,74 @@
{
"$schema": "../../schemas/catalog-metadata.v1.schema.json",
"schemaVersion": 1,
"identity": {
"kind": "skill",
"id": "cnipa-patent-search"
},
"presentation": {
"defaultLocale": "en-US",
"i18n": {
"zh-CN": {
"name": "知识产权局专利检索",
"summary": "登录态检索 pss-system返回企业专利列表申请号/类型/状态等)",
"description": "国家知识产权局专利检索——输入企业名称(作为申请人),返回专利列表(申请号/申请日/发明名称/专利类型/专利状态/主分类号/申请人/发明人/公开号/公开日/代理机构。Use when 用户提到\"查专利\"、\"知识产权\"、\"专利检索\"、\"专利申请\"、\"cnipa\"、\"pss-system\"、\"发明\"、\"实用新型\"、\"外观设计\"、\"专利状态\"。"
},
"en-US": {
"name": "CNIPA Patent Search",
"summary": "Logged-in pss-system patent search by applicant company name",
"description": "CNIPA patent search — input a company name (as applicant) and return a patent list (application number / date / title / type / status / main class / applicant / inventors / publication). Use when the user asks about patents, intellectual property, patent applications, cnipa, pss-system, inventions, utility models, or designs."
}
},
"category": "business",
"tags": [
"due-diligence",
"patent",
"cnipa",
"intellectual-property"
]
},
"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": "medium"
}
}