How to Add GitHub Metrics to Your Profile README
GitHub Metrics generates a comprehensive developer card as a single SVG image covering dozens of data points — contribution calendar, language breakdown, starred topics, coding habits by time of day, recent activity, and much more. It is the most powerful and configurable GitHub README widget available, consolidating what would otherwise require five separate widgets into one cohesive image. This guide covers the lowlighter/metrics project and its GitHub Actions setup, which requires a GitHub personal access token but produces unmatched output depth.
Quick Setup Steps
- 1
Step 1: Create a GitHub personal access token with read:user and repo scopes at github.com/settings/tokens.
- 2
Step 2: Add the token as a METRICS_TOKEN repository secret in your profile repository settings.
- 3
Step 3: Create .github/workflows/metrics.yml using lowlighter/metrics@latest with your chosen plugins.
- 4
Step 4: Add permissions: contents: write to the workflow YAML.
- 5
Step 5: Run the workflow manually, then add  to your README.md after the first SVG is generated.
What Is GitHub Metrics?
The lowlighter/metrics project is an open-source SVG generator that produces rich developer cards by combining multiple data sources. Unlike simpler stats cards, Metrics supports over 30 plugins including: contribution calendar with color-coded activity, language breakdown with time estimates, starred repository topics word cloud, coding habits (commit times by hour and day), recently starred repositories, followers and following activity, achievements unlocked, WAKATIME integration, and more.
Each plugin can be enabled or disabled independently, letting you build a card that shows exactly the information you want. The result is a single SVG file committed to your repository daily, embedded in your README as a standard image.
How to Set Up GitHub Metrics
The recommended setup uses GitHub Actions:
- Create a GitHub personal access token at github.com/settings/tokens with scopes:
read:user,repo,read:org. - Add it as a repository secret named
METRICS_TOKEN. - Create
.github/workflows/metrics.yml:
name: Metrics
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
github-metrics:
runs-on: ubuntu-latest
steps:
- uses: lowlighter/metrics@latest
with:
token: ${{ secrets.METRICS_TOKEN }}
output_action: commit
filename: metrics.svg
plugin_languages: yes
plugin_languages_analysis_timeout: 15
plugin_habits: yes
plugin_habits_from: 200
plugin_habits_days: 14
- After the first run, add to your README:

Configuring Metrics Plugins
Each plugin has a plugin_[name]: yes entry plus optional configuration sub-options. Commonly used plugins:
plugin_languages: yes— language breakdown with byte counts and time estimatesplugin_habits: yes— coding habits chart (times of day, days of week)plugin_achievements: yes— GitHub achievement badgesplugin_calendar: yes— full-year contribution calendarplugin_topics: yes— starred topics word cloudplugin_notable: yes— notable contributions to other repositoriesplugin_wakatime: yes— WakaTime integration (requiresplugin_wakatime_tokensecret)
The official documentation at github.com/lowlighter/metrics/blob/master/README.md lists all plugins with their full parameter reference. A live preview tool is available at metrics.lecoq.io where you can interactively configure your metrics image before committing the workflow.
Troubleshooting GitHub Metrics
If the workflow fails with a 401 or 403 error, verify that your METRICS_TOKEN has the correct scopes: read:user is required for basic profile data. Add repo scope if you want metrics from private repositories.
If the workflow runs but the SVG is not committed, ensure the workflow has permissions: contents: write and that your token has push access to the repository. If using the GITHUB_TOKEN (Actions default token) instead of a personal access token, it may not have sufficient permissions — the personal access token approach is more reliable.
For very large accounts with many repositories, the plugin_languages_analysis_timeout may need to be increased. The default language analysis can time out on accounts with thousands of repositories.
Frequently Asked Questions
How do I add GitHub Metrics to my README?
Create a GitHub personal access token with read:user and repo scopes, add it as the METRICS_TOKEN repository secret, create a GitHub Actions workflow using lowlighter/metrics@latest, run it manually for the first SVG generation, then add  to your README. The image updates daily via the cron schedule.
Is GitHub Metrics free to use?
Yes. The lowlighter/metrics project is open source under MIT license. It uses GitHub Actions compute (free for public repos) and reads from GitHub's public API with your personal access token. There is no external service cost and no subscription required.
Why is my GitHub Metrics SVG not generating?
Check that METRICS_TOKEN is set as a repository secret (not a personal token at the account level). Verify the token has read:user scope. Check the Actions tab for specific error messages in the job log. The most common failures are missing token scopes and insufficient workflow permissions.
How many plugins can I add to GitHub Metrics?
You can enable as many plugins as you want, but more plugins means longer generation time and a larger SVG file. For profile READMEs, 3-5 plugins produce the best balance between information density and load time. The metrics.lecoq.io preview tool helps you choose the right combination before committing.
From Our Blog
- Complete Guide to GitHub Badges for Your README
Learn how to add shields.io badges, GitHub stats cards, and tool badges to your GitHub profile README. Includes ready-to-use code for 50+ popular technologies.
- Best GitHub README Widgets and Tools: The Complete 2026 List
A curated list of the best GitHub profile README widgets — from snake animations to Spotify players, stats cards to 3D contribution graphs. Includes setup instructions for each.
- How to Add GitHub Stats Cards to Your README (2026 Guide)
Step-by-step guide to adding GitHub stats cards, language cards, streak stats, and WakaTime cards to your GitHub profile README using github-readme-stats.
Generate Your GitHub Profile README
Generate a GitHub profile README featuring GitHub Metrics with AI
Try It Free — No Sign UpMore Widget Guides
How to Add Spotify Now Playing
Step-by-step guide to adding Spotify Now Playing to your GitHub README
How to Add WakaTime Coding Stats
Step-by-step guide to adding WakaTime Coding Stats to your GitHub README
How to Add Snake Contribution Animation
Step-by-step guide to adding Snake Contribution Animation to your GitHub README
How to Add Profile Views Counter
Step-by-step guide to adding Profile Views Counter to your GitHub README
How to Add Typing SVG Animation
Step-by-step guide to adding Typing SVG Animation to your GitHub README
How to Add GitHub Streak Stats
Step-by-step guide to adding GitHub Streak Stats to your GitHub README