sverklo
/* badges */

Health Score Badge

Add an A–F code health grade to your project's README. Signal structural quality to contributors, reviewers, and users — powered by sverklo audit.

Badge grades

The health score combines four dimensions: dead code percentage, circular dependencies, coupling (max fan-in), and security issues. Each dimension is equally weighted to produce a letter grade.

sverkloA sverkloB sverkloC sverkloD sverkloF

Grade breakdown

A (90–100) — Excellent structure, minimal dead code, no circular deps, low coupling, no security flags.
B (75–89) — Good health with minor issues. Most well-maintained projects land here.
C (60–74) — Noticeable structural issues. Worth investigating god nodes and coupling.
D (40–59) — Significant structural problems. Refactoring recommended.
F (0–39) — Critical issues across multiple dimensions.

Add the badge to your README

  1. Run the audit on your project to get your grade:
    $ sverklo audit
  2. Copy the badge markdown and paste it into your README.md:
    [![Sverklo Health](https://img.shields.io/badge/sverklo-A-brightgreen)](https://sverklo.com)

    Replace the grade letter and color to match your score:

    A → brightgreen B → green C → yellow D → orange F → red
  3. That's it. Your README now signals code health to every visitor. When the badge API launches, your badge will auto-update on every push.

Coming soon: dynamic badges

We're building a badge API at sverklo.com/badge/:owner/:repo.svg that auto-updates your health grade. Once live, your badge markdown becomes:

[![Sverklo Health](https://sverklo.com/badge/OWNER/REPO.svg)](https://sverklo.com/report/OWNER/REPO)

The badge will link to a public report card page with your full audit breakdown.

Why add a health badge?

For maintainers: Signal that you care about structural quality, not just test coverage. The health score catches what coverage badges miss — god classes, circular dependencies, dead code, and coupling hotspots.

For contributors: Understand the codebase health before diving in. A project with an A grade is structurally clean. A D grade means expect complexity.

For evaluators: When choosing between similar libraries, the health badge gives a quick structural quality signal alongside stars and downloads.

Get your health grade

Run the audit on any project. Takes under 30 seconds.

$ npm install -g sverklo && sverklo audit