AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Analytics Collector

skill-genfeedai-skills-analytics-collector · by genfeedai

Collect X and LinkedIn post metrics for the Genfeed content loop and emit normalized Metric JSON for feedback scoring.

— No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add skill-genfeedai-skills-analytics-collector

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-genfeedai-skills-analytics-collector)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Analytics Collector? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 ; the connector recomputes that item's feedbackScore; and gf feedback 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

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:

bun run ../genfeed-connector/gf.ts get  \
  | bun run scripts/collect.ts --platform x

Requires Bun 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 (impressions, link clicks) need a user-context token for the author. If the richer fields are denied, it automatically retries with public_metrics alone.
  • Mapping: impressions with LinkedIn-Version + X-Restli-Protocol-Version: 2.0.0.
  • Mapping: `likes metrics.json

2. record each metric — this recomputes feedbackScore on the item

jq -c '.metrics[]' metrics.json | while read -r m; do bun run ../genfeed-connector/gf.ts record-metric "$ITEM_ID" { "term": "ai agents", "multiplier": 0.74 }


`collect` measures, the connector remembers, `trend-scout` re-ranks. That three-skill cycle is the locked loop.

---

## Security

- Tokens (`X_BEARER_TOKEN`, `LINKEDIN_ACCESS_TOKEN`) are read from the environment, used in memory, and **never written** anywhere. Resolve them through the connector.
- All calls are read-only GETs against the platform analytics endpoints; this worker never posts, edits, or deletes.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [genfeedai](https://github.com/genfeedai)
- **Source:** [genfeedai/skills](https://github.com/genfeedai/skills)
- **License:** MIT
- **Homepage:** https://skills.sh/genfeedai/skills

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.