Loading...
Loading...
Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.
npx skill4agent add zc277584121/marketing-skills github-trafficPrerequisites:
CLI must be installed and authenticatedgh- Push (write) access to the target repository is required — GitHub's Traffic API does not work with read-only access
is optional (for PNG chart generation; falls back to ASCII if unavailable)matplotlib
~/.github-traffic/<repo>_traffic.json# Daily snapshot via cron (no output, just stores data)
0 9 * * * python /path/to/scripts/github_traffic.py owner/repo --snapshotpython /path/to/skills/github-traffic/scripts/github_traffic.py <owner/repo>gh api~/.github-traffic/# 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| Flag | Default | Description |
|---|---|---|
| required | Repository in |
| off | Generate PNG trend chart |
| off | Force ASCII bar chart output |
| | Number of days to include in chart |
| | Directory for historical data storage |
| | Output path for chart image |
| off | Fetch and store data only (no display) |
# 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~/.github-traffic/<owner>_<repo>_traffic.jsongh auth statusrepo| Problem | Solution |
|---|---|
| "Must have push access" error | You need write access to the repo. Check |
| Chart shows only 14 days | GitHub only provides 14-day windows. Run |
| matplotlib not found | Install with |
| No data for some dates | GitHub may not report days with zero traffic. These gaps are normal. |