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

ai-label-pr

v1.0.0

Published

GitHub Action that auto-labels PRs using AI — size labels (XS-XXL) and type labels (feature, fix, docs, refactor)

Readme

ai-label-pr

CI TypeScript License: MIT

GitHub Action that labels your pull requests automatically. Adds size labels (XS through XXL) based on lines changed, and type labels (feature, fix, docs, refactor, test, chore) using AI analysis of the diff.

on: pull_request
jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: ofershap/ai-label-pr@v1
        with:
          api-key: ${{ secrets.OPENAI_API_KEY }}
          provider: openai
          model: gpt-4o-mini

Supports OpenAI and Anthropic. Size labels use simple line-count thresholds. Type labels use AI to classify the diff. Just add your API key.

GitHub Action for automatic PR labeling by size and type

Demo built with remotion-readme-kit

Why

Labeling PRs by hand is tedious, and most teams either skip it or do it inconsistently. But labels matter: they make it easy to filter PRs by type, spot oversized changes that need extra review, and generate better changelogs. Existing PR labelers use simple rules (line count thresholds), which works for size but can't tell a feature from a refactor. This action combines rule-based size labels with AI-powered type classification. The AI reads the PR title and a sample of the diff, then picks the most fitting type. Each PR gets exactly one size label and one type label.

How it works

  • Size labels: based on total lines changed (additions + deletions). Thresholds: XS (<10), S (<50), M (<200), L (<500), XL (<1000), XXL (1000+).
  • Type labels: AI reads the PR title and diff (first 3000 chars), then picks one type: feature, fix, docs, refactor, test, or chore.

Existing size/type labels are removed before adding the new ones, so each PR gets exactly one of each.

Inputs

| Input | Description | Default | | -------------- | --------------------------------------- | --------------------- | | provider | AI provider: openai or anthropic | openai | | model | Model to use | gpt-4o-mini | | api-key | API key for the AI provider | required | | size-labels | Apply size labels (XS/S/M/L/XL/XXL) | true | | type-labels | Apply type labels using AI | true | | github-token | GitHub token (defaults to GITHUB_TOKEN) | ${{ github.token }} |

Size thresholds

| Label | Lines changed | | -------- | ------------- | | size/XS | < 10 | | size/S | < 50 | | size/M | < 200 | | size/L | < 500 | | size/XL | < 1000 | | size/XXL | 1000+ |

Type labels

| Label | Description | | ------------- | ------------------------------------------ | | type/feature | New functionality or capability | | type/fix | Bug fix or error correction | | type/docs | Documentation changes only | | type/refactor | Code restructuring without behavior change | | type/test | Adding or updating tests only | | type/chore | Build, CI, dependencies, or maintenance |

AI DevOps Suite

Part of the AI DevOps suite:

  • ai-commit-msg: AI-generated conventional commit messages
  • ai-pr-reviewer: AI-powered PR review comments
  • ai-changelog: AI-generated changelogs from merged PRs
  • ai-label-pr: Auto-label PRs by size and type (this project)

Development

npm install
npm run typecheck
npm run build
npm test
npm run lint

Author

Made by ofershap

LinkedIn GitHub

License

MIT © 2026 Ofer Shapira