Trade Chokepoint
shamoilp/trade-chokepoint
Identifica gargalos reais em rotas comerciais e valida margens após custos totais
Ver no GitHubSkill Python para análise de cadeias de suprimento em operações de exportação/importação, identificando gargalos (chokepoints) e calculando custos reais de desembarque. Inclui scorer automático de viabilidade, suporte especializado para regimes comerciais indianos (CEPA/RoDTEP/BIS) e gera relatório PDF de decisão em 1 página.
Instalação
npx convez-ai shamoilp/trade-chokepoint1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Análise de viabilidade de novos lanes de importação/exportação
- Quantificação de custos desembarcados (landed cost) com riscos regulatórios
- Shortlist e comparação de múltiplas rotas comerciais para decisão go/no-go
Veredito

Ferramenta pragmática para traders e sourcing professionals que separa a análise de gargalos reais (oferta/demanda) da capturabilidade efetiva (margem pós-custos). Bem estruturada, sem dependências externas, funciona tanto como Claude Skill quanto CLI standalone — ideal para validação rápida de deals antes de commit de capital.
README
A tradução para o português deste README ainda está na fila.
trade-chokepoint
Screen export/import lanes by hunting supply-chain chokepoints. Durable trade margin doesn't come from generic buy-low-sell-high — it comes from owning a scarce layer in the chain that competitors can't easily replicate. This tool finds that layer, prices it against the fully landed cost, and scores it net of real trade risk.
It is an Agent Skill (works with Claude Code and compatible agent runtimes) and a standalone CLI you can run on its own. The method is adapted from the Serenity supply-chain bottleneck approach, re-pointed from stock-picking to physical trade — with landed-cost and customs/regulatory risk built in.
📄 Free 1-page PDF — "Should I Do This Deal?"
A simple, no-jargon checklist for new exporters and importers. Count the real cost, score the deal, decide yes / try small / wait / no — in 15 minutes, by hand.
⬇️ Download the free PDF (direct link for sharing on WhatsApp)
Free to share — MIT licensed.
Core idea
Separate two questions and never conflate them:
- Is there a real chokepoint? — scarcity that persists (certification, capacity, exclusivity, spec-lock).
- Can you capture it? — sourcing defensibility + margin that survives duty, VAT, freight, and finance.
A lane can have a genuine chokepoint you can't capture, and a capturable position too thin after landed cost. You need both legs.
Install (as a Claude Code skill)
git clone https://github.com/shamoilp/trade-chokepoint.git \
~/.claude/skills/trade-chokepoint
The skill then auto-triggers on prompts like "should I import X", "trade lane", "sourcing",
or "landed cost". See SKILL.md for the trigger definition and full workflow.
Use (as a CLI)
Requires Python 3.9+. No third-party runtime dependencies.
Score one lane — fill a copy of assets/trade-chokepoint-scorecard.json,
then:
python scripts/score_lane.py my-lane.json
Lane: EPOXY-IN-KSA (Wind-blade structural epoxy resin system (HS 3907.30))
Route: India -> Saudi Arabia (KSA)
Factors: +3.44 / 5.00
Penalties:+2.06 / 5.00
Net: +1.38
Verdict: WATCH - edge is thin or unproven; wait for a catalyst
Compare and shortlist several lanes:
python scripts/compare_lanes.py examples/ # all *.json in a folder
python scripts/compare_lanes.py examples/ --sort margin # rank by net|factors|penalties|margin
python scripts/compare_lanes.py examples/ --top 3 # shortlist the top N
python scripts/compare_lanes.py examples/ --md # markdown table to stdout
python scripts/compare_lanes.py examples/ --out memo.md # write a markdown deal memo
Flags compose: --sort margin --top 3 --out shortlist.md. --out defaults to markdown; add
--format plain for plain text.
How scoring works
Each lane is scored on 8 factors (the bull case) and 8 penalties (the bear case), 0–5 each,
weighted to sum to 1. net = weighted_factors − weighted_penalties.
| Factors | Penalties |
|---|---|
| demand inflection | working-capital lockup |
| chokepoint severity | geopolitics / sanctions |
| sourcing defensibility | regulatory clearance risk |
| substitution difficulty | compliance complexity |
| scaling difficulty | logistics fragility |
| margin arbitrage (vs landed cost) | counterparty reliability |
| evidence quality | FX volatility |
| catalyst timing | cyclicality / hype |
Verdict bands
| Net | Verdict |
|---|---|
| ≥ 2.5 | Commit — build a standing lane |
| 1.5–2.5 | Pilot — trial shipment, validate landed cost live |
| 0.5–1.5 | Watch — thin/unproven, wait for a catalyst |
| < 0.5 | Pass |
Gate discipline
The ranking tells you where the opportunity is; gates tell you whether a lane has earned the right to be acted on. A lane can rank #1 on net yet still carry gates — too few evidence points (< 2) or no pre-mortem (empty "what could weaken the view"). Resolve gates before committing capital, regardless of rank.
Worked examples
examples/ holds three lanes spanning the verdict range:
| Lane | Route | Net | Verdict | Why |
|---|---|---|---|---|
EXCIPIENT-IN-KSA | India → KSA | +2.64 | Commit | Formulation-locked; switching source forces an SFDA variation, so buyers are sticky |
EPOXY-IN-KSA | India → KSA | +1.38 | Watch | Real chokepoint, but SABER certification + working-capital lockup drag it down |
DATES-SA-IN | KSA → India | −0.10 | Pass | No chokepoint — everyone can source it, so crowding competes the margin away |
Same destination, opposite verdicts, for structural reasons. That's the whole thesis in one table.
India edition (export/import from India)
A localised pack for Indian exporters and importers, with the economics that actually move Indian trade wired in: export incentive schemes (RoDTEP, Duty Drawback, GST refund, Advance Auth/EPCG) that lift effective margin, FTA rules-of-origin (India–UAE CEPA, ECTA, India–UK FTA…) that can zero destination duty, GI-tagged origin-locked goods (Basmati, Darjeeling), and BIS/QCO certification on the import side.
| File | For |
|---|---|
assets/trade-chokepoint-scorecard-india.json | India-adapted scorecard (runs through the same scripts) |
assets/india-landed-cost-worksheet.md | Landed cost both directions, with scheme + FTA lines |
assets/india-lane-screener-onepager.md | Non-technical one-page tick-box screener (print to PDF) |
assets/india-lane-screener.csv | Import into Google Sheets — auto-computes net score + verdict |
examples/india-agrochem-uae.json | Worked India→UAE lane under CEPA (Pilot) |
The CSV is the easy on-ramp: in Google Sheets, File → Import → Upload, keep formulas, then just fill the Score (0–5) column — the weighted net and the verdict compute themselves.
Files
SKILL.md skill definition + workflow
assets/trade-chokepoint-scorecard.json base scoring template
assets/trade-thesis-template.md base lane memo + landed-cost worksheet
assets/*-india.* India edition (scorecard, worksheet, one-pager, CSV)
scripts/score_lane.py single-lane weighted net + verdict
scripts/compare_lanes.py multi-lane ranking (--sort/--top/--md/--format/--out)
examples/ four worked lanes (incl. India CEPA lane)
tests/ pytest suite
Tests
pip install pytest pytest-cov # pytest-cov optional, for coverage
pytest # 58 tests; pytest.ini scopes discovery to tests/
pytest --cov=scripts --cov-report=term-missing
58 tests, 99% line coverage (the only uncovered lines are the __main__ script guards).
Caveats
- The weights and verdict thresholds are judgment, not empirical. After scoring 5–10 real lanes against actual outcomes, revisit them — that's when this becomes genuinely yours.
- This is research and screening support, not customs/legal/tax advice on a specific consignment. Confirm classification, licensing (e.g. KSA SABER/SASO, India BIS/FSSAI), and treaty relief with a qualified advisor before committing capital.
- High test coverage proves every line runs, not that the rubric is right. Don't let a green number — or a high net score — talk you past an open gate.