{"id":44221776,"url":"https://github.com/urmzd/github-metrics","last_synced_at":"2026-03-16T05:18:09.962Z","repository":{"id":337344464,"uuid":"1153189366","full_name":"urmzd/github-metrics","owner":"urmzd","description":"GitHub Action that generates SVG visualizations of your GitHub profile metrics","archived":false,"fork":false,"pushed_at":"2026-02-09T04:48:20.000Z","size":809,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-09T08:30:40.991Z","etag":null,"topics":["github-action","github-metrics","github-profile","readme-stats"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urmzd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-09T02:25:34.000Z","updated_at":"2026-02-09T04:48:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/urmzd/github-metrics","commit_stats":null,"previous_names":["urmzd/github-metrics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/urmzd/github-metrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urmzd%2Fgithub-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urmzd%2Fgithub-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urmzd%2Fgithub-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urmzd%2Fgithub-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urmzd","download_url":"https://codeload.github.com/urmzd/github-metrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urmzd%2Fgithub-metrics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29290464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-action","github-metrics","github-profile","readme-stats"],"created_at":"2026-02-10T04:02:07.507Z","updated_at":"2026-03-16T05:18:09.949Z","avatar_url":"https://github.com/urmzd.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eGitHub Metrics\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    Generate beautiful SVG metrics visualizations for your GitHub profile README.\n    \u003cbr /\u003e\u003cbr /\u003e\n    \u003ca href=\"https://github.com/urmzd/github-metrics/releases\"\u003eInstall\u003c/a\u003e\n    \u0026middot;\n    \u003ca href=\"https://github.com/urmzd/github-metrics/issues\"\u003eReport Bug\u003c/a\u003e\n    \u0026middot;\n    \u003ca href=\"https://github.com/urmzd\"\u003eProfile Demo\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/urmzd/github-metrics/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/urmzd/github-metrics/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n![Example output](metrics/index.svg)\n\n## Features\n\n- **Language breakdown** — donut chart of languages by bytes across all public repos\n- **AI expertise analysis** — categorized skill bars with proficiency scores, powered by GitHub Models\n- **AI preamble generation** — auto-generated profile introduction (or supply your own `PREAMBLE.md`)\n- **Social badges** — auto-detected from your GitHub profile (website, Twitter, LinkedIn, etc.)\n- **Contribution pulse** — commits, PRs, reviews, and active repos at a glance\n- **Signature projects** — top repos by stars with descriptions\n- **Open source contributions** — external repos you've contributed to\n- **Configuration** — customize name, title, bio, and more via `.github-metrics.toml`\n\n## Quick Start\n\nCreate `.github/workflows/metrics.yml` in your profile repository (`\u003cusername\u003e/\u003cusername\u003e`):\n\n```yaml\nname: Metrics\non:\n  schedule:\n    - cron: \"0 0 * * *\" # daily\n  workflow_dispatch:\n\npermissions:\n  contents: write\n  models: read\n\njobs:\n  generate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: urmzd/github-metrics@main\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\nThe action commits updated SVGs and a generated `README.md` to your repo automatically.\n\n## Inputs\n\n| Input | Description | Default |\n|-------|-------------|---------|\n| `github-token` | GitHub token (needs `repo` read + `models:read` for AI) | `${{ github.token }}` |\n| `username` | GitHub username to generate metrics for | `${{ github.repository_owner }}` |\n| `output-dir` | Directory to write SVG files to | `metrics` |\n| `commit-push` | Whether to commit and push generated files | `true` (CI) / `false` (local) |\n| `commit-message` | Commit message for generated files | `chore: update metrics` |\n| `commit-name` | Git user name for commits | `github-actions[bot]` |\n| `commit-email` | Git user email for commits | `41898282+github-actions[bot]@users.noreply.github.com` |\n| `config-file` | Path to TOML config file | `.github-metrics.toml` |\n| `readme-path` | Output path for the generated profile README (set to `none` to skip) | `README.md` (CI) / `_README.md` (local) |\n| `index-only` | When `true`, embeds only the combined `index.svg` in the generated README; when `false`, embeds each section SVG as a separate image (e.g., `metrics-languages.svg`, `metrics-expertise.svg`, etc.) | `true` |\n\n## Configuration\n\nCreate `.github-metrics.toml` in your repo root:\n\n```toml\nname = \"Your Name\"\npronunciation = \"your-name\"\ntitle = \"Software Engineer\"\ndesired_title = \"Senior Software Engineer\"\nbio = \"Building things on the internet.\"\npreamble = \"PREAMBLE.md\"  # path to custom preamble (optional)\n```\n\nAll fields are optional. The `UserConfig` type in `src/types.ts` defines the full schema.\n\n## AI Features\n\n### Expertise Analysis\n\nThe action uses GitHub Models to analyze your languages, dependencies, topics, and repo READMEs, then produces categorized skill bars with proficiency scores. Requires the `models:read` permission on your token.\n\n### Preamble Generation\n\nWhen no custom preamble is provided, the action uses AI to generate a profile introduction. The generated preamble consists of 2-4 short paragraphs drawn from your profile bio, title, expertise areas, top languages, and notable projects. It uses a professional but friendly tone and does not include a heading.\n\nThe preamble ends with a row of shields.io social badges for any detected links — website, Twitter/X, LinkedIn, and other social accounts from your GitHub profile. A GitHub badge is not included since the README is already on GitHub.\n\nTo use your own text instead, create a `PREAMBLE.md` file in the repo root, or point to a custom file via the `preamble` field in `.github-metrics.toml`.\n\n### Token Permissions\n\nFor AI features, your workflow needs:\n\n```yaml\npermissions:\n  contents: write  # to commit generated files\n  models: read     # for AI expertise analysis and preamble generation\n```\n\n## Templates\n\nFour built-in templates control the generated README layout:\n\n| Template | Description |\n|----------|-------------|\n| `classic` | Name heading, title blockquote, preamble, SVG metrics, bio footer |\n| `modern` | Wave greeting, social badges, projects by activity (Active/Maintained/Inactive), GitHub Stats, expertise |\n| `minimal` | First name heading, preamble, social badges, SVG metrics |\n| `ecosystem` | Wave greeting, social badges, projects by purpose (Developer Tools/SDKs/Applications/Research), GitHub Stats, expertise |\n\nSet via the `template` input (default: `classic`) or `.github-metrics.toml`:\n\n```yaml\n- uses: urmzd/github-metrics@v1\n  with:\n    template: ecosystem\n```\n\nThe **ecosystem** template groups projects into purpose-based tables using AI classification, matching the layout used by [urmzd's profile README](https://github.com/urmzd).\n\n## Local Development\n\n### Prerequisites\n\n- Node.js 22+\n- `gh` CLI (authenticated) for local generation\n\n### Commands\n\n```sh\nnpm run ci          # full CI check (fmt, lint, typecheck, test, build)\nnpm run generate    # generate metrics locally (uses gh auth token)\nnpm run build       # build ncc bundle\nnpm test            # run tests\nnpm run typecheck   # type-check\nnpm run lint        # lint\nnpm run fmt         # format check\nnpm run fmt:fix     # format fix\n```\n\n\u003e **Note:** When running locally (outside CI), `commit-push` defaults to `false` and `readme-path` defaults to `_README.md`, so `npm run generate` will not overwrite your project README or push commits.\n\n## Output Files\n\n| File | Description |\n|------|-------------|\n| `metrics/index.svg` | Combined visualization with all sections |\n| `metrics/metrics-pulse.svg` | Contribution activity stats |\n| `metrics/metrics-languages.svg` | Language breakdown donut chart |\n| `metrics/metrics-expertise.svg` | AI-generated expertise bars |\n| `metrics/metrics-complexity.svg` | Top projects by stars |\n| `metrics/metrics-contributions.svg` | External open source contributions |\n| `README.md` | Generated profile README (CI); `_README.md` locally |\n\n## Agent Skill\n\nThis project ships an [Agent Skill](https://github.com/vercel-labs/skills) for use with Claude Code, Cursor, and other compatible agents.\n\n**Install:**\n\n```sh\nnpx skills add urmzd/github-metrics\n```\n\nOnce installed, use `/github-metrics` to generate and customize SVG profile metrics.\n\n---\n\n\u003csub\u003eCreated using [@urmzd/github-metrics](https://github.com/urmzd/github-metrics)\u003c/sub\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furmzd%2Fgithub-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furmzd%2Fgithub-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furmzd%2Fgithub-metrics/lists"}