Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
zc277584121 avatar

Github Traffic

  • 2.8k installs
  • Updated July 30, 2026
  • zc277584121/marketing-skills

github-traffic is an agent skill that Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires.

About

Fetch and analyze GitHub repository traffic data page views git clones referral sources popular pages and star growth Optionally generate trend charts as PNG images Prerequisites gh CLI must be installed and authenticated Push write access to the target repository is required GitHub s Traffic API does not work with read only access matplotlib is optional for PNG chart generation falls back to ASCII if unavailable The user asks about repository traffic page views clone counts or where visitors come from The user wants to see traffic trends over time weekly monthly quarterly The user wants to generate traffic report charts for sharing or documentation The user wants to periodically snapshot traffic data to build long term history Important GitHub Traffic API Limitations GitHub only provides the last 14 days of traffic data To track trends over longer periods 30 days 90 days etc the script stores each fetch in a local history file github traffic repo _traffic json Regular snapshots are required to build up history

  • description: Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend cha
  • Fetch and analyze GitHub repository traffic data — page views, git clones, referral sources, popular pages, and star gro
  • > - `gh` CLI must be installed and authenticated
  • Follow github-traffic SKILL.md steps and documented constraints.
  • Follow github-traffic SKILL.md steps and documented constraints.

Github Traffic by the numbers

  • 2,774 all-time installs (skills.sh)
  • +219 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #285 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

github-traffic capabilities & compatibility

Capabilities
description: fetch, store, and visualize github · fetch and analyze github repository traffic data · > `gh` cli must be installed and authenticated · follow github traffic skill.md steps and documen
Use cases
orchestration
From the docs

What github-traffic says it does

description: Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.
SKILL.md
Fetch and analyze GitHub repository traffic data — page views, git clones, referral sources, popular pages, and star growth. Optionally generate trend charts as PNG images.
SKILL.md
> - `gh` CLI must be installed and authenticated
SKILL.md
npx skills add https://github.com/zc277584121/marketing-skills --skill github-traffic

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.8k
Security audit3 / 3 scanners passed
Last updatedJuly 30, 2026
Repositoryzc277584121/marketing-skills

When should an agent use github-traffic and what problem does it solve?

Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.

Who is it for?

Developers invoking github-traffic as documented in the skill source.

Skip if: Skip when requirements fall outside github-traffic documented scope.

When should I use this skill?

Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.

What you get

Outputs aligned with the github-traffic SKILL.md workflow and stated deliverables.

  • local JSON traffic history
  • PNG trend charts
  • console traffic summary

By the numbers

  • Collects 4 GitHub traffic metric types: views, clones, referrers, and popular paths

Files

SKILL.mdMarkdownGitHub ↗

Skill: GitHub Traffic

Fetch and analyze GitHub repository traffic data — page views, git clones, referral sources, popular pages, and star growth. Optionally generate trend charts as PNG images.

Prerequisites:
- gh CLI must be installed and authenticated
- Push (write) access to the target repository is required — GitHub's Traffic API does not work with read-only access
- matplotlib is optional (for PNG chart generation; falls back to ASCII if unavailable)

---

When to Use

  • The user asks about repository traffic, page views, clone counts, or where visitors come from
  • The user wants to see traffic trends over time (weekly, monthly, quarterly)
  • The user wants to generate traffic report charts for sharing or documentation
  • The user wants to periodically snapshot traffic data to build long-term history

---

Important: GitHub Traffic API Limitations

GitHub only provides the last 14 days of traffic data. To track trends over longer periods (30 days, 90 days, etc.), the script stores each fetch in a local history file (~/.github-traffic/<repo>_traffic.json). Regular snapshots are required to build up history.

Recommended: set up a cron job or CI schedule to run the snapshot command periodically:

# Daily snapshot via cron (no output, just stores data)
0 9 * * * python /path/to/scripts/github_traffic.py owner/repo --snapshot

---

Default Workflow

python /path/to/skills/github-traffic/scripts/github_traffic.py <owner/repo>

This will: 1. Fetch current traffic data via gh api 2. Save a snapshot to ~/.github-traffic/ for historical tracking 3. Display a formatted summary (views, clones, referrers, popular pages)

---

Generating Charts

# Generate PNG trend chart (last 30 days, default)
python .../github_traffic.py owner/repo --chart

# Last 7 days
python .../github_traffic.py owner/repo --chart --days 7

# Last 90 days (needs accumulated history)
python .../github_traffic.py owner/repo --chart --days 90

# ASCII chart (no matplotlib needed)
python .../github_traffic.py owner/repo --ascii

The PNG chart includes up to 3 panels: 1. Page Views — total views and unique visitors (area chart) 2. Git Clones — total clones and unique cloners (bar + line chart) 3. Star Growth — star count over time (line chart, shown when multiple snapshots exist)

---

Script Options

FlagDefaultDescription
repo (positional)requiredRepository in owner/name format
--chartoffGenerate PNG trend chart
--asciioffForce ASCII bar chart output
--days30Number of days to include in chart
--history-dir~/.github-traffic/Directory for historical data storage
--output<repo>_traffic.pngOutput path for chart image
--snapshotoffFetch and store data only (no display)

---

Examples

# Quick traffic summary
python .../github_traffic.py zilliztech/memsearch

# Weekly trend chart
python .../github_traffic.py zilliztech/memsearch --chart --days 7

# Monthly trend chart, custom output path
python .../github_traffic.py zilliztech/memsearch --chart --days 30 --output ./reports/traffic.png

# Just store a snapshot (for cron jobs)
python .../github_traffic.py zilliztech/memsearch --snapshot

# ASCII chart when matplotlib is not available
python .../github_traffic.py zilliztech/memsearch --ascii --days 14

---

History & Long-Term Tracking

Each run merges the current 14-day window into a persistent JSON file at ~/.github-traffic/<owner>_<repo>_traffic.json. The file contains:

  • Daily views: date → {views, unique}
  • Daily clones: date → {clones, unique}
  • Star snapshots: date → star count
  • Fetch metadata: timestamp, 14-day totals, stars, forks

To build meaningful 30/90-day charts, run the script at least every 14 days (daily is ideal). Gaps longer than 14 days will show as missing data in charts.

---

Permissions

The GitHub Traffic API requires push access to the repository. This means:

  • Repository owners and admins: full access
  • Collaborators with write/maintain role: full access
  • Read-only users and forkers: no access (API returns 403)

If you get a permission error, check your gh auth status and ensure your token has the repo scope.

---

Troubleshooting

ProblemSolution
"Must have push access" errorYou need write access to the repo. Check gh auth status.
Chart shows only 14 daysGitHub only provides 14-day windows. Run --snapshot regularly to accumulate history.
matplotlib not foundInstall with pip install matplotlib. Or use --ascii for text-based charts.
No data for some datesGitHub may not report days with zero traffic. These gaps are normal.

Related skills

How it compares

Choose github-traffic when you want a scriptable, local history of GitHub traffic instead of manually checking the GitHub web Insights tab.

FAQ

What is github-traffic?

Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.

When should I use github-traffic?

Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.

Is github-traffic safe to install?

Review the Security Audits panel on this page before production use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.