Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Openai Openai python Skill Model

From Leeroopedia
Knowledge Sources
Domains API_Types, Python
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete tool for representing a skill object from the OpenAI API provided by the openai-python SDK.

Description

Skill is a Pydantic BaseModel representing a skill resource in the OpenAI API. It contains metadata fields including a unique id, created_at Unix timestamp, default_version and latest_version strings for version management, a description of the skill's purpose, a name, and an object type field that is always "skill".

Usage

Import Skill when you need to type-annotate or inspect individual skill objects returned from the skills API.

Code Reference

Source Location

Signature

class Skill(BaseModel):
    id: str
    created_at: int
    default_version: str
    description: str
    latest_version: str
    name: str
    object: Literal["skill"]

Import

from openai.types import Skill

I/O Contract

Fields

Name Type Required Description
id str Yes Unique identifier for the skill.
created_at int Yes Unix timestamp (seconds) for when the skill was created.
default_version str Yes Default version for the skill.
description str Yes Description of the skill.
latest_version str Yes Latest version for the skill.
name str Yes Name of the skill.
object Literal["skill"] Yes The object type, always "skill".

Usage Examples

from openai import OpenAI
from openai.types import Skill

client = OpenAI()

# List skills and inspect individual skill objects
skills = client.skills.list()
for skill in skills.data:
    print(f"Skill: {skill.name} (id={skill.id})")
    print(f"  Description: {skill.description}")
    print(f"  Default version: {skill.default_version}")
    print(f"  Latest version: {skill.latest_version}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment