gitlytics-automation
Installation
SKILL.md
Gitlytics Automation & Archiving Skill
Automate indefinite GitHub traffic retention and secure local/self-hosted Gitlytics deployments without leaking tokens or exposing unauthenticated dashboards.
Security Rules
- Never hardcode tokens in workflow YAML, shell scripts, or committed files. Always use
${{ secrets.TRAFFIC_TOKEN }}in GitHub Actions orGITLYTICS_TOKENin local environment variables. - Dashboard loopback safety:
gitlytics dashboardbinds to127.0.0.1by default. Never pass--public-bindunless the user explicitly places it behind a trusted reverse proxy with authentication, and remind them that--token/GITLYTICS_TOKENis intentionally disabled on non-loopback binds. - Private repo hygiene: Default to
--public-only/export_public_only=Truewhen committing traffic CSVs or JSON exports to a public repository so private repository names never leak.
Workflow
Step 1: Choose the Right Archiving Strategy
Ask or infer which mode fits the user's setup:
- GitHub Action (recommended for zero-server archiving): Runs on the 1st, 8th, 15th, and 22nd of each month using
ameyachopade/gitlytics-github-traffic-automation@v1.2.0and commits deduplicated monthly CSVs (traffic_YYYY-MM.csv) into the repo. - Local CLI Sync (
gitlytics sync): Runs locally via Python (pip install gitlytics/uvx gitlytics sync --schedule-cron "0 23 * * *") or Node.js (npm install -g @gitlytics/cli/npx @gitlytics/cli sync --data-dir ./data). Both write the exact same interchangeable 22-column CSV vault and support--export-json. - Gitlytics Cloud (
https://dashboard.gitlytics.dev): Managed nightly archiving into Supabase with automatic MCP access viahttps://api.gitlytics.dev/mcp(OAuth 2.1 direct sign-in +glt_live_...API key fallback).