trade_compliance

trade_compliance is a skill for Claude Code, Codex from fdueblab/Micro-Agent. It costs 0 tokens per session (650 once invoked), scanned A, original, MIT.

A set of rules for building models that check international trade compliance, such as sanctions-list screening, HS product-code classification, and document review. HS codes are standard numbers used to classify traded goods.

In plain words
What is it for?
Use it to design or implement screening, product classification, and cross-field checks for import and export documents.
Why use it?
It reduces unsupported compliance decisions by requiring evidence for matches, handling uncertain cases through human review, and checking incomplete or inconsistent documents.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design or implement screening, product classification, and cross-field checks for import and export documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fdueblab/micro-agent/trade_compliance
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fdueblab/Micro-Agent --skill trade_compliance
Clone the repo
git clone --depth 1 https://github.com/fdueblab/Micro-Agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trade_compliance

README.md
[![agentmods](https://agentmods.dev/badge/skills/fdueblab/micro-agent/trade_compliance/github.svg)](https://agentmods.dev/skills/fdueblab/micro-agent/trade_compliance)
Your own site
<a href="https://agentmods.dev/skills/fdueblab/micro-agent/trade_compliance"><img src="https://agentmods.dev/badge/skills/fdueblab/micro-agent/trade_compliance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trade_compliance

Your own site · 80×15
<a href="https://agentmods.dev/skills/fdueblab/micro-agent/trade_compliance"><img src="https://agentmods.dev/badge/skills/fdueblab/micro-agent/trade_compliance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 650 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00650
Opus 5.5 $0.00000 $0.00260
Sonnet 5.5 $0.00000 $0.00130
Haiku 4.5 $0.00000 $0.00065

Measured 22d ago against content hash 806fdca9583e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

trade_compliance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workspace/skills/trade_compliance/SKILL.md · 38 lines

What it actually says

你正在生成一个跨境贸易合规类算法模型(名单筛查/HS编码归类/单证审核等)。合规场景的红线与通用分类任务不同:

核心原则:宁缺毋滥 + 每条结论带依据

  1. 未命中必须返回 None/需人工:名单没匹配上、品类没识别出时,输出 None + "需人工处理",绝对禁止随机选编码或强行给结论——申报错误/漏放行的合规责任远大于自动化率
  2. 每条结论带依据:命中的关键词、名单条目、规则名必须写进 reason(审计追溯要求)
  3. 规则表与逻辑分离:HS_RULES/DOC_RULES/名单作为模块级常量,每条注明来源(监管文件/业务制度)

名单筛查:模糊匹配是核心技术

真实名单匹配从不全等(大小写/空格/别名/音译/缩写),必须标准化 + 分层匹配:

标准化:去标点 → 压空白 → 转大写 → 常见别名映射(CO LTD→COMPANY LIMITED)
匹配分层:全等(1.0) > 包含(0.9) > token重叠≥0.8(0.7+),超阈值即命中

禁止 name == list_entry 式全等匹配(真实数据几乎永远匹配不上)。

HS 编码归类:关键词规则 + 置信度分层

品名文本命中规则表关键词(可多个加权)→ 输出编码 + 置信度 + 命中关键词;未命中 → hs_code=None, confidence=0, reason="需人工归类"。

单证审核:规则引擎模式

跨字段一致性校验(币种一致/金额区间/必填字段),每条规则独立捕获字段缺失与类型错误(转为"该规则不通过"而非崩溃),输出 pass/reject + 未通过规则清单。

数据防御(单证数据脏值极普遍)

  • 金额字段:非数值、负数、科学计数法字符串都要防御
  • 币种缺失:降级 + 提示,禁止默认 USD
  • 多币种金额比较前先归一化(汇率快照注明日期)

评估与汇报

  • 匹配/归类任务:精确率与召回率并列(漏放行 vs 误拦截的业务代价不同,说明权衡)
  • 规则覆盖率/自动化率单独汇报:多少比例样本可自动判定、多少进入人工——这本身是核心业务指标
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago First seen · 38 lines · 0 tokens per session scan A 806fdca9583e

Subscribe to this mod's changes

trade_compliance is a skill published in the GitHub repository fdueblab/Micro-Agent (101 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 650 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-25.