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-code

Installs 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
1orchestra-research avatarslime-rl-trainingorchestra-research/ai-research-skillsProvides guidance for LLM post-training with RL using slime, a Megatron+SGLang framework. Use when training GLM models, implementing custom data generation work1Kskills.sh installs
2orchestra-research avatarllamaguardorchestra-research/ai-research-skillsMeta's 7-8B specialized moderation model for LLM input/output filtering. 6 safety categories - violence/hate, sexual content, weapons, substances, self-harm, cr1Kskills.sh installs
3orchestra-research avatarautogpt-agentsorchestra-research/ai-research-skillsAutonomous AI agent platform for building and deploying continuous agents. Use when creating visual workflow agents, deploying persistent autonomous agents, or 1Kskills.sh installs
4orchestra-research avatarlangsmith-observabilityorchestra-research/ai-research-skillsLLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring p1Kskills.sh installs
5orchestra-research avatarphoenix-observabilityorchestra-research/ai-research-skillsOpen-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations1Kskills.sh installs
6sanjay3290 avatardeep-researchsanjay3290/ai-skillsExecute autonomous multi-step research using Google Gemini Deep Research Agent. Use for: market analysis, competitive landscaping, literature reviews, technical706skills.sh installs