openai · OpenAI Platform Docs
Code generation | OpenAI API
Best practices and implementation strategies for using OpenAI models to generate functional, accurate, and secure programming code.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Code generation | OpenAI API
Best practices and implementation strategies for using OpenAI models to generate functional, accurate, and secure programming code.
When To Use
Use when you need to implement a workflow for generating code, improving code accuracy through prompting, or mitigating security risks like code injection in LLM-driven development tools.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/generation-openai-api-workflow-guide.md | A guide detailing options and methods for using OpenAI models for writing, reviewing, and editing code. | Questions about a guide detailing options and methods for using OpenAI models for writing, reviewing, and editing code. |
examples/generation-openai-api-openai-api-generation-nodejs.text | A Node.js code snippet demonstrating how to use the OpenAI API to perform code generation tasks with reasoning effort settings. | Exact payloads, commands, or snippets shown in A Node.js code snippet demonstrating how to use the OpenAI API to perform code generation tasks with reasoning effort... |
examples/generation-openai-api-openai-api-python-generation.text | A Python script demonstrating how to use the OpenAI client to perform code generation tasks with reasoning parameters. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to perform code generation tasks with reasoning parameters. |
examples/generation-openai-api-openai-api-generation-curl-request.text | A curl command demonstrating a request to the OpenAI API for code generation using a model with reasoning effort. | Exact payloads, commands, or snippets shown in A curl command demonstrating a request to the OpenAI API for code generation using a model with reasoning effort. |
What This Skill Covers
- Writing, reviewing, editing, and answering questions about code is one of the primary use cases for OpenAI models today. This guide walks through your option...
- Main sections:
Get started,Use Codex,Integrate with coding models,Frontend development,Next steps.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/code-generation
