CommunityResearch & Data Analysisgithub.com

Alexxiang2008/hlzd-b2b-export-skills

Agent skills for B2B industrial exporters — market research (HS codes, UN Comtrade, Google Trends, tenders), buyer discovery (Alibaba + Volza customs), inquiry qualification, and voice-contract HTML reports. By HLZD.

What is hlzd-b2b-export-skills?

This skill automates the entire B2B industrial export research pipeline for AI agents like Claude Code, Cursor, or Codex. It helps exporters answer three critical questions — 'What to sell? Where to sell? To whom?' — within 30 seconds by running four data steps: HS code lookup, import market sizing via UN Comtrade, demand trend analysis via Google Trends, and real buyer discovery via DuckDuckGo search. The skill is designed for industrial products (e.g., OCTG casing, container houses), not consumer goods. It supports multiple target markets in parallel (e.g., UAE, Saudi, Nigeria), generates structured JSON and Markdown reports, and includes built-in red-flag handling for API rate limits and empty results. It works entirely without an LLM for data extraction (using deterministic rules) and only uses LLM for final report polish. Key scripts include `hs_lookup.py`, `trade_data.py`, `keyword_trends.py`, `buyer_search.py`, and the orchestrator `run_research.py`, all located in the `scripts/` directory.

Works with~Claude Code~Codex CLI~Cursor
npx skills add Alexxiang2008/hlzd-b2b-export-skills

Installed? Explore more Research & Data Analysis skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

HLZD B2B Industrial Overseas Research

Get the answers to "What to sell? Where to sell? To whom?" in under 30 seconds with 4 data segments: HS Code → Import Volume → Demand Heat → Real Buyers.


When to use

Invoke this Skill when the user:

  • Needs to sell an industrial product overseas and requires market size assessment + China's export position
  • Has several target markets (UAE / Saudi / Nigeria / Brazil…) and needs parallel research
  • Needs HS codes + regulatory conditions + export tax rebate rates
  • Needs real buyers from Google / LinkedIn (not suppliers on Alibaba / Made-in-China)
  • Needs to track government / World Bank / ADB project tenders
  • Needs to compile multiple research results into a client-ready report

Do NOT invoke this Skill when:

  • The user only wants a single data point (e.g., "today's USD exchange rate") — use a one-liner script instead
  • The user only wants LLM text generation (do not use as a prompt template)
  • The product is consumer goods (use hlzd-market-report instead)

How this skill is invoked

/hlzd-b2b-research "<product>" [markets...]

Individual sub-capabilities

TaskDirect Call
HS Codepy scripts/hs_lookup.py --keyword "oil casing"
Comtrade Trade Datapy scripts/trade_data.py --hs 730429 --reporter sa --period 2023
Google Trendspy scripts/keyword_trends.py --kw "OCTG pipe" "API 5CT" --geo US --delay 12
Buyer + Tenderspy scripts/buyer_search.py --query "container house mining" --market "Australia Africa" --tenders --max 30

Full pipeline (one-click report)

py scripts/run_research.py \
    --product "OCTG casing" \
    --markets "UAE Saudi" \
    --hs-candidate 730429 \
    --output-md report.md \
    --output-json report.json \
    --pretty

Sample output:

{
  "product": "OCTG casing",
  "markets": ["UAE", "Saudi"],
  "hs_code_used": "730429",
  "hs_code_candidates": [...],
  "trade_data": { "UAE": { ... }, "Saudi": { ... } },
  "trends": { "UAE": { ... }, "Saudi": { ... } },
  "buyers": { "UAE": { "total_buyers": 18, "buyers": [...] },
              "Saudi": { "total_buyers": 12, "buyers": [...] } },
  "warnings": []
}

The 4-step pipeline

                  ┌──────────────────┐
   product name ─→│  Step 1: HS Code  │ → 6-digit HS Code + regulatory conditions + rebate rate
                  └────────┬─────────┘
                           ↓
                ┌──────────────────────────┐
                │   per-market (loop)       │
                │                           │
                │  Step 2: UN Comtrade      │ → Total import value + China share ranking
                │  Step 3: Google Trends    │ → Average popularity + rising related terms
                │  Step 4: DDGS Buyer + Tenders | → Real buyer URLs + types
                └──────────────────────────┘
                           ↓
              ┌─────────────────────────┐
              │  Report (JSON + Markdown) │ → data-driven decision
              └─────────────────────────┘

Step 1 — HS Code Lookup (hs_lookup.py)

Data source: hsbianma.com (Chinese product name → full 10-digit HS code + regulatory conditions + rebate rate + status)

py scripts/hs_lookup.py --keyword "oil casing" --pages 2

Output fields:

[{
  "hs_code": "7304.29.10",
  "name": "oil casing",
  "unit": "kg",
  "rebate": "0",
  "regulation": "4,x",
  "expired": false
}]

The UN Comtrade API uses the first 6 digits of the HS code (e.g., 7304.29.10 → 730429).

Step 2 — UN Comtrade Market Size (trade_data.py)

Data source: UN Comtrade API (comtradeapi.un.org), free, no API key required

py scripts/trade_data.py --hs 730429 --reporter sa --period 2023 --output data.json

Common country abbreviations: us / ae / sa / ng / za / au / br / mx / cn / world

Output fields (JSON):

{
  "hs_code": "730429",
  "reporter": "sa",
  "total_import_value_usd": 1234567890.0,
  "data_source": "UN Comtrade",
  "countries": [
    { "country": "China", "import_value_usd": 5e8, "share_pct": 41.7 },
    { "country": "Japan", "import_value_usd": 3e8, "share_pct": 25.0 }
  ]
}

Key interpretation:

  • Total import value > $100 million → Large market
  • China share > 30% → Room to enter but fierce competition
  • China share < 10% → High entry opportunity but certification breakthrough required

Step 3 — Google Trends Demand Heat (keyword_trends.py)

Data source: Google Trends (pytrends), free

py scripts/keyword_trends.py --kw "OCTG pipe" "API 5CT casing" --geo US --delay 12

⚠️ 429 Rate limit protection: A minimum interval of ≥12 seconds between each keyword query; if 429 is triggered, wait 90 seconds and retry up to 3 times.

Output fields:

{
  "keyword": "OCTG pipe",
  "interest_over_time": { "<date>": 65, ... },
  "related_queries": [ { "query": "API 5CT", "value": "+250%" } ],
  "interest_by_region": { "Saudi Arabia": 100, "UAE": 85 }
}

Step 4 — DDGS Buyers + Tender Information (buyer_search.py)

Data source: DuckDuckGo (ddgs package), free, no API key

py scripts/buyer_search.py \
    --query '"OCTG casing"' --market "Saudi Arabia UAE Nigeria" \
    --max 30 --tenders --delay 4

Buyer type classification:

TypeKeywordsValue
Mining/Oilfield Campmining / oilfield / campPrimary buyer, bulk purchasing
EPC/General ContractorEPC / contractor / turnkeyProject-driven, long decision chain
Government/NGOgovernment / World Bank / ADBLarge orders, compliance required
Traderimporter / trading houseIntermediary channel, quick volume
Hotel/Tourismhotel / resort / glampingStable demand
Oil Equipment SupplierOCTG / API 5CT / line pipeSpecialized category

Built-in filtering rules (automatically skip supplier pages):

  • ❌ alibaba / made-in-china / globalsources / ec21
  • ❌ "shipping container" (often mismatched for container house products)
  • ❌ "door casing" (often mismatched for casing products in construction)

Output schema

Full pipeline output (run_research.py):

{
  "$schema": "hlzd/b2b-research/v1",
  "product": "<original product name>",
  "markets": ["<market1>", "<market2>", ...],
  "hs_code_used": "<final 6-digit HS>",
  "hs_code_candidates": [ {...}, ... ],
  "trade_data": {
    "<market>": {
      "hs_code": "...",
      "reporter": "...",
      "total_import_value_usd": 0.0,
      "data_source": "UN Comtrade",
      "countries": [ { "country": "...", "import_value_usd": 0.0, "share_pct": 0.0 }, ... ]
    }
  },
  "trends": {
    "<market>": {
      "keyword": "...",
      "geo": "...",
      "interest_over_time": null or { ... },
      "related_queries": [ ... ],
      "interest_by_region": null or { ... },
      "error": null or "<error msg>"
    }
  },
  "buyers": {
    "<market>": {
      "total_buyers": 0,
      "total_tenders": 0,
      "buyers": [ { "title": "...", "url": "...", "snippet": "...", "buyer_type": "..." } ],
      "tenders": [ ... ]
    }
  },
  "warnings": [ "<step>:<market>: <reason>", ... ]
}

JSON output goes to report.json, Markdown report goes to report.md.


Sample outputs

See assets/sample-outputs/ (real historical research, anonymized).


Red-flag handling

RiskResponse
UN Comtrade 0 recordsCheck HS code / year; try reporter=world
Pytrends 429 rate limitAuto wait 90 seconds and retry 3 times; continue running other steps
Pytrends data partialNormal (Google marks partial for low-traffic terms)
DDGS returns 0 resultsChange quoted phrase keywords; check ddgs package version
hsbianma.com access failureSwitch to volza.com / China Customs Code Center
Seller data authenticityAlways cross-check buyer's official website + LinkedIn

Related Skills

              ┌────────────────────────────┐
              │  hlzd-buyer-finder         │  (W2-3 upgrade in progress)
              │  Find real importers from   │
              │  customs data              │
              └────────────────────────────┘
                          │ connection
                          ▼
              ┌────────────────────────────┐
              │  ★ hlzd-b2b-research ★    │  ← This Skill
              │  4-step pipeline report    │
              └────────────────────────────┘
                          │
        ┌─────────────────┼─────────────────┐
        ▼                 ▼                 ▼
  hlzd-cold-outreach  hlzd-inquiry-     hlzd-market-report
  (Write emails using  qualify           (HTML report rendering)
   buyer list)        (Score inbound
                       inquiries)

Prerequisites: None (first step) Successors: hlzd-buyer-finder / hlzd-cold-outreach / hlzd-inquiry-qualify / hlzd-market-report


Boundaries & Limitations

  • This Skill is not a compliance ruling: Preliminary sanctions country screening is only in the final section of hlzd-inquiry-qualify
  • HS code suggestions: Automated crawling is only an initial assessment; for disputed goods, manually verify against China Customs Tariff / WCO HS Committee
  • Comtrade data lag: UN Comtrade data lags by approximately 1.5 years (latest is usually T-1 year)
  • DDGS capacity: Free version allows ~10 searches per day; limit control required for multi-market polling
  • LLM not enabled for extraction: All extraction follows deterministic rules; LLM is only used for final report copy polishing

Versioning

VersionDescription
0.1.0First release: 4 scripts + run_research orchestrator + lib.py (shared infrastructure)

See upgrade history in the repo root VERSIONS.md.


Crafted for B2B industrial exporters — HLZD Cross-Border AI Platform · 2026

Related Skills