Repo pulse

From aaronjmars/miroshark-aeon · View interactive version

Repo pulse is an AI agent skill from the GitHub repository aaronjmars/miroshark-aeon. Report on new stars, forks, and releases for watched repos - with profile enrichment (name, location, company, bio, follower count) for every new stargazer and forker, plus a one-line growth verdict.

How to use this skill

Skill file

<!-- autoresearch: variation B — sharper output: /events primary input + notable-stargazer enrichment + QUIET/STEADY/ACTIVE/SURGE verdict -->

${var} — Repo (owner/repo) to check. If empty, checks all watched repos.

Config

Reads repos from memory/watched-repos.md. Skip any repo whose name ends with -aeon or contains aeon-agent — those are agent repos, not project repos.

If ${var} is set and matches owner/repo, check only that repo.

Context

Read memory/MEMORY.md and the last 4 weeks of memory/logs/ for previous stargazers_count / forks_count per repo. Parse lines matching **owner/repo**: stargazers_count=N, forks_count=M to reconstruct a per-run series — you'll need it for the weekly-baseline (avg4w) used in step 5. Runs are weekly, so expect roughly one datapoint per week; if the logs still hold denser daily entries from the old schedule, take the newest entry in each 7-day bucket rather than mixing cadences.

Steps

1. Compute the 7-day cutoff FIRST

Run date as its own Bash call (see Shell shape in the Sandbox note):

date -u -d '7 days ago' +%Y-%m-%dT%H:%M:%SZ

It prints CUTOFF (for example 2026-10-27T09:00:00Z). Write that value into every later command literally, in place of the <CUTOFF> placeholder. All time filtering uses exactly this timestamp — never "today's date" or "since midnight".

2. Fetch current counts (1 call per repo)

One Bash call per repo, with the repo written in literally (never a for loop over the repos). Keep the printed stargazers_count: the step 4 fallback needs it.

gh api repos/owner/repo --jq '{stargazers_count, forks_count, subscribers_count}'

If this call returns non-2xx (404, 403, rate limit), record source=fail with the reason and continue to the next repo. Do not abort the batch.

3. Fetch recent events — primary input

One call per repo covers stargazers, forks, and releases for the last ~90 days, newest-first. Write the repo and CUTOFF in literally:

gh api --paginate "repos/owner/repo/events?per_page=100" \
  --jq '[.[] | select(.created_at >= "<CUTOFF>") | {type, actor: .actor.login, created_at, tag: (.payload.release.tag_name // null), action: (.payload.action // null)}]'

Paginate — a single 100-event page covers ~24h on an active repo but can truncate a 7-day window. Use --paginate and stop early once you see an event older than CUTOFF (events are newest-first). If the oldest event you retrieved is still newer than CUTOFF, the window is truncated: record truncated=true for that repo and say so in the report — never present a truncated count as complete.

Parse the filtered events:

Record source=events for this repo.

Why /events over paginated stargazers? One call instead of two, and it captures forks + releases in the same response. Events API returns 300 events over 10 pages for up to 90 days — enough for a 7-day window on typical repos, but see the pagination note above for busy ones.

4. Fallback (rate limit or error)

If step 3 returns non-2xx, fall back to the stargazers two-last-pages technique (events emptiness is NOT a fallback trigger — empty genuinely means no activity):

Work out the two page numbers yourself from the stargazers_count step 2 printed for this repo (STARS): LAST_PAGE = STARS / 100 rounded up, PREV_PAGE = LAST_PAGE - 1, or 1 when LAST_PAGE is 1 (then both are the same page and one call is enough). Then one call per page, with the page number and CUTOFF written in literally:

gh api "repos/owner/repo/stargazers?per_page=100&page=<PREV_PAGE>" \
  -H "Accept: application/vnd.github.star+json" \
  --jq '.[] | select(.starred_at >= "<CUTOFF>") | {user: .user.login, starred_at}'
gh api "repos/owner/repo/stargazers?per_page=100&page=<LAST_PAGE>" \
  -H "Accept: application/vnd.github.star+json" \
  --jq '.[] | select(.starred_at >= "<CUTOFF>") | {user: .user.login, starred_at}'

Deduplicate by user. Forks in the fallback path come from one more call, CUTOFF written in literally:

gh api "repos/owner/repo/forks?sort=newest&per_page=50" \
  --jq '.[] | select(.created_at >= "<CUTOFF>") | {owner: .owner.login, full_name, created_at}'

Record source=stargazers-fallback for this repo. Releases are skipped in fallback (not critical).

5. Profile new stargazers and forkers, then compute the verdict

Profile lookup — build a who's-behind-the-activity picture for every new actor in the 7-day window. Look up each new stargazer AND each new fork author (cap 15 of each per repo, newest-first, so the freshest actors are always enriched even when a repo gets a burst). A week accumulates more actors than the cap on an active repo: when you enrich fewer than the total, state the ratio in the report (enriched 15 of 42) rather than letting the extras vanish silently:

gh api users/{login} \
  --jq '{login, name, bio, location, company, blog, twitter: .twitter_username, followers, public_repos, html_url}'

Profile card — the rendering used for notable stargazers and all new forks; one actor per block. Surface as much real profile as the account exposes — name, location, company, repos, website, twitter — and always keep the bio:

github.com/{login} — {name} · 📍 {location} · 🏢 {company} · {public_repos} repos · 🌐 {blog} · 🐦 {twitter} · {followers} followers
  "{bio}"

Rendering rules:

Growth verdict — reconstruct stargazers_count from the last 4 weeks of logs and compute per-week deltas. Let avg4w = mean of the available weekly deltas (use avg4w = 7 if fewer than 2 prior weeks are logged). Let week_stars = new stargazers in the last 7 days.

Because this skill now runs weekly, both sides of the comparison are weekly totals — never compare a 7-day count against a per-day average, which would flag every ordinary week as a SURGE.

| Verdict | Rule (first matching row wins) |

|---------|--------------------------------|

| SURGE | week_stars >= 50 OR week_stars > 3 * avg4w |

| ACTIVE | week_stars > 1.5 * avg4w |

| STEADY | week_stars >= 1 OR any new fork OR any new release |

| QUIET | zero stars, zero forks, zero releases in 7d |

Record the rule that fired so it shows up in the log.

6. Decide whether to notify

Send a notification if ANY of:

Otherwise print REPO_PULSE_QUIET and skip ./notify.

7. Notification — via `./notify`

Lead with the header + counts, then the enriched "who's behind it" detail. Omit any empty section entirely:

*Repo Pulse — ${today}* — [VERDICT]
[owner/repo] — stars X (+N) · forks Y (+M) · releases +R

Notable new stargazers:
github.com/jane — Jane Doe · 📍 Berlin, DE · 🏢 @acme · 64 repos · 🐦 @janedoe · 1.2k followers
  "Rust + distributed systems. Maintainer of foo-rs."
github.com/dus4w — 📍 Lagos, NG · 32 repos
  "Frontend dev, learning Rust."

Other new stargazers:
github.com/user3 | github.com/user4

New forks:
github.com/lee/repo — Sam Lee · 📍 Singapore · 🏢 @bigco · 41 repos · 820 followers
  "Backend / distributed systems."
github.com/pat/repo — 📍 London · 130 followers
  "Indie hacker."

New releases:
v1.2.3 | v1.2.4

Source: events

Rules:

8. Log to `memory/logs/${today}.md`

Always include the exact current counts so next week's run can compute deltas:

## Repo Pulse
- **owner/repo**: stargazers_count=X, forks_count=Y, source=events
- **New stars (7d):** N (verdict=ACTIVE, avg4w=9.6)
- **New forks (7d):** M
- **New releases (7d):** R
- **Notable stargazers:** jane (Jane Doe · Berlin DE · 1.2k followers · 64 repos), sam (Toronto · 450 followers)
- **New forkers:** lee (Sam Lee · Singapore · 820 followers), pat (London · 130 followers)
- **Notification sent:** yes

Capture the same profile fields you rendered (name · location · followers · repos) so the log preserves who engaged, not just how many — drop any field that was null.

If the repo lookup failed, log:

- **owner/repo:** FAILED (<reason>) — counts unchanged

Sandbox note

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.