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

issue-classifier

v1.0.1

Published

A lightweight Node.js tool to classify GitHub issues into easy, medium, or difficult using AI with fallback between Mosaia and OpenRouter.

Readme

# Issue Classifier

A lightweight Node.js tool that uses AI models to classify GitHub issues by difficulty level: **easy**, **medium**, or **difficult**.  
It analyzes the issue's title, description, programming language, and labels to provide a structured difficulty rating.

---

## Getting API Keys

### 1. OpenRouter API Key

This project uses OpenRouter as a fallback AI provider with the model `mistralai/mistral-small-3.2-24b-instruct:free`.

- Go to [OpenRouter](https://openrouter.ai/)
- Sign in and navigate to your **Profile**.
- Go to the **Keys** section.
- Click **Create API Key** to generate a new key.
- Copy the API key for use in your `.env` file.

### 2. Mosaia API Key and Agent ID

Mosaia is the primary AI provider used.

- Visit [Mosaia](https://www.mosaia.io/)
- Sign up or log in.
- Navigate to your user dashboard at:  
  `https://www.mosaia.ai/user/blizet/agent/Issue-classifier`  
  *(Replace `blizet` with your username if different.)*
- Create a new **Agent** for your project if you haven't already.
- Copy the **Agent ID** (example: `6861a37adc8f3af29840e926`).
- Create a new **App** within your Mosaia account to generate an **API Key**.
- Copy the API key for use in your `.env` file.

---

## Setup

1. Clone the repository:

   ```bash
   git clone https://github.com/yourusername/issue-classifier.git
   cd issue-classifier
  1. Install dependencies:

    npm install
  2. Create a .env file in the root of the project with the following content:

    MOSAIA_API_KEY=your_mosaia_api_key_here
    MOSAIA_AGENT_ID=your_mosaia_agent_id_here
    OPENROUTER_API_KEY=your_openrouter_api_key_here

    Replace the placeholders with your actual keys.


Usage

import { IssueClassifier } from "./classify.js";
import "dotenv/config";

async function main() {
  const classifier = new IssueClassifier({
    mosaiaApiKey: process.env.MOSAIA_API_KEY,
    mosaiaAgentId: process.env.MOSAIA_AGENT_ID,
    openRouterApiKey: process.env.OPENROUTER_API_KEY,
  });

  const title = "Fix login bug on mobile";
  const description = "The login button doesn't respond on Android devices after recent UI update.";
  const language = "JavaScript";
  const labels = ["bug", "mobile"];

  const classification = await classifier.classifyIssue(title, description, language, labels);
  console.log("Classification result:", classification);
}

main();

Run the code using:

node index.js

Notes

  • Keep your .env file secure and add it to .gitignore to avoid exposing your API keys.
  • The classifier attempts to use Mosaia first, then falls back to OpenRouter if needed.
  • Labels are optional but can improve classification accuracy.

License

MIT License ©Blizet