Instructor Structured LLM Outputs
Orchestra-Research/AI-Research-SKILLs
Shows how to pull validated, typed data out of LLM responses with Instructor and Pydantic models, including retries on failure and partial streaming.
Structured LLM outputs with Instructor — Pydantic models as response schemas for OpenAI, Anthropic, and any OpenAI-compatible API.
$ npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install AlexAI-MCP/hermes-CCC instructor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/instructor .claude/skills/instructor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "instructor" agent skill from https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructor into .claude/skills/instructor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "instructor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install AlexAI-MCP/hermes-CCC instructor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/instructor .agents/skills/instructor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "instructor" agent skill from https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructor into .agents/skills/instructor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "instructor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install AlexAI-MCP/hermes-CCC instructor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/instructor .cursor/skills/instructor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "instructor" agent skill from https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructor into .cursor/skills/instructor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "instructor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/AlexAI-MCP/hermes-CCC.git --path skills/instructor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install AlexAI-MCP/hermes-CCC instructor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/instructor .gemini/skills/instructor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "instructor" agent skill from https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructor into .gemini/skills/instructor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "instructor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install AlexAI-MCP/hermes-CCC instructorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/instructor .github/skills/instructor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "instructor" agent skill from https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructor into .github/skills/instructor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "instructor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install AlexAI-MCP/hermes-CCC instructor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/instructor .opencode/skills/instructor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "instructor" agent skill from https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/instructor into .opencode/skills/instructor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "instructor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
instructorStructured LLM outputs with Instructor — Pydantic models as response schemas for OpenAI, Anthropic, and any OpenAI-compatible API.
Instructor is an agent skill from AlexAI-MCP/hermes-CCC. Structured LLM outputs with Instructor — Pydantic models as response schemas for OpenAI, Anthropic, and any OpenAI-compatible API.
Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering. It works with OpenAI and Pydantic. The repository describes itself as: Hermes Agent ported to Claude Code Channel — 46 native skills, no OAuth, no external process. The licence is MIT.
Read from SKILL.md and the folder at commit 8107e89. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Instructor loads about 993 tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 61 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from AlexAI-MCP/hermes-CCC at commit 8107e89, republished under its MIT licence (© AlexAI-MCP). 61 words, ~993 tokens.
.claude/skills/instructor/SKILL.md (or your agent's skills folder).Get type-safe, validated Pydantic objects from any LLM instead of raw strings.
pip install instructor pydantic
pip install anthropic # or openaiimport anthropic
import instructor
from pydantic import BaseModel
client = instructor.from_anthropic(anthropic.Anthropic())
class UserProfile(BaseModel):
name: str
age: int
skills: list[str]
experience_years: int
profile = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{
"role": "user",
"content": "Extract: John is a 32-year-old Python developer with 8 years experience in ML and DevOps."
}],
response_model=UserProfile,
)
print(profile.name) # "John"
print(profile.age) # 32
print(profile.skills) # ["Python", "ML", "DevOps"]
print(profile.experience_years) # 8import openai
import instructor
client = instructor.from_openai(openai.OpenAI())
result = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "..."}],
response_model=UserProfile,
)from pydantic import BaseModel, Field
from typing import Optional
class Address(BaseModel):
street: str
city: str
country: str
class Company(BaseModel):
name: str
industry: str
founded_year: int
headquarters: Address
employee_count: Optional[int] = None
class ResearchPaper(BaseModel):
title: str
authors: list[str]
abstract: str
key_findings: list[str] = Field(description="3-5 bullet points")
methodology: str
year: intfrom pydantic import BaseModel, field_validator, Field
class SentimentAnalysis(BaseModel):
sentiment: str = Field(description="positive, negative, or neutral")
confidence: float = Field(ge=0, le=1)
reasoning: str
@field_validator("sentiment")
def validate_sentiment(cls, v):
if v not in ["positive", "negative", "neutral"]:
raise ValueError("Must be positive, negative, or neutral")
return vfrom instructor import Partial
for partial_profile in client.messages.stream(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "..."}],
response_model=Partial[UserProfile],
):
print(partial_profile) # updates as tokens arrivefrom typing import Iterable
class Contact(BaseModel):
name: str
email: str
phone: Optional[str]
# Extract multiple contacts from one text
class ContactList(BaseModel):
contacts: list[Contact]
text = """
Alice: alice@example.com, 555-1234
Bob: bob@example.com
Carol: carol@example.com, 555-5678
"""
result = client.messages.create(
model="claude-haiku-4-5",
max_tokens=512,
messages=[{"role": "user", "content": f"Extract contacts:\n{text}"}],
response_model=ContactList,
)
for contact in result.contacts:
print(contact.name, contact.email)client = instructor.from_openai(
openai.OpenAI(
base_url="http://localhost:8000/v1",
api_key="not-needed"
),
mode=instructor.Mode.JSON,
)© AlexAI-MCP, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/instructor of AlexAI-MCP/hermes-CCC.
Open the folder on GitHubat commit 8107e89
Instructor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Instructor this skillAlexAI-MCP/hermes-CCC | 135 | — | ~993 | Automated safety check: Pass | MIT | |
| Instructor Structured LLM OutputsOrchestra-Research/AI-Research-SKILLs | 13k | 6 repos | ~4.2k | Automated safety check: Pass | MIT | |
| Uipath FunctionsUiPath/skills | 167 | — | ~3.6k | Automated safety check: Notes | MIT | |
| FastapiOpen-TutorAi/open-tutor-ai-CE | 108 | 2 repos | ~2.6k | Automated safety check: Pass | BSD-3-Clause | |
| Extracting Structured DataGAIK-project/gaik-toolkit | 100 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Structured Extractionericrisco/rsc-harness | 180 | — | ~3.6k | Automated safety check: Pass | MIT |
Orchestra-Research/AI-Research-SKILLs
Shows how to pull validated, typed data out of LLM responses with Instructor and Pydantic models, including retries on failure and partial streaming.
UiPath/skills
UiPath Coded Functions — deterministic Python or TypeScript/JavaScript units built with the uip function CLI (new -l py|ts|js, init, serve, run, pack, publish); the functions map in uipath.json…
Open-TutorAi/open-tutor-ai-CE
FastAPI best practices and conventions. An agent skill from Open-TutorAi/open-tutor-ai-CE.
GAIK-project/gaik-toolkit
Extracts structured data — fields, tables, line items — out of documents into a validated schema using the gaik toolkit, and designs schemas that stay inside provider limits and produce checkable…
ericrisco/rsc-harness
A skill your agent uses when text must become a typed, schema-conformant object you can trust — pulling fields into a fixed JSON shape, extracting line items as typed records, classifying into…
vercel-labs/ai-facts
Answer questions about the AI SDK and help build AI-powered features.
AlexAI-MCP/hermes-CCC
Review GitHub pull requests with a findings-first engineering mindset.
AlexAI-MCP/hermes-CCC
Run a disciplined GitHub pull request workflow from branch creation through merge.
AlexAI-MCP/hermes-CCC
Manage durable project memory for Claude Code. An agent skill from AlexAI-MCP/hermes-CCC.
AlexAI-MCP/hermes-CCC
Route Claude Code work by complexity, risk, and tool needs. An agent skill from AlexAI-MCP/hermes-CCC.
AlexAI-MCP/hermes-CCC
Create, improve, inventory, and audit Claude Code skills. An agent skill from AlexAI-MCP/hermes-CCC.
AlexAI-MCP/hermes-CCC
Capture Claude Code interaction trajectories in training-friendly formats.
Categories
Structured LLM outputs with Instructor — Pydantic models as response schemas for OpenAI, Anthropic, and any OpenAI-compatible API. Instructor is an agent skill from AlexAI-MCP/hermes-CCC. Structured LLM outputs with Instructor — Pydantic models as response schemas for OpenAI, Anthropic, and any OpenAI-compatible API.
Instructor fits situations like: AI & LLM Engineering work in your project.
Run `npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a claude-code`. Or copy the skill folder (skills/instructor in AlexAI-MCP/hermes-CCC) into .claude/skills/instructor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a codex`. Or copy the skill folder (skills/instructor in AlexAI-MCP/hermes-CCC) into .agents/skills/instructor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AlexAI-MCP/hermes-CCC --skill instructor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/instructor, .gemini/skills/instructor, .github/skills/instructor and .opencode/skills/instructor in your project.
Going by SKILL.md and its folder, Instructor needs the command-line tools its instructions call (pip). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Instructor is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 993 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Instructor: Instructor Structured LLM Outputs (Orchestra-Research/AI-Research-SKILLs, 13k stars), Uipath Functions (UiPath/skills, 167 stars), Fastapi (Open-TutorAi/open-tutor-ai-CE, 108 stars) and Extracting Structured Data (GAIK-project/gaik-toolkit, 100 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
AlexAI-MCP (a GitHub user) maintains it in AlexAI-MCP/hermes-CCC, which has 135 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on April 8, 2026.
Source: AlexAI-MCP/hermes-CCC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.