
Instructor
If you're tired of writing brittle JSON parsing code and handling LLM output errors manually, Instructor wraps Anthropic and OpenAI APIs to enforce Pydantic schemas on responses. Define your data structure once, and it automatically validates outputs, retries with error feedback when validation fails, and gives you proper Python objects instead of raw JSON strings. The streaming support is solid for real-time UIs, letting you show partial results as they generate. Over 15,000 GitHub stars and used by 100,000+ developers, so the edge cases are probably handled. It's the difference between hoping your LLM returns valid JSON and knowing it will.
- skills.sh installs
- 1K
- GitHub stars
- 14.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill instructor --agent claude-codeInstalls into .claude/skills of the current project.
Files
Instructor: Structured LLM Outputs
When to Use This Skill
Use Instructor when you need to:
- Extract structured data from LLM responses reliably
- Validate outputs against Pydantic schemas automatically
- Retry failed extractions with automatic error handling
- Parse complex JSON with type safety and validation
- Stream partial results for real-time processing
- Support multiple LLM providers with consistent API
GitHub Stars: 15,000+ | Battle-tested: 100,000+ developers
Installation
# Base installation
pip install instructor
# With specific providers
pip install "instructor[anthropic]" # Anthropic Claude
pip install "instructor[openai]" # OpenAI
pip install "instructor[all]" # All providers
Quick Start
Basic Example: Extract User Data
import instructor
from pydantic import BaseModel
from anthropic import Anthropic
# Define output structure
class User(BaseModel):
name: str
age: int
email: str
# Create instructor client
client = instructor.from_anthropic(Anthropic())
Sponsors
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- AI & Agent Building, Data Science & ML, Python
- First seen
- Jun 3, 2026
More from orchestra-research/ai-research-skills
All 95- Speculative Decoding1K
- Llama Factory1K
- Model Merging1K
- Nemo Curator1K
- Transformer Lens Interpretability1K
- Distributed Llm Pretraining Torchtitan1K
- Openrlhf Training1K
- Evaluating Code Models1K
- Gptq1K
- Sentencepiece1K
- Outlines1K
- Llamaindex1K
- Pyvene Interventions1K
- Simpo Training1K
- Slime Rl Training1K
- Training Llms Megatron1K
- Guidance1K
- Mamba Architecture1K
- Model Pruning1K
- Sparse Autoencoder Training1K
- Implementing Llms Litgpt1K
- Llamaguard1K
- Miles Rl Training1K
- Torchforge Rl Training1K