Skills in OpenAI API
Skills in OpenAI API (https://developers.openai.com/cookbook/examples/skills_in_api)
OpenAI’s adoption of Skills continues to gain ground. You can now use Skills directly in the OpenAI API with their shell tool (https://developers.openai.com/api/docs/guides/tools-shell/). You can zip skills up and upload them first, but I think an even neater interface is the ability to send skills with the JSON request as inline base64-encoded zip data, as seen in this script (https://github.com/simonw/research/blob/main/openai-api-skills/openai_inline_skills.py):
r = OpenAI().responses.create( model=“gpt-5.2”, tools=[ { “type”: “shell”, “environment”: { “type”: “container_auto”, “skills”: [ { “type”: “inline”, “name”: “wc”, “description”: “Count words in a file.”, “source”: { “type”: “base64”, “media_type”: “application/zip”, “data”: b64_encoded_zip_file, }, } ], }, } ], input=“Use the wc skill to count words in its own SKILL.md file.”, ) print(r.output_text)
I built that example script after first having Claude Code for web use Showboat (https://simonwillison.net/2026/Feb/10/showboat-and-rodney/) to explore the API for me and create this report (https://github.com/simonw/research/blob/main/openai-api-skills/README.md). My opening prompt for the research project was:
Run uvx showboat –help - you will use this tool later
Fetch https://developers.openai.com/cookbook/examples/skills_in_api.md to /tmp with curl, then read it
Use the OpenAI API key you have in your environment variables
Use showboat to build up a detailed demo of this, replaying the examples from the documents and then trying some experiments of your own
Tags: ai (https://simonwillison.net/tags/ai), openai (https://simonwillison.net/tags/openai), generative-ai (https://simonwillison.net/tags/generative-ai), llms (https://simonwillison.net/tags/llms), ai-assisted-programming (https://simonwillison.net/tags/ai-assisted-programming), skills (https://simonwillison.net/tags/skills), showboat (https://simonwillison.net/tags/showboat)