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

patternfeed

v0.1.3

Published

Crowdsourced coding anti-patterns library for smarter AI coding assistants

Readme

PatternFeed

Crowdsourced coding anti-patterns library for smarter AI coding assistants

PatternFeed is an open-source platform where:

  1. Testers submit structured bug reports when testing apps
  2. AI extracts reusable "patterns to avoid" from reports
  3. Library grows into an importable knowledge base for Claude Code users
  4. Rewards = attribution, reputation, and access (no money required)

Quick Start

# Install globally
npm install -g patternfeed

# Search existing patterns
patternfeed search "useEffect dependencies"

# Generate CLAUDE.md rules for your stack
patternfeed generate-rules --stack react nextjs -o .claude/rules/patternfeed.md

# Start MCP server for Claude Code integration
patternfeed serve

Features

For Testers: Submit Bug Reports

patternfeed test https://github.com/example/repo

Interactive CLI guides you through:

  • Context: Stack, framework versions, environment
  • Bug: What went wrong (steps to reproduce)
  • Expected: What should have happened
  • Root Cause: Why it happened (if known)
  • Fix: How it was fixed (if applicable)

AI then extracts a reusable anti-pattern from your report.

For Library Users: Import Patterns

Option 1: MCP Server (Recommended)

Add to your ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "patternfeed": {
      "command": "patternfeed",
      "args": ["serve"]
    }
  }
}

Claude Code can then:

  • get_relevant_patterns - Get patterns for your current stack
  • check_code - Check code against anti-patterns
  • search_patterns - Search the library

Option 2: CLAUDE.md Generator

# Generate rules for your stack
patternfeed generate-rules --stack react nextjs typescript > .claude/rules/patternfeed.md

For Contributors: Build Reputation

No money involved, but real value:

| Tier | Requires | Unlocks | |------|----------|---------| | Contributor | 1+ verified pattern | Submit patterns, basic library access | | Reviewer | 10+ patterns, 90%+ quality | Review others' patterns, early access | | Maintainer | 50+ patterns, community election | Curate categories, merge patterns |

Every pattern has attribution: contributedBy: @your-username

Commands

# Test and submit bug reports
patternfeed test <repo-or-url>    # Interactive bug report
patternfeed submit report.json    # Submit existing report
patternfeed submit report.json --dry-run  # Preview extraction

# Browse patterns
patternfeed search <query>        # Search patterns
patternfeed search hydration --framework react
patternfeed search --category async --severity critical

# Generate rules
patternfeed generate-rules --stack react nextjs
patternfeed generate-rules --categories hooks async -o rules.md

# MCP server
patternfeed serve                 # Start MCP server (stdio)

# Initialize library
patternfeed init                  # Create local library structure

Pattern Structure

Patterns are stored as YAML files:

id: react-useeffect-missing-deps-001
title: Missing useEffect dependencies cause stale closures
context:
  frameworks: [React 18, React 19]
  languages: [JavaScript, TypeScript]
  appliesWhen: Using useEffect with variables from component scope
  categories: [hooks, state, async]
antiPattern: |
  useEffect(() => {
    console.log(count);  // Stale closure!
  }, []);  # Missing dependency
correctPattern: |
  useEffect(() => {
    console.log(count);
  }, [count]);  # Include dependencies
explanation: When useEffect dependencies are missing, the callback...
severity: high
confidence: 0.95
contributedBy: username
sourceReport: uuid
verified: true
votes: 42

Library Structure

library/
├── index.json          # Searchable index
├── schema.json         # Validation schema
└── patterns/
    ├── react/
    │   ├── hooks/
    │   └── state/
    ├── nextjs/
    │   └── hydration/
    ├── typescript/
    │   └── types/
    └── general/
        └── async/

Environment Variables

# Required for pattern extraction (submitting reports)
ANTHROPIC_API_KEY=sk-ant-...

# Optional: custom library path
PATTERNFEED_LIBRARY=/path/to/library

Development

# Clone and install
git clone https://github.com/patternfeed/patternfeed
cd patternfeed/cli
npm install

# Build
npm run build

# Link for local development
npm link

# Run in development
npm run dev  # Watch mode

Contributing

  1. Find a bug in any open-source project
  2. Submit a report: patternfeed test <repo>
  3. AI extracts a reusable pattern
  4. Community verifies the pattern
  5. Your attribution stays with the pattern forever

Categories

  • UI/Rendering: hydration, rendering, state, props, hooks
  • Async: async, promises, callbacks, race-conditions
  • Network: api, fetch, networking, caching
  • Security: auth, security, validation, sanitization
  • Performance: performance, memory, optimization
  • Types: types, typescript
  • Testing: testing, mocking, fixtures
  • Database: database, orm, queries, migrations
  • DevOps: deployment, build, bundling, config

Severity Levels

  • Critical: Security vulnerabilities, data loss, crashes
  • High: Functionality broken, significant bugs
  • Medium: Unexpected behavior, edge cases
  • Low: Code quality, best practices

License

MIT

Acknowledgments

PatternFeed is inspired by crowdsourced testing platforms and the idea that bugs found once shouldn't be found again. Built with Claude for pattern extraction.