Agent Skills › Tracer-Cloud/opensre › measuring-github-star-velocity

measuring-github-star-velocity

GitHub

通过GitHub API计算仓库星标增长率,处理分页陷阱并执行数据校验。

tools/system/python_execution_tool/skills/measuring-github-star-velocity/SKILL.md Tracer-Cloud/opensre

触发场景

查询GitHub仓库星标增长速率 分析特定时间段内获得的星标数量

安装

npx skills add Tracer-Cloud/opensre --skill measuring-github-star-velocity -g -y
更多选项

非标准路径

npx skills add https://github.com/Tracer-Cloud/opensre/tree/main/tools/system/python_execution_tool/skills/measuring-github-star-velocity -g -y

不安装直接使用

npx skills use Tracer-Cloud/opensre@measuring-github-star-velocity

指定 Agent (Claude Code)

npx skills add Tracer-Cloud/opensre --skill measuring-github-star-velocity -a claude-code -g -y

安装 repo 全部 skill

npx skills add Tracer-Cloud/opensre --all -g -y

预览 repo 内 skill

npx skills add Tracer-Cloud/opensre --list

SKILL.md

Frontmatter
{
    "name": "measuring-github-star-velocity",
    "tools": [
        "execute_python_code"
    ],
    "description": "Compute GitHub repository star velocity over a rolling time window using the stargazers API."
}

GitHub Star Velocity

Use this skill only when the dedicated get_github_star_history tool is not available. When that tool is available, prefer it for GitHub star velocity, stars gained in a recent window, day-by-day stars, star growth rate, or similar metrics for a repository.

Prerequisites

  1. Set allow_network: true on execute_python_code.
  2. Read GITHUB_TOKEN from the subprocess environment (injected when GitHub credentials are configured). Never print the token.
  3. Parse owner/repo from the repository URL or user input.

API approach

  1. Fetch current stargazers_count from GET /repos/{owner}/{repo}.
  2. Fetch stargazers with timestamps from GET /repos/{owner}/{repo}/stargazers?per_page=100 using Accept: application/vnd.github.v3.star+json.
  3. Each entry includes starred_at. Count stars where starred_at is within the requested window.

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.

For responsiveness, compute the last page from stargazers_count and per_page=100, fetch newest pages by explicit page number in descending order, and stop once the oldest starred_at on a fetched page is before the window start. Only run a full historical scan when the user explicitly asks for all-time history or an audit-quality export.

Sanity check before reporting

Treat these results as suspicious and rerun with a full paginated scan before answering:

  • 0 stars 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_count deltas 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_at in the window
  • Optional hourly breakdown for the last 24 hours

版本历史

  • 4303874 当前 2026-09-22 10:48

同 Skill 集合

core/agent_harness/prompts/skills/architecture_audit/SKILL.md
core/agent_harness/prompts/skills/delivering-morning-briefings/SKILL.md
core/agent_harness/prompts/skills/fixing-github-security-alerts/SKILL.md
core/agent_harness/prompts/skills/github_ci_fix_onboarding/SKILL.md
core/agent_harness/prompts/skills/github_ci_fix/SKILL.md
core/agent_harness/prompts/skills/github_ci_health/SKILL.md
core/agent_harness/prompts/skills/github_cli/SKILL.md
core/agent_harness/prompts/skills/github_security_fix/SKILL.md
core/agent_harness/prompts/skills/investigating-incidents-with-runbooks/SKILL.md
core/agent_harness/prompts/skills/morning_report/SKILL.md
core/agent_harness/prompts/skills/onboarding-github-ci/SKILL.md
core/agent_harness/prompts/skills/repair-github-ci/SKILL.md
core/agent_harness/prompts/skills/reporting-github-ci-failures/SKILL.md
integrations/github/tools/ci_fix/SKILL.md
integrations/github/tools/github_cli/SKILL.md
integrations/github/tools/security_fix/SKILL.md
integrations/github/tools/workflow/SKILL.md
integrations/posthog/tools/skills/posthog-summary/SKILL.md
integrations/posthog/tools/skills/summarizing-posthog-analytics/SKILL.md
integrations/sentry/tools/skills/sentry-summary/SKILL.md
integrations/sentry/tools/skills/summarizing-sentry-issues/SKILL.md
integrations/yandex_cloud/tools/SKILL.md
tools/github_cli/SKILL.md
tools/system/python_execution_tool/skills/github-star-velocity/SKILL.md
core/agent_harness/prompts/skills/cicd_analytics_demo/SKILL.md

元信息

文件数
0
版本
a5fcc04
Hash
2d593671
收录时间
2026-09-22 10:48

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-13 01:13
浙ICP备14020137号-1