
github-traffic
Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.
- Installs
- 3.8K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/zc277584121/marketing-skills --skill github-traffic- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads github-traffic automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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:
ghCLI 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
matplotlibis 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:
- Fetch current traffic data via
gh api - Save a snapshot to
~/.github-traffic/for historical tracking - 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:
- Page Views — total views and unique visitors (area chart)
- Git Clones — total clones and unique cloners (bar + line chart)
- Star Growth — star count over time (line chart, shown when multiple snapshots exist)
Script Options
| Flag | Default | Description |
|---|---|---|
repo (positional) | required | Repository in owner/name format |
--chart | off | Generate PNG trend chart |
--ascii | off | Force ASCII bar chart output |
--days | 30 | Number of days to include in chart |
--history-dir | ~/.github-traffic/ | Directory for historical data storage |
--output | <repo>_traffic.png | Output path for chart image |
--snapshot | off | Fetch 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
| Problem | Solution |
|---|---|
| "Must have push access" error | You need write access to the repo. Check gh auth status. |
| Chart shows only 14 days | GitHub only provides 14-day windows. Run --snapshot regularly to accumulate history. |
| matplotlib not found | Install with pip install matplotlib. Or use --ascii for text-based charts. |
| No data for some dates | GitHub may not report days with zero traffic. These gaps are normal. |
FAQ
What does the github-traffic skill do?
Fetch, store, and visualize GitHub repository traffic data (views, clones, referrers, stars) with trend charts. Requires repo push access.
How do I install github-traffic?
Run npx skills add https://github.com/zc277584121/marketing-skills --skill github-traffic in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/github-traffic/ (personal) or .claude/skills/github-traffic/ (project).
Which AI agents can use github-traffic?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is github-traffic safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains github-traffic?
It is published by zc277584121 in zc277584121/marketing-skills. It has 3,807 recorded installs.
More from zc277584121/marketing-skills
remove-ai-style
zc277584121/marketing-skills
Aggressively rewrite Chinese or English prose to remove AI-generated patterns. Use for de-AI polishing, natural-language rewrites, robotic or formulaic writing, and publication cleanup. Always run the bundled deterministic Markdown analyzer first, remove every editable exclamation mark, dash, and formulaic binary contrast, inspect every other reported location, then read the full article for semantic patterns the rules cannot enumerate.
browser-screenshot
zc277584121/marketing-skills
Take focused, region-specific screenshots from web pages using a dedicated headed Chrome profile with persistent login state. Navigates to the right page based on user context (URL, search query, social media post), locates the target region via DOM selectors, and crops to a clean, focused screenshot without attaching to the user's daily browser.
content-rewrite
zc277584121/marketing-skills
Adapt and rewrite content for different platforms (LinkedIn, X, Reddit, English blog, WeChat). Each platform has its own tone, format, and length requirements.
chrome-automation
zc277584121/marketing-skills
Automate Chrome browser tasks using agent-browser CLI. Navigate pages, fill forms, click buttons, take screenshots, extract data, and replay Chrome DevTools Recorder exports.
mermaid-to-image
zc277584121/marketing-skills
Convert Mermaid code blocks in Markdown files to PNG images using the mermaid.ink API.
image-generation
zc277584121/marketing-skills
Generate illustration images for articles and documentation with a Codex-first workflow, OpenAI API fallback, and Gemini fallback.
Popular marketing & seo skills
reddit-automation
flowkit-labs/skills
Find Reddit threads where people are genuinely asking for what you offer, then draft short, genuinely helpful replies — disclosing your affiliation honestly and naming your product only when it truly answers the question. Two moves: discovery — scan the right subreddits for real needs (recommendation asks, expressed pain, competitor mentions) and rank the few threads where you can actually help; drafting — write from real experience, respect each community's self-promo rules, and keep a human in the loop to review and post. This markets on Reddit the honest way: contribute value, disclose who you are, never astroturf. Distilled from the playbook behind doany.ai's Reddit agent. Triggers on "find reddit opportunities", "reddit marketing", "reddit automation", "reply on reddit for my product", "reddit community engagement", "reddit lead gen", or any ask to turn Reddit threads into genuine, disclosed marketing replies.
twitter-automation
101-skills/superpowers
Automate Twitter/X with posting, engagement, and user management via inference.sh CLI. Apps: x/post-tweet, x/post-create (with media), x/post-like, x/post-retweet, x/dm-send, x/user-follow. Capabilities: post tweets, schedule content, like posts, retweet, send DMs, follow users, get profiles. Use for: social media automation, content scheduling, engagement bots, audience growth, X API. Triggers: twitter api, x api, tweet automation, post to twitter, twitter bot, social media automation, x automation, tweet scheduler, twitter integration, post tweet, twitter post, x post, send tweet
twitter-automation
magentosh/superpowers
Automate Twitter/X with posting, engagement, and user management via inference.sh CLI. Apps: x/post-tweet, x/post-create (with media), x/post-like, x/post-retweet, x/dm-send, x/user-follow. Capabilities: post tweets, schedule content, like posts, retweet, send DMs, follow users, get profiles. Use for: social media automation, content scheduling, engagement bots, audience growth, X API. Triggers: twitter api, x api, tweet automation, post to twitter, twitter bot, social media automation, x automation, tweet scheduler, twitter integration, post tweet, twitter post, x post, send tweet
twitter-automation
qu-skills/superpowers
Automate Twitter/X with posting, engagement, and user management via inference.sh CLI. Apps: x/post-tweet, x/post-create (with media), x/post-like, x/post-retweet, x/dm-send, x/user-follow. Capabilities: post tweets, schedule content, like posts, retweet, send DMs, follow users, get profiles. Use for: social media automation, content scheduling, engagement bots, audience growth, X API. Triggers: twitter api, x api, tweet automation, post to twitter, twitter bot, social media automation, x automation, tweet scheduler, twitter integration, post tweet, twitter post, x post, send tweet
product-launch-video
heygen-com/hyperframes
Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. Unclear → /hyperframes.
twitter-automation
skills-shell/superpowers
Automate Twitter/X with posting, engagement, and user management via inference.sh CLI. Apps: x/post-tweet, x/post-create (with media), x/post-like, x/post-retweet, x/dm-send, x/user-follow. Capabilities: post tweets, schedule content, like posts, retweet, send DMs, follow users, get profiles. Use for: social media automation, content scheduling, engagement bots, audience growth, X API. Triggers: twitter api, x api, tweet automation, post to twitter, twitter bot, social media automation, x automation, tweet scheduler, twitter integration, post tweet, twitter post, x post, send tweet