> ~/claude-skills/repo-badges

Badges that match what the repository actually is.

Detects CI, package registry, language, licence, coverage and quality tooling, then inserts the matching shields.io badges into the README inside a managed block. Every badge is justified by a file in the repo, and dynamic ones are checked for a valid response.

Why it exists

README badges are easy to get wrong in two ways. One is the badge that claims something the repository does not have: a coverage badge with no coverage service behind it, a build badge pointing at a workflow file that was renamed. The other is the wall, twenty badges in a row that nobody reads.

This skill treats a badge as a claim that needs evidence. It looks at what the repository actually is, adds the badges that correspond to it, groups them so they stay readable, and checks that each one renders.

How it works

  1. Reads the README and notes any badges already there.
  2. Establishes owner/repo from the git remote, then the manifest, then links in the README. Most dynamic badges need it, so it does not continue on a guess.
  3. Detects, category by category, the files that justify a badge.
  4. Composes the block, grouped and ordered, in one consistent style.
  5. Shows the block and the diff before writing.
  6. Verifies every dynamic badge against shields.io and reports what each one currently says.

What it detects

Priority Category Looks for
1 Status GitHub Actions, GitLab CI, CircleCI, Travis, Jenkins, Azure Pipelines
1 Package npm, PyPI, crates.io, Maven, NuGet, RubyGems, Go, Packagist, Hex, pub.dev
1 Meta Licence, top language, repo size, last commit
2 Quality Codecov, Coveralls, Codacy, Code Climate, SonarCloud, linters
2 Community Discord, Slack, discussions, contributors
2 Docs Docs site, API docs, Storybook
3 Activity Stars, forks, issues, pull requests, commit activity, downloads

It prefers dynamic badges, which update themselves from the live service, and uses a static one only where no live endpoint exists.

What you get

The badges go between two markers, so a later run can refresh them without touching anything else:

<!-- badges-start -->
[![CI](https://img.shields.io/github/actions/workflow/status/acme/widget-toolkit/ci.yml?style=flat&logo=github)](...)
[![npm](https://img.shields.io/npm/v/widget-toolkit?style=flat&logo=npm)](...)
[![License](https://img.shields.io/github/license/acme/widget-toolkit?style=flat)](...)
<!-- badges-end -->

Along with a summary that names the evidence for each one:

Category | Badge       | Source
---------|-------------|--------------------------
Build    | CI          | .github/workflows/ci.yml
Package  | npm version | package.json
Meta     | License     | LICENSE (MIT)

The badges at the top of this repository’s README were added with it.

Modes

Argument What happens
(none) Detects and inserts priority 1 and 2 badges
preview Shows the badge Markdown; changes no file
minimal Priority 1 only: build status, version, licence
full Every applicable badge, including activity metrics
update Detects again and refreshes the managed block, leaving manual badges alone
remove Deletes the managed block
--style <style> flat (default), flat-square, plastic, for-the-badge, social

If the README already has badges in one style and you name none, it matches theirs.

What it will not do

  • Add a badge without evidence. Each one needs a config file, a manifest entry or an explicit request.
  • Guess a name. The package name comes from the manifest and the workflow filename from .github/workflows/.
  • Hard-code a value such as a version number where a dynamic endpoint exists.
  • Insert a dead badge. What it cannot resolve is skipped and listed in the summary.
  • Touch anything outside the markers. Badges and content elsewhere in the README are yours; it changes them only after an explicit yes.