plugins/openai-developers/skills/openai-platform-api-key/SKILL.md
Use when Codex is asked to build, run, test, debug, or configure an OpenAI-backed or provider-unspecified AI app, UI, script, CLI, generator, or tool, especially requests phrased only as "using AI" or generators driven by forms/user input; also use for OPENAI_API_KEY or sk-proj setup. Treat this as the credential gate: inspect safely, ask reuse-vs-new before API work, and never expose plaintext.
npx skillsauth add openai/plugins openai-platform-api-keyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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. 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:
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. 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.development
Use when the user wants to spin up / create / launch / provision a DigitalOcean droplet (or "a remote dev box on DO") and connect to it from Codex as a remote SSH workspace.
data-ai
Search through Microsoft Teams chats or channels, triage unread or recent activity, draft follow-ups, and manage Planner tasks through connected Teams data.
tools
Motion / animation context for the `use_figma` MCP tool — animating Figma nodes via manual keyframes, animation styles, easing, and timeline duration. Load alongside figma-use whenever a task involves adding, editing, or inspecting animation on a node.
development
SwiftUI ↔ Figma translation. Use whenever the user mentions Swift, SwiftUI, iOS, iPhone, or iPad — in EITHER direction — translating a Figma design into SwiftUI (design → code), or pushing SwiftUI views / screens / tokens back into a Figma file (code → design). Triggers on phrases like 'implement this Figma design in SwiftUI', 'build this screen in Swift', 'push this SwiftUI view to Figma', 'mirror my Swift code in a Figma file', or whenever a Figma URL appears alongside `.swift` files / an `.xcodeproj`. Routes to a direction-specific reference doc; loads alongside `figma-use` for the code → design path.