instructor
Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream…
Skill by Orchestra-Research
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/orchestra-research-instructor
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, ml, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/instructor
What's inside
- Skill name
instructor- Description
- Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream partial results with Instructor - battle-tested structured output library
- License
- MIT
- Instructions
- 732 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 732 lines (spec recommends under 500)
Files (4)
- SKILL.md
- examples.md · references/
- providers.md · references/
- validation.md · references/
SKILL.md (first lines)
# 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
```bash
# 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
```python
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())
# Extract structured data
user = client.messages.create(
model="claude-sonnet-4-5-20250929",
max_tokens=1024,
messages=[{
"role": "user",
"content": "John Doe is 30 years old. His email is john@example.com"
}],
response_model=User
)
print(user.name) # "John Doe"
print(user.age) # 30
print(user.email) # "john@example.com"
```
### With OpenAI
```python
from openai import OpenAI
client = instructor.from_openai(OpenAI())
user = client.chat.completions.create(
model="gpt-4o-mini",
response_model=User,
messages=[{"role": "user", "content": "Extract: Alice, 25, alice@email.com"}]
)
```
## Core Concepts
### 1. Response Models (Pydantic)
Response models define the structure and validation rules for LLM outputs.
#### Basic Model
```python
from pydantic import BaseModel, Field
class Article(BaseModel):
title: str = Field(description="Article title")
author: str = Field(description="Author name")
word_count: int = Field(description="Number of words", gt=0)
tags: list[str] = Field(description="List of relevant tags")
article = client.messages.create(
model="claude-sonnet-4-5-20250929",
max_tokens=1024,
messages=[{
"role": "user",
"content": "Analyze this article: [article text]"
}],
response_model=Article
)
```
**Benefits:**
- Type safety with Python type hints
- Automatic validation (word_count > 0)
- Self-documenting with Field descriptions
- IDE autocomplete support
#### Nested Models
```python
class Address(BaseModel):
street: str
city: str
country: str
class Person(BaseModel):
name: str
age: intFrom Orchestra-Research/AI-Research-SKILLs, MIT.
More from Orchestra-Research/AI-Research-SKILLs
- 0.686score
pinecone
Orchestra-Research
Managed vector database for production AI applications.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ml-training-recipes
Orchestra-Research
Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
chroma
Orchestra-Research
Open-source embedding database for AI applications.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
faiss
Orchestra-Research
Facebook's library for efficient similarity search and clustering of dense vectors.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-lightning
Orchestra-Research
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
gptq
Orchestra-Research
Post-training 4-bit quantization for LLMs with minimal accuracy loss.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentencepiece
Orchestra-Research
Language-independent tokenizer treating text as raw Unicode.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
langchain
Orchestra-Research
Framework for building LLM-powered applications with agents, chains, and RAG.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ray-data
Orchestra-Research
Scalable data processing for ML workloads.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
nemo-curator
Orchestra-Research
GPU-accelerated data curation for LLM training.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-fsdp2
Orchestra-Research
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentence-transformers
Orchestra-Research
Framework for state-of-the-art sentence, text, and image embeddings.
SkillCFreshness: C★ 13.9KClaude Code +9
Signals
- Stars
- 13,906
- Forks
- 973
- Open issues
- 11
- Last commit (this folder)
- Nov 20, 2025 (11 months ago)
- Last release
- Jun 16, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- orchestra-research.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.324score
instructor
Colin4k1024
Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream…
SkillCFreshness: C★ 14Claude Code +9 - 0.312score
instructor
Tommy-yw
Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream…
SkillCFreshness: C★ 510Claude Code +9 - 0.241score
instructor
future1314
Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream…
SkillDFreshness: DClaude Code +9
More from Orchestra-Research
- 0.686score
pytorch-lightning
Orchestra-Research
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
nemo-curator
Orchestra-Research
GPU-accelerated data curation for LLM training.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ray-data
Orchestra-Research
Scalable data processing for ML workloads.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-fsdp2
Orchestra-Research
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentencepiece
Orchestra-Research
Language-independent tokenizer treating text as raw Unicode.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
gptq
Orchestra-Research
Post-training 4-bit quantization for LLMs with minimal accuracy loss.
SkillCFreshness: C★ 13.9KClaude Code +9
Cite this page
instructor skill. Agent Mart. https://agentmart.dev/skills/orchestra-research-instructor (last updated 2026-10-24)