upstage-schema-generation

upstage-schema-generation is a skill for Claude Code from UpstageAI/upstage-extensions-hub. It costs 101 tokens per session (775 once invoked), scanned B, original, MIT.

A tool that creates a JSON schema, a structured list of fields and rules, for extracting information from documents using Upstage's document-processing service.

In plain words
What is it for?
Use it to define what information to extract from PDFs and similar documents, either through the Upstage API or a more carefully tuned visual-document mode.
Why use it?
It removes the need to design extraction fields by hand when turning invoices or other sample documents into structured data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the upstage-ai plugin — 9 skills shipped together

Good fit Use it to define what information to extract from PDFs and similar documents, either through the Upstage API or a more carefully tuned visual-document mode.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/upstageai/upstage-extensions-hub/upstage-schema-generation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add UpstageAI/upstage-extensions-hub --skill upstage-schema-generation
Clone the repo
git clone --depth 1 https://github.com/UpstageAI/upstage-extensions-hub

Made for: Claude Code.

Or install upstage-ai, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upstage-schema-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/upstageai/upstage-extensions-hub/upstage-schema-generation/github.svg)](https://agentmods.dev/skills/upstageai/upstage-extensions-hub/upstage-schema-generation)
Your own site
<a href="https://agentmods.dev/skills/upstageai/upstage-extensions-hub/upstage-schema-generation"><img src="https://agentmods.dev/badge/skills/upstageai/upstage-extensions-hub/upstage-schema-generation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upstage-schema-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/upstageai/upstage-extensions-hub/upstage-schema-generation"><img src="https://agentmods.dev/badge/skills/upstageai/upstage-extensions-hub/upstage-schema-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.00775
Opus 5 $0.00051 $0.00387
Sonnet 5 $0.00020 $0.00155
Haiku 4.5 $0.00010 $0.00077

Measured 11d ago against content hash 63c80ccdff2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

upstage-schema-generation scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

response = requests.post( "https://api.upstage.ai/v1/information-extraction/schema-generation",

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.post(
skills/upstage-schema-generation/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Upstage Schema Generation

Analyze sample documents and automatically generate a JSON schema for use with Information Extraction.

Prerequisites

  • API Key: UPSTAGE_API_KEY environment variable is required. Get your key at console.upstage.ai.

Two Modes

Mode When to use Latency
API mode Default. Fast schema generation via Upstage endpoint. Low
VLM mode (claude-opus-4-6) When the user wants careful, hand-tuned schemas with precise extraction rules and table-aware design. High

API Mode (Default)

Endpoint: POST https://api.upstage.ai/v1/information-extraction/schema-generation

import os
import json
import requests
import base64

api_key = os.environ["UPSTAGE_API_KEY"]

with open("document.pdf", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://api.upstage.ai/v1/information-extraction/schema-generation",
    headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
    json={
        "model": "information-extract",
        "messages": [
            {"role": "system", "content": "Generate schema for this invoice document."},
            {"role": "user", "content": [
                {"type": "image_url", "image_url": {"url": f"data:application/pdf;base64,{b64}"}}
            ]}
        ]
    }
)

schema = json.loads(response.json()["choices"][0]["message"]["content"])
print(json.dumps(schema, indent=2))

Note: The API model is information-extract (not schema-generate). The system message can guide the schema focus (e.g., "Generate schema about bank_name."). Up to 3 sample images can be provided in the user message.

VLM Mode

For carefully designed schemas with precise extraction rules, follow the 4-step VLM workflow.

  • Workflow: Read references/vlm-workflow.md (parameter gathering, document reading, property list, JSON schema conversion)
  • Design rules: Read references/schema-design.md (key naming, descriptions, table handling, blank/duplicate handling)

Read the full file on GitHub · 75 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 75 lines · 101 tokens per session scan B 63c80ccdff2b

Subscribe to this mod's changes

upstage-schema-generation is a skill published in the GitHub repository UpstageAI/upstage-extensions-hub (10 stars, last pushed 4mo ago), licensed MIT. It adds 101 tokens to every session and 775 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens

llamaindex

Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…

davila7/claude-code-templates · 70 tokens

jupyter-notebooks

Create, edit, or validate reproducible SQL or Python notebooks. Use for notebooks, SQL/Python scratchpads, reproducible exploration, audit trails, or runnable companions where the analysis should be reviewable or rerunnable.

XiaomiMiMo/MiMo-Code · 49 tokens

extracting-keywords

Use when extracting keywords (YAKE/RAKE) from documents — and, secondarily, when detecting document language or generating embeddings for RAG and search. Covers the keyword config (and its feature gating), --detect-language, and the standalone embed command with real flags.

xberg-io/xberg · 63 tokens

azure-ai-document-intelligence-dotnet

Azure AI Document Intelligence SDK for .NET. Extract text, tables, and structured data from documents using prebuilt and custom models. Use for invoice processing, receipt extraction, ID document analysis, and custom document models. Triggers: "Document Intelligence", "DocumentIntelligenceClient", "form recognizer"…

microsoft/skills · 83 tokens

azure-ai-document-intelligence-ts

Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence). Use when processing invoices, receipts, IDs, forms, or building custom document models.

microsoft/skills · 47 tokens