A GitHub Action that generates an SVG badge showing OpenSpec metrics for your repository. The badge displays key project health indicators at a glance:
- Total specs — number of specification files
- Total requirements — number of defined requirements
- Open changes — changes currently in progress
- Task status — open vs. closed tasks
Add the action to a GitHub Actions workflow:
name: OpenSpec Badge
on:
push:
branches: [main]
jobs:
badge:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: weAretechnative/openspec-badge-action@main
with:
metric_types: number_of_specs,number_of_requirements,tasks_status,open_changes
badge_style: flatNote: The action needs
contents: writepermission to push badges to thegh-pagesbranch.
| Input | Description | Default |
|---|---|---|
metric_types |
Comma-separated list of metrics to display | All metrics |
badge_style |
Badge visual style: classic (gradient) or flat (solid) |
classic |
| Metric | Description |
|---|---|
number_of_specs |
Total number of spec files |
number_of_requirements |
Total number of requirements across all specs |
tasks_status |
Ratio of completed vs. open tasks |
open_changes |
Number of active (non-archived) changes |
After the action runs, badges are deployed to the gh-pages branch. Reference them in your README using:



Replace <owner>/<repo> with your GitHub repository path.
Apache 2.0 — see LICENSE for details.
Contributions are welcome! This project uses OpenSpec for structured change management. Check the open issues for tasks to pick up.