genai-skills
v1.1.0
Published
Install GenAI design pattern skills into AI coding assistants
Maintainers
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/genaipatternsskillsOr with our CLI (single-tool targeting, category filtering):
npx genai-skills add --allThat'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 skillSkill 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.mjsHow 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 thisFrom 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:
- Edit the source pattern MDX in
content/patterns/{category}/{slug}.mdx - Run
node scripts/generate-skills.mjsto regenerate skills - Run
node scripts/eval-skills.mjsto verify quality - Submit a PR
License
MIT © Sangam Pandey
