$npx -y skills add kansoku-trade/kansoku --skill gdeltGlobal multilingual news event stream with tone scoring via GDELT 2.0 Doc API.
| 1 | # gdelt |
| 2 | |
| 3 | > Response language: match user input. |
| 4 | |
| 5 | > ⚠️ **GDELT is a rolling recent-window API**, not a historical event archive. |
| 6 | > Time windows are anchored to absolute timestamps (UTC) for reproducibility — |
| 7 | > the same query asked tomorrow will return different results. |
| 8 | > |
| 9 | > ⚠️ **5-second throttle** between requests (enforced). Plan batches accordingly. |
| 10 | |
| 11 | ## When to use |
| 12 | |
| 13 | Trigger phrases: |
| 14 | |
| 15 | - 全球新闻 / 全球事件 / 多语种新闻 |
| 16 | - 媒体 tone / sentiment trend / 国际关系 |
| 17 | - geopolitical / event tone |
| 18 | - GDELT |
| 19 | |
| 20 | Useful for "what is the world saying about X right now" — i.e. retrieving |
| 21 | articles from non-English / non-financial sources that don't surface in |
| 22 | Longbridge's curated newsfeed. |
| 23 | |
| 24 | ## Workflow |
| 25 | |
| 26 | 1. Build a query in GDELT DSL (the user's term, optionally with operators like |
| 27 | `domain:bloomberg.com`, `sourcelang:eng`). |
| 28 | 2. Pick a mode: |
| 29 | - `artlist` — list of articles (default). |
| 30 | - `timelinetone` — per-15-min tone time series (-10 = very negative, |
| 31 | +10 = very positive). |
| 32 | - `timelinevol` / `timelinevolinfo` — article volume over time. |
| 33 | - `tonechart` — tone histogram. |
| 34 | 3. Specify the window — prefer `--start`/`--end` (absolute), fall back to |
| 35 | `--timespan`. The script converts relative timespans to absolute timestamps |
| 36 | before the call and echoes them in `meta.window` so the journal can be |
| 37 | re-run. |
| 38 | |
| 39 | ## CLI examples |
| 40 | |
| 41 | ```bash |
| 42 | # Articles about Nvidia in the last 24h |
| 43 | python3 .claude/skills/gdelt/scripts/doc.py "Nvidia" |
| 44 | |
| 45 | # 7-day window, English + Chinese articles about TSMC |
| 46 | python3 .claude/skills/gdelt/scripts/doc.py "TSMC OR \"Taiwan Semiconductor\"" --timespan 7d --lang eng,zho |
| 47 | |
| 48 | # Tone timeline for Federal Reserve over 30 days |
| 49 | python3 .claude/skills/gdelt/scripts/doc.py "Federal Reserve" --mode timelinetone --timespan 30d |
| 50 | |
| 51 | # Absolute window |
| 52 | python3 .claude/skills/gdelt/scripts/doc.py "AI chips" --start 20260501000000 --end 20260528000000 |
| 53 | ``` |
| 54 | |
| 55 | ## Output shape (artlist) |
| 56 | |
| 57 | ```json |
| 58 | { |
| 59 | "data": [ |
| 60 | { |
| 61 | "url": "https://...", |
| 62 | "title": "...", |
| 63 | "seendate": "20260527T161500Z", |
| 64 | "domain": "...", |
| 65 | "language": "English", |
| 66 | "sourcecountry": "United States", |
| 67 | "socialimage": "..." |
| 68 | } |
| 69 | ], |
| 70 | "meta": { |
| 71 | "mode": "artlist", |
| 72 | "query": "Nvidia", |
| 73 | "window": { "start": "20260527071804", "end": "20260528071804" }, |
| 74 | "max_records": 75 |
| 75 | }, |
| 76 | "ok": true |
| 77 | } |
| 78 | ``` |
| 79 | |
| 80 | ## Output shape (timelinetone) |
| 81 | |
| 82 | ```json |
| 83 | { |
| 84 | "ok": true, |
| 85 | "data": [ |
| 86 | {"date": "20260520T000000Z", "value": 1.42}, |
| 87 | {"date": "20260520T001500Z", "value": 1.05}, |
| 88 | ... |
| 89 | ], |
| 90 | "meta": {"mode": "timelinetone", ...} |
| 91 | } |
| 92 | ``` |
| 93 | |
| 94 | ## Error handling |
| 95 | |
| 96 | | Exit code | Meaning | LLM action | |
| 97 | | --------- | --------------------------------------- | ------------------------------------------------------------------------------------ | |
| 98 | | 0 | Success | Parse `data`. | |
| 99 | | 1 | Invalid args (e.g. bad timespan / lang) | Read `hint`. | |
| 100 | | 3 | HTTP 4xx / non-JSON response | If body contains "Please limit requests", the throttle was tripped — wait and retry. | |
| 101 | | 4 | Network | Suggest retry. | |
| 102 | |
| 103 | ## Known limitations |
| 104 | |
| 105 | - 5-second minimum between requests; batch tone + artlist queries must be |
| 106 | sequenced. |
| 107 | - `--max-records` cap is 250. |
| 108 | - GDELT's tone metric is a heuristic — useful for direction-of-narrative, not |
| 109 | ground truth. |
| 110 | - Results are not cached (window-sensitive). |
| 111 | |
| 112 | ## Related skills |
| 113 | |
| 114 | - `longbridge-news` for curated equity-specific newsfeed (Chinese-language UX). |
| 115 | - `sec-edgar` for primary-source filings as the contrast to media narrative. |
| 116 | - `fred` for macro data referenced in the narrative. |