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

genai-skills

v1.1.0

Published

Install GenAI design pattern skills into AI coding assistants

Readme



What is this?

genai-skills gives your AI coding assistant expert knowledge about 29 GenAI design patterns — RAG, agents, prompt engineering, routing, safety, evaluation, cost optimization, and memory management. Instead of hallucinating architecture advice, your assistant references battle-tested patterns from genaipatterns.dev.

Each skill follows the Anthropic Agent Skills spec with YAML frontmatter for agent triggering, architecture rules, implementation steps, code templates, and verification checklists.

Quick Start

Official Skills CLI (recommended — installs to all detected agents):

npx skills add sangampandey/genaipatternsskills

Or with our CLI (single-tool targeting, category filtering):

npx genai-skills add --all

That's it. Your AI assistant now knows 29 production patterns. Try asking it:

"Build a RAG pipeline for our knowledge base"

Supported Tools

| Tool | Official CLI | genai-skills CLI | |------|:---:|:---:| | Claude Code | npx skills add sangampandey/genaipatternsskills | npx genai-skills add --all | | Cursor | Same command (auto-detected) | npx genai-skills add --all --tool cursor | | Codex | Same command (auto-detected) | npx genai-skills add --all --tool codex | | Gemini CLI | Same command (auto-detected) | npx genai-skills add --all --tool gemini | | Windsurf, Augment, Cline, Roo Code, +30 more | Same command (auto-detected) | — |

The official CLI auto-detects all installed agents. Our CLI auto-detects from project config files.

Commands

genai-skills add <slug>              # Install a single skill
genai-skills add --all               # Install all 29 skills
genai-skills add --category <cat>    # Install by category
genai-skills list                    # List available skills
genai-skills remove <slug>           # Remove a skill

Skill Catalog

RAG (7 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Basic RAG | Beginner | Ground responses in external knowledge via retrieve-then-generate | | Semantic Indexing | Intermediate | Replace keyword matching with vector embeddings for meaning-based search | | Hybrid Retrieval | Intermediate | Combine keyword and semantic search to bridge the vocabulary gap | | Retrieval Refinement | Intermediate | Rerank, compress, and filter retrieved chunks before generation | | Agentic RAG | Advanced | Give an agent control over when, where, and how to retrieve | | Deep Search | Advanced | Iterative retrieval-reasoning cycles for complex multi-hop questions | | Grounded Generation | Advanced | Inline citations, out-of-domain detection, and attribution tracking |

Agents (5 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Tool Calling | Intermediate | Structured function calls to external systems | | ReAct Loop | Intermediate | Think-act-observe reasoning loop with tool use | | Code Execution | Intermediate | Generate and execute code in sandboxed environments | | Plan and Execute | Advanced | Separate strategic planning from tactical execution | | Multi-Agent Collaboration | Advanced | Coordinate multiple specialized agents on complex tasks |

Prompting (5 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Chain-of-Thought | Beginner | Step-by-step reasoning for math, logic, and analysis | | Few-Shot Prompting | Beginner | Teach format and behavior through input-output examples | | Prompt Chaining | Intermediate | Sequential focused prompts where each feeds the next | | Self-Consistency | Intermediate | Multiple reasoning paths with majority voting | | Prompt Optimization | Advanced | Automatically optimize prompts against eval datasets |

Routing & Orchestration (3 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Semantic Router | Intermediate | Classify intent via embeddings and route to handlers | | Model Router | Intermediate | Route to the right model tier based on complexity | | Cascading | Intermediate | Try cheap models first, escalate when confidence is low |

Safety & Guardrails (2 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Guardrails | Intermediate | Input/output/retrieval/execution safety layers | | Self-Check | Advanced | Detect hallucinations via confidence analysis |

Evaluation (2 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | LLM-as-Judge | Intermediate | LLM scoring with custom rubrics at scale | | Reflection | Intermediate | Iterative generate-evaluate-critique-regenerate loops |

Cost & Performance (3 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Prompt Caching | Intermediate | Reuse responses for repeated or similar prompts | | Inference Optimization | Advanced | Batching, KV cache optimization, model parallelism | | Small Language Models | Advanced | Distillation, quantization, and speculative decoding |

Memory & State (2 skills)

| Skill | Difficulty | What it does | |-------|:---:|------| | Conversation Memory | Beginner | Sliding windows, summaries, and entity tracking | | Long-Term Memory | Intermediate | Persist facts and preferences in external memory stores |

Quality Eval Results

Every skill is tested against a 3-suite eval framework before release:

======================================================================
  GenAI Pattern Skills — Evaluation Report
======================================================================

  Skills evaluated:    29
  Clean pass:          26/29 (3 minor warnings)
  Critical issues:     0
  Important issues:    0
  Warnings:            3

  Trigger accuracy:    13/13 (100%)

  Overall:             PASS
======================================================================

Eval suites:

| Suite | What it checks | |-------|---------------| | Structure | YAML frontmatter, required sections, file length | | Trigger Quality | Description has action verbs, trigger keywords, domain terms | | Content Quality | Architecture Rules and Implementation Steps are distinct, checklists are actionable | | Trigger Accuracy | 13 test prompts (10 positive, 3 negative) match the correct skills |

Run evals yourself:

git clone https://github.com/sangampandey/genaipatternsskills
node scripts/eval-skills.mjs

How Each Skill is Structured

Every skill file follows a consistent format optimized for AI agent consumption:

---
name: basic-rag
description: >-
  Implement the Basic RAG pattern (RAG). Ground LLM responses in
  external knowledge by retrieving relevant documents...
---

# Basic RAG

## What This Pattern Solves      ← Problem context
## When to Use This Skill        ← Trigger conditions
## Architecture Rules            ← Constraints and principles
## Implementation Steps          ← Ordered, imperative instructions
## Code Template                 ← Copy-paste Python starter
## Verification Checklist        ← Pre-flight checks
## Trade-offs                    ← When NOT to use this

From the Website

Every skill is sourced from a full pattern page on genaipatterns.dev with architecture diagrams, code examples, trade-off analysis, and composition guides.

Contributing

We welcome contributions! To add or improve a skill:

  1. Edit the source pattern MDX in content/patterns/{category}/{slug}.mdx
  2. Run node scripts/generate-skills.mjs to regenerate skills
  3. Run node scripts/eval-skills.mjs to verify quality
  4. Submit a PR

License

MIT © Sangam Pandey