npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pr-template-check

v0.1.0

Published

Check a draft pull request body against a GitHub repo's own PR template before you open it

Readme

pr-template-check

Check a draft pull request body against a GitHub repo's own PR template — before you open the PR.

Why

Every repo enforces its .github/pull_request_template.md differently: some require every checklist box, some require a ## Description heading, some require a Fixes #123 reference, and reviewers (or bots) will bounce your PR back if you miss one. There's no way to know which of those a given repo actually cares about except by opening the template file and reading it yourself, every single time, for every repo you contribute to.

pr-template-check reads the target repo's own template, extracts what it actually asks for (checklist items, required headings, an expected Fixes #N reference), and checks your draft against it locally — before you submit anything.

Install

npm install -g pr-template-check

Requires the GitHub CLI (gh), authenticated, since that's what pr-template-check uses to read repo contents and PR bodies.

Usage

Check a draft body file against a repo's template:

pr-template-check check --repo dotnet/aspnetcore --body-file draft.md

Check the body of a PR you've already opened:

pr-template-check check --repo dotnet/aspnetcore --pr 69280

Pipe a draft from stdin:

cat draft.md | pr-template-check check --repo dotnet/aspnetcore

Or just see what a repo's template actually requires:

pr-template-check template --repo dotnet/aspnetcore

If --repo is omitted, it's inferred from the current directory's git remote get-url origin.

Example

$ pr-template-check check --repo dotnet/aspnetcore --pr 69280
Template: .github/pull_request_template.md

Checklist items:
  [x] You've read the Contributor Guide and Code of Conduct.
  [x] You've included unit or integration tests for your change, where applicable.
  [x] You've included inline docs for your change, where applicable.
  [x] There's an open issue for the PR that you are making.

Required sections:
  ✓ ## Description

Placeholders to fill in manually (not auto-verifiable):
  ✓ found an issue reference  Fixes #{bug number} (in this specific format)

PASS: all required checklist items and sections are present.

The exit code is 0 on pass and 1 on fail, so it's usable as a pre-submit script or a local git hook.

How matching works

  • Checklist items (- [ ] ... lines in the template) are matched against checklist lines in your draft using word-overlap, so minor rewording doesn't cause a false negative — but a missing item is reported as [MISSING].
  • Headings (## ...) must appear with matching text somewhere in your draft.
  • A placeholder title like # {PR title} is recognized as an instruction to the contributor, not a literal required heading, and is skipped.
  • A Fixes #{...} / Closes #{...} / Resolves #{...} placeholder is checked against your body for an actual fixes/closes/resolves #<number> reference, but — unlike checklist items and headings — it's reported as a warning only and never fails the check, since not every repo strictly requires a linked issue.
  • Everything else in the template (free-form prose, other placeholders) is printed for manual review, since it can't be reliably auto-verified.

Development

npm install
npm test        # vitest
npm run build   # tsup -> dist/
npm run typecheck

License

MIT