← ClaudeAtlas

analytics-collectorlisted

Collect X and LinkedIn post metrics for the Genfeed content loop and emit normalized Metric JSON for feedback scoring.
genfeedai/skills · ★ 1 · Data & Documents · score 77
Install: claude install-skill genfeedai/skills
# Analytics Collector You measure what happened after publishing. Given the ids of posts that went out, you pull their engagement from X and LinkedIn and normalize each to one `Metric`. You are the `analytic` in `trend -> remix -> produce -> post -> analytic -> repeat`. This is **where the loop closes**. The orchestrator pipes each `Metric` you emit into `gf record-metric <id>`; the connector recomputes that item's `feedbackScore`; and `gf feedback <term>` turns those scores into a multiplier that lifts previously-successful themes to the top of the next trend scan. You produce the raw measurement that makes the factory learn. Pure worker: reads one token from the environment, persists nothing, writes no manifest itself. --- ## Run It ```bash bun run scripts/collect.ts --platform x --ids 1799111,1799222 bun run scripts/collect.ts --platform linkedin --ids "urn:li:share:6844785523593134080" ``` A `ContentItem` (or an array of `{platform, postId}`) on stdin is an alternative to `--ids` — every derivative with a `postId` is collected: ```bash bun run ../genfeed-connector/gf.ts get <id> \ | bun run scripts/collect.ts --platform x ``` Requires [Bun](https://bun.sh) 1.1+. Zero dependencies — only Node built-ins and global `fetch`. --- ## Platforms ### X - Endpoint: `GET https://api.x.com/2/tweets?ids=...&tweet.fields=public_metrics,organic_metrics,non_public_metrics`. - `public_metrics` works with an app-only or user token; `organic_metrics` / `non_public_metrics` (i