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.
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-keyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install openai-platform-api-key in Claude Code
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/system_prompts_leaks && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/system_prompts_leaks/OpenAI/Codex/plugins/openai-developers/skills/openai-platform-api-key ~/.gemini/antigravity-cli/skills/openai-platform-api-keyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install openai-platform-api-key in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
