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

@prompt-registry/collection-scripts

v1.0.3

Published

Shared scripts for building, validating, and publishing Copilot prompt collections

Downloads

426

Readme

@prompt-registry/collection-scripts

Shared scripts for building, validating, and publishing Copilot prompt collections.

Installation

Option 1: Use with npx (Recommended)

No installation required - run from anywhere:

npx --package @prompt-registry/collection-scripts validate-collections

Option 2: Install locally

npm install @prompt-registry/collection-scripts

Option 3: Install globally

npm install -g @prompt-registry/collection-scripts

Usage

npx (No Installation Required)

# Validate collections
npx --package @prompt-registry/collection-scripts validate-collections --verbose

# Create a new skill (interactive)
npx --package @prompt-registry/collection-scripts create-skill

# Create a skill (non-interactive)
npx --package @prompt-registry/collection-scripts create-skill my-skill --description "A helpful skill" --non-interactive

# Validate skills
npx --package @prompt-registry/collection-scripts validate-skills

# Build collection bundle
npx --package @prompt-registry/collection-scripts build-collection-bundle --collection-file collections/my.collection.yml --version 1.0.0

# List collections
npx --package @prompt-registry/collection-scripts list-collections

# Publish affected collections (CI/CD)
npx --package @prompt-registry/collection-scripts publish-collections

After Installation

If installed locally or globally, you can run commands directly:

validate-collections --verbose
create-skill my-skill --description "A helpful skill"

CLI Commands

| Command | Description | |---------|-------------| | validate-collections | Validate collection YAML files | | validate-skills | Validate skill folders following Agent Skills spec | | build-collection-bundle | Build a collection bundle ZIP | | compute-collection-version | Compute next version from git tags | | detect-affected-collections | Detect collections affected by file changes | | generate-manifest | Generate deployment manifest | | publish-collections | Build and publish affected collections | | list-collections | List all collections in repo | | create-skill | Create a new skill directory structure | | compute-ratings | Compute ratings from GitHub Discussion feedback comments (star ratings) | | setup-discussions | Create GitHub Discussions for bundle ratings |

Engagement Tools

These tools help set up and manage the engagement system for collecting bundle ratings and feedback.

setup-discussions

Creates GitHub Discussions for all bundles in a hub configuration. The discussions are used to collect ratings and feedback via comments with star ratings (1-5 ⭐).

# Basic usage - creates discussions for all bundles
GITHUB_TOKEN=ghp_xxx npx --package @prompt-registry/collection-scripts setup-discussions https://github.com/org/hub-config

# Dry run to preview what would be created
GITHUB_TOKEN=ghp_xxx npx --package @prompt-registry/collection-scripts setup-discussions --dry-run org/hub-config

# Specify branch and output file
GITHUB_TOKEN=ghp_xxx npx --package @prompt-registry/collection-scripts setup-discussions -b develop -o my-collections.yaml org/hub-config

# Specify discussion category
GITHUB_TOKEN=ghp_xxx npx --package @prompt-registry/collection-scripts setup-discussions --category "Bundle Ratings" org/hub-config

Requirements:

  • Hub config must have engagement.backend.repository configured
  • GitHub token needs repo and write:discussion scopes
  • Engagement repository must have GitHub Discussions enabled

Output: Creates a collections.yaml file mapping bundles to discussion numbers.

compute-ratings

Fetches feedback comments from GitHub Discussions, parses star ratings (1-5), and computes aggregate ratings. Also supports legacy thumbs up/down reactions for backward compatibility.

# Compute ratings from collections.yaml
GITHUB_TOKEN=ghp_xxx npx --package @prompt-registry/collection-scripts compute-ratings --config collections.yaml --output ratings.json

Workflow:

  1. Run setup-discussions once to create discussions and generate collections.yaml
  2. Run compute-ratings periodically (e.g., via GitHub Actions) to update ratings.json
  3. Host ratings.json statically and reference it in hub config's engagement.ratings.ratingsUrl

Programmatic API

import {
  // Validation
  validateCollectionId,
  validateVersion,
  validateItemKind,
  validateCollectionFile,
  validateAllCollections,
  generateMarkdown,
  VALIDATION_RULES,
  
  // Collections
  listCollectionFiles,
  readCollection,
  resolveCollectionItemPaths,
  
  // Bundle ID
  generateBundleId,
  
  // CLI utilities
  parseSingleArg,
  parseMultiArg,
  hasFlag,
  getPositionalArg,
} from '@prompt-registry/collection-scripts';

Usage in package.json

{
  "scripts": {
    "validate": "validate-collections",
    "build": "build-collection-bundle --collection-file collections/my.collection.yml --version 1.0.0",
    "publish": "publish-collections"
  }
}

Development

cd lib
npm install
npm run build
npm test

License

MIT