← Back to Skills Marketplace
yonglie

海关贸易数据分析专家

by yonglie · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ Security Clean
115
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install customsdata
Description
海关数据分析专家Skill — 提供海关进出口数据查询服务,支持按HS编码/产品名称、采购商、供应商进行多维度贸易数据分析
README (SKILL.md)

海关数据分析专家

基于海关进出口数据,提供多维度的贸易分析服务。通过调用后端API获取数据,支持三大类查询、14种分析维度。

配置

{
  "skills": {
    "entries": {
      "h_smtso_com": {
        "config": {
          "api_base_url": "https://h.smtso.com/skill/customs",
          "timeout": 30000
        }
      }
    }
  }
}
  • api_base_url: 海关数据API服务器地址(必填)
  • timeout: 请求超时时间,默认30000ms

国家代码

代码 国家
us 美国
cn 中国
jp 日本
gb 英国
de 德国
fr 法国
kr 韩国
in 印度
ca 加拿大
au 澳大利亚
br 巴西
mx 墨西哥
it 意大利
es 西班牙
nl 荷兰
be 比利时
pl 波兰
vn 越南
th 泰国
my 马来西亚
id 印尼
ph 菲律宾
ar 阿根廷
cl 智利
co 哥伦比亚
nz 新西兰
ae 阿联酋
tr 土耳其
il 以色列
za 南非

API 端点与参数

1. HS编码/产品名称查询

端点: POST {api_base_url}/queryHsCodeProductSkill

参数:

参数 必填 说明
dataarea 分析类型: 1=产品概览, 2=前十采购商, 3=客户分层, 4=国家渗透, 5=时间趋势
importercountrytag 进口国家代码,如 us, cn, jp
hs_code_product HS编码(前缀匹配)或产品名称(全文匹配)
StartDate 开始日期 YYYY-MM-DD
EndDate 结束日期 YYYY-MM-DD

返回数据字段:

  • PurchaseDetaiList: 采购明细列表
  • importer_count: 采购商数量
  • sum_amount: 总金额
  • purchase_product_count: 采购记录数
  • Top10ImporterList: 前十采购商列表
  • Top3ExporterList / Bottom3ExporterList: 供应商分层
  • Top5SalesCountryList: 前五销售国家
  • DatePurchaseList: 月度采购趋势

2. 采购商查询

端点: POST {api_base_url}/queryImporterSkill

参数:

参数 必填 说明
dataarea 1=概览, 2=采购行为, 3=供应商分析, 4=产品分布
importercountrytag 进口国家代码
importer 采购商/进口商名称
StartDate 开始日期
EndDate 结束日期

3. 供应商查询

端点: POST {api_base_url}/queryExporterSkill

参数:

参数 必填 说明
dataarea 1=概览, 2=出口记录, 3=客户分布, 4=产品类别, 5=时间趋势
importercountrytag 进口国家代码
exporter 供应商/出口商名称
StartDate 开始日期
EndDate 结束日期

使用方式

通过 fetch 调用 API

使用 Node.js fetchcurl 进行 POST 请求,Content-Type 为 application/x-www-form-urlencoded;charset=UTF-8

示例: 查询HS编码8517在美国的市场概览

curl -X POST "{api_base_url}/queryHsCodeProductSkill" \
  -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" \
  -d "dataarea=1&importercountrytag=us&hs_code_product=8517&StartDate=2025-01-01&EndDate=2025-12-31"

示例: 查询 Walmart 的采购行为分析

curl -X POST "{api_base_url}/queryImporterSkill" \
  -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" \
  -d "dataarea=2&importercountrytag=us&importer=Walmart&StartDate=2025-01-01&EndDate=2025-12-31"

使用 Python

import urllib.parse, urllib.request

data = urllib.parse.urlencode({
    "dataarea": "1",
    "importercountrytag": "us",
    "hs_code_product": "8517",
    "StartDate": "2025-01-01",
    "EndDate": "2025-12-31"
}).encode()

req = urllib.request.Request(f"{api_base_url}/queryHsCodeProductSkill", data=data)
resp = urllib.request.urlopen(req)
result = resp.read().decode()

条件与限制

  • 需要在配置中正确设置 api_base_url
  • 后端API必须是可达的HTTP服务
  • 返回数据格式为JSON
  • HS编码支持前缀匹配(如"8517"匹配所有8517开头的编码)
  • 产品名称支持全文匹配
  • 默认不设置日期时,自动查询近一年的数据
  • 默认国家为美国(us)
Usage Guidance
Treat this as an incomplete review, not a clean security assessment; the workspace read commands failed with `bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted`, so the skill should be rescanned where metadata.json and artifact/ are accessible.
Capability Assessment
Purpose & Capability
Not assessable from artifact contents because metadata.json and artifact/ could not be read in this run.
Instruction Scope
Not assessable from artifact contents because local command execution failed with a sandbox setup error before file reads ran.
Install Mechanism
Not assessable from artifact contents; no install spec or manifest could be inspected.
Credentials
Not assessable from artifact contents; no capability or runtime evidence was available.
Persistence & Privilege
Not assessable from artifact contents; no evidence of persistence or privilege use could be confirmed.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install customsdata
  3. After installation, invoke the skill by name or use /customsdata
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- 配置项中 skill key 从 ai_smtso_trade 更正为 h_smtso_com,确保命名一致性 - Skill 名称与描述微调,更突出“数据分析专家”定位 - 其余功能、API 使用方式及参数保持不变
v1.0.1
- Internal skill name changed from ai_smtso_trade to h_smtso_com. - No code or logic changes detected; functionality and API remain the same. - Documentation updated to reflect new skill name.
v1.0.0
Initial release of 海关贸易数据分析专家 (ai_smtso_trade): - Provides customs import/export data analytics with multi-dimensional trade analysis. - Supports queries by HS code/product name, importer, and exporter. - Offers 14 analysis dimensions across three main query types. - Includes API endpoint and parameter documentation for integration. - Lists standard country codes for global trade data. - Example usage provided for curl and Python. - Requires API base URL configuration and supports a default timeout setting.
Metadata
Slug customsdata
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is 海关贸易数据分析专家?

海关数据分析专家Skill — 提供海关进出口数据查询服务,支持按HS编码/产品名称、采购商、供应商进行多维度贸易数据分析. It is an AI Agent Skill for Claude Code / OpenClaw, with 115 downloads so far.

How do I install 海关贸易数据分析专家?

Run "/install customsdata" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 海关贸易数据分析专家 free?

Yes, 海关贸易数据分析专家 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 海关贸易数据分析专家 support?

海关贸易数据分析专家 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 海关贸易数据分析专家?

It is built and maintained by yonglie (@yonglie); the current version is v1.0.2.

💬 Comments