Github Star Velocity
Researchgithub-star-velocityGithub Star Velocity is an Agent Skill for research published in the Tracer-Cloud/opensre repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Compute GitHub repository star velocity over a rolling time window using the stargazers API.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/Tracer-Cloud/opensre/blob/HEAD/tools/system/python_execution_tool/skills/github-star-velocity/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/github-star-velocity, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
GitHub Star Velocity
Use this skill when the user asks for GitHub star velocity, stars gained in the last N hours, star growth rate, or similar metrics for a repository.
Prerequisites
- Set
allow_network: trueonexecute_python_code. - Read
GITHUB_TOKENfrom the subprocess environment (injected when GitHub credentials are configured). Never print the token. - Parse
owner/repofrom the repository URL or user input.
API approach
- Fetch current
stargazers_countfromGET /repos/{owner}/{repo}. - Fetch stargazers with timestamps from
GET /repos/{owner}/{repo}/stargazers?per_page=100usingAccept: application/vnd.github.v3.star+json. - Each entry includes
starred_at. Count stars wherestarred_atis within the requested window (for example, the last 24 hours).
Critical pagination trap
Stargazers are returned oldest first, not newest first. Do not stop after the first page when the newest entries on that page fall outside the window — that produces a false zero.
Instead, paginate through all pages (follow the Link response header
until there is no rel="next") and count every starred_at inside the window.
Sanity check before reporting
Treat these results as suspicious and rerun with a full paginated scan before answering:
0stars in the last 24 hours for a repo with thousands of stars and recent activity- Velocity that implies losing stars without an explicit unstar request
- Counts that disagree sharply with
stargazers_countdeltas when you have a recent baseline
When a result looks wrong, widen the scan (all pages), print the most recent
starred_at observed, and only then return the velocity.
Output shape
Return:
- Total current stars
- Stars gained in the window
- Velocity (stars per hour and stars per day)
- Window start timestamp (UTC)
- Most recent
starred_atin the window - Optional hourly breakdown for the last 24 hours