Gates OpenAI API key provisioning and credential decisions for AI apps, scripts, and tools. Inspects existing keys safely and prompts reuse-vs-new before any implementation work.
Ships in openai-developers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill only in Codex local/app sessions. Create keys through the secure OpenAI Platform connector, keep plaintext out of normal tool output, and write secrets only to a confirmed local destination.
Use this skill as the credential gate for API-backed work, not as the app, docs, or frontend implementation skill.
Use it when:
OPENAI_API_KEY, or an sk-proj key.Do not use it when:
If API access is needed and no usable key is found, offer secure key provisioning instead of leaving only placeholder docs or manual setup steps.
When another implementation skill also applies, run this skill first only to inspect credentials safely and send the credential decision message. Until reuse-existing-key vs create-new-key is resolved, it outranks design-first and implementation-first flows, including build-web-apps:frontend-app-builder; do not design UI, choose architecture, inspect API examples, write code, or run smoke tests. Model and prompt migrations are the narrow exception above: complete requested source/configuration edits and offline validation without a credential decision, then use this skill only before any live API request. After the user answers, hand off to the appropriate implementation, docs, or frontend skill.
cat .env*, grep OPENAI_API_KEY .env*, or rg OPENAI_API_KEY .env*. Use silent exit-status checks or redacted summaries only.open_codex_api_key_setup tool when it is available. Do not send local workspace paths, env-file paths, or target arrays to the picker._start_api_key_setup flow from Codex.kty, n, e) to the connector.--workspace; the helper refuses symlink targets and targets outside that workspace.Before editing, testing, running, debugging, or configuring any code that calls the OpenAI API, except for the model/prompt migration source edits and offline validation explicitly allowed above:
OPENAI_API_KEY without printing it.This applies even if:
Finding an existing key is not permission to proceed. It only changes the question you ask.
The credential decision is a hard stop outside the model/prompt migration exception above. Before the user answers, do not create directories, scaffold files, draft implementation plans, wire API-dependent code, run smoke tests, or give placeholder/manual key setup instructions. The only allowed pre-gate work is safe repo convention discovery and credential presence checks that do not print secrets.
Required progress updates before or during credential inspection may be brief and limited to saying that Codex is checking credentials or opening secure key setup. They must not describe implementation plans, architecture, file choices, local destination details, or credential conclusions before the credential decision or picker handoff.
After inspecting credentials, the next substantive user-facing message must be the credential decision message. Do not send another substantive message before this decision.
Use one of these branches:
OPENAI_API_KEY was found without revealing it, then ask whether to reuse that key or create a new one.OPENAI_API_KEY was found, then ask whether to create one securely.After sending the credential decision message, stop until the user answers.
.env.local, .env, and ignored framework-specific env filesOPENAI_BASE_URL, and framework env docs for repo conventions separately from secret-bearing env files.env.local and OPENAI_API_KEY when no stronger convention existsOPENAI_API_KEY instructions, or fallback placeholder setuptool_search to load open_codex_api_key_setupopen_codex_api_key_setup directly with no arguments ({}). Do not send a key name, local paths, workspace arguments, or target arrays. The picker collects the key name, automatically loads organization/project choices, and sends a later widget-authored follow-up with the confirmed key name plus selected opaque idsopen_codex_api_key_setup returns without an error, end the current turn immediately and wait for the widget-generated follow-up prompt. Do not inspect or interpret the launch payload, search for connector contract details, run local-save steps, make another tool call, or send any non-empty user-facing message, including a picker-open confirmation, in that turn.env.local and OPENAI_API_KEY.tool_search to load the OpenAI Developers MCP confirm_openai_api_key_local_destination tool. If available, call it with the absolute workspace root, the recommended env-file target, and OPENAI_API_KEY. The form shows the recommended location and lets the user replace it before continuing.approved, use its returned targetPath exactly and do not ask a second destination question. If it is declined or canceled, stop.Save the new key to <path>? Reply yes to continue, another workspace-relative env-file path to change it, or decline. If the user declines, stop; otherwise use the confirmed path.tool_search to load create_encrypted_openai_api_keytool_suggest is available, suggest installing connector connector_2de447f3f15448ebab48783d7e4f5d81/apps or the $ app picker, then retry tool_search after they finishprepare, keep private_key_path, and send only recipient_public_key_jwk to the connector.create_encrypted_openai_api_key with the confirmed key name plus the picker-confirmed organization_id and project_id when the picker path was used. In the text-only fallback, omit those fields so the connector preserves its default organization/project behavior.decrypt with the encrypted ciphertext, confirmed target path, env var name, and repo root as --workspace.Use the helper by absolute path. prepare creates the temporary private key file plus a request JSON containing only the public JWK and requested key name:
node "<plugin root>/scripts/openai-platform-api-key.mjs" prepare --name "Codex"
After the connector returns encrypted_api_key.ciphertext, decrypt and write the key locally:
node "<plugin root>/scripts/openai-platform-api-key.mjs" decrypt \
--private-key "<private key path from prepare>" \
--ciphertext "<encrypted_api_key.ciphertext from connector result>" \
--target "<confirmed env file path>" \
--workspace "<repo root>" \
--env-name OPENAI_API_KEY
The decrypt command updates or appends the env var, prints only safe write metadata, and refuses symlink or out-of-workspace targets.
references/evals.md: trigger and routing eval cases for this skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/openai-developers:openai-platform-api-keyfrom openai-developers
npx claudepluginhub kael-odin/codex-plugins-zh --plugin openai-developers5 skills in this plugin
/agents-sdkBuild, run, deploy, and evaluate OpenAI Agents SDK apps from Codex. Use when the user asks to create or adapt an Agents SDK app, build from a prompt or Codex thread, prepare a runnable agent prototype, add a focused eval harness, or deploy locally through the Agents SDK Deployment Manager./build-chatgpt-appBuild, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code./chatgpt-app-submissionInspect a ChatGPT Apps MCP server codebase and generate chatgpt-app-submission.json with app info suggestions, tool hint justifications, test cases, and negative test cases, then report review-check findings and outputSchema warnings for submission review./openai-api-troubleshootingUse when an OpenAI API request fails and Codex needs to classify the likely cause, explain the next step, and route to the right follow-up. Covers common runtime failures such as blocked outbound network access, invalid credentials, exhausted API quota or credits, rate limits, and model, project, or organization access issues; delegate key provisioning to openai-platform-api-key and current documentation lookups to openai-docs.Other plugins' skills for the same job