Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

openai-platform-api-key

Skill by asgeirtj

Gates OpenAI API work in Codex by checking for a usable OPENAI_API_KEY and asking whether to reuse it or create a new one. New keys are created through the OpenAI Platform connector and saved to a confirmed local env file.

  • Score 93
  • 73k stars
  • CC0-1.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install openai-platform-api-key

Built from the published package, never by AI.

git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/system_prompts_leaks && mkdir -p ~/.claude/skills && cp -r /tmp/system_prompts_leaks/OpenAI/Codex/plugins/openai-developers/skills/openai-platform-api-key ~/.claude/skills/openai-platform-api-key

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install openai-platform-api-key in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

openai-platform-api-key is a Codex skill that handles OpenAI API credentials before API-backed work starts. When Codex builds, runs, tests, debugs, or configures an app, script, CLI, generator, or tool that calls the OpenAI API, the skill checks for a usable OPENAI_API_KEY without printing it. It then asks whether to reuse an existing key or create a new one.

New keys are created through the OpenAI Platform connector and a hosted setup picker. Plaintext stays out of normal tool output and is written only to a local env file the user confirms, preferably one that is ignored or untracked. The skill is for Codex local and app sessions. It does not handle app design or implementation itself, and it hands off to those skills after the credential decision.

Written from the project's SKILL.md and checked against it.

What it can do

  • open_codex_api_key_setupOpens the hosted Platform picker to collect the key name, organization/project, and expiration.
  • confirm_openai_api_key_local_destinationConfirms the local env file and variable name where the key will be saved.
  • create_encrypted_openai_api_keyCreates the new OpenAI API key through the connector using encrypted delivery.
  • decryptDecrypts the returned key and writes it to the confirmed local target path.
  • Credential checkLooks for a usable OPENAI_API_KEY without printing secret values.

What you need

  • Codex local or app session
  • OpenAI Platform connector connected from /apps or the $ app picker

Try asking

  • Build a small CLI that summarizes text with OpenAI and set up my API key.
  • Create a form-driven generator app that uses AI, asking about key reuse first.
  • Configure OPENAI_API_KEY for this repo in .env.local.

Good to know

  • Works only in Codex local and app sessions.
  • Does not use the ChatGPT-only browser or widget setup flow from Codex.
  • Only public JWK material is sent to the connector.
  • Asks for confirmation before creating a key or writing any secret.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: OpenAI/Codex/plugins/openai-developers/skills/openai-platform-api-key/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md13 KB
  • references/evals.md13 KB

Alternatives to openai-platform-api-key

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

openai-platform-api-key: common questions

Does it show my API key in chat?

The skill says never to request, print, quote, or paste a plaintext API key. Helper output must not include the key.

Can it reuse an existing key?

Yes. If a usable OPENAI_API_KEY is found, Codex asks whether to reuse it or create a new one.

Where is the key saved?

Only to a local env file the user confirms, preferably ignored or untracked. Tracked files need explicit confirmation.

How do I install openai-platform-api-key?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is openai-platform-api-key free?

The code is published under the CC0-1.0 licence. The service it connects to may have its own pricing.

Is openai-platform-api-key safe to use?

It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to openai-platform-api-key?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

openai-platform-api-key Install

Add to stack

Loading.