Agent skill · AI & Agents

outlines

Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill outlines-alchimie-di-circe-extractor-desktop-ap-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 21 KB
Bundled scripts: none
Version: 1.0.0
Declared author: Orchestra Research
Requires: [outlines, transformers, vllm, pydantic]
Path: skills/ai-llm/outlines-alchimie-di-circe-extractor-desktop-ap-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Outlines guarantees valid JSON/XML/code structure during generation, uses Pydantic models for type-safe outputs, and supports local models (Transformers, vLLM). It aims to maximize inference speed with a structured generation approach. It exposes various generators (json, choice, regex, integer, float) and backends (Transformers, llama.cpp, vLLM, OpenAI) to produce outputs that conform to schemas. It includes templates for constrained token sampling using CFG/FSM, and provides examples showing how to build and validate outputs against Pydantic models or JSON schemas.

How it works

  1. Convert the target schema (JSON, Pydantic, or regex) into a grammar (CFG).
  2. Transform the CFG into a Finite State Machine (FSM).
  3. During generation, filter tokens at each step to keep only valid options; fast-forward when only one valid token remains.
  4. Provide specialized generators (json, choice, regex, integer, float) mapped to the model backend.
  5. Support multiple backends (Transformers, llama.cpp, vLLM, OpenAI) for local or API-based inference.
  6. Integrate with Pydantic by wrapping outputs in user-defined models or leveraging automatic schema translation.

When to use it

Use Outlines when you need to guarantee valid output structure (JSON/XML/code), require type-safe outputs via Pydantic, want to run on local models for speed, and need structured generation aligned with a schema or JSON schema.

What it can touch

  • Local and API model backends via outlines models (Transformers, llama.cpp, vllm, openai).
  • Generators: json, choice, regex, integer, float.
  • Pydantic model-based outputs.

Caveats

License: MIT. Dependencies include outlines, transformers, vllm, pydantic. Some configurations assume local model availability and may require installation of extra backends for full functionality.

From the SKILL.md

# Outlines: Structured Text Generation ## When to Use This Skill Use Outlines when you need to: - **Guarantee valid JSON/XML/code** structure during generation - **Use Pydantic models** for type-safe outputs - **Support local models** (Transformers, llama.cpp, vLLM) - **Maximize inference speed** with zero-overhead structured generation - **Generate against JSON schemas** automatically - **Control token sampling** at the grammar level **GitHub Stars**: 8,000+ | **From**: dottxt.ai (formerly .txt) ## Installation ```bash # Base installation pip install outlines # With specific backends pip install outlines transformers # Hugging Face models pip install outlines llama-cpp-python # llama.cpp pip install outlines vllm # vLLM for high-throughput ``` ## Quick Start ### Basic Example: Classification ```python import outlines from typing import Literal # Load model model = outlines.models.transformers("microsoft/Phi-3-mini-4k-instruct") # Generate with type constraint prompt = "Sentiment of 'This product is amazing!': " generator = outlines.generate.choice(model, ["positive", "negative", "neutral"]) sentiment = generator(prompt) print(sentiment) # "positive" (guaranteed one of these) ``` #

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Installation
  3. Quick Start
  4. Basic Example: Classification
  5. With Pydantic Models
  6. Core Concepts
  7. 1. Constrained Token Sampling
  8. 2. Structured Generators
  9. 3. Model Backends
  10. 4. Pydantic Integration
  11. Common Patterns
  12. Pattern 1: Data Extraction
  13. Pattern 2: Classification
  14. Pattern 3: Structured Forms
Ships with 1 file
  • metadata.json
Commands it runs
Base installation
pip install outlines
With specific backends
pip install outlines transformers  # Hugging Face models
pip install outlines llama-cpp-python  # llama.cpp
pip install outlines vllm  # vLLM for high-throughput
More from claude-skill-registry
All skills →
About this skill
What does the outlines skill do?

Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill outlines-alchimie-di-circe-extractor-desktop-ap-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going