agentsclimarketplace

Openai

Skill CleanSlice/skills/openai

CleanSlice agent skills — architecture patterns, vertical slices, conventional commits for Claude Code and AI coding agents.

Install
npx -y skills add CleanSlice/skills --skill openai

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

OpenAI API access via the per-user secret store. Stores the user's API key once, exposes it to agents at tool-call time as OPENAI_API_KEY.

SKILL.md

2.4 KB, as published. Nobody here has run it

OpenAI

The user's OpenAI key lives in the ranch per-user secret vault — set once via the admin UI, resolved lazily by the runtime on each tool invocation. Agents see it as the environment variable OPENAI_API_KEY.


Quick Reference

NeedAnswer
Mechanismsecret (no browser involved)
Env varOPENAI_API_KEY
Per-account aliasesOPENAI_API_KEY_<ACCOUNTKEY> — e.g. OPENAI_API_KEY_WORK
Toolintegration_secrets — fetches the user's resolved env map
Where to get a keyhttps://platform.openai.com/api-keys

Setting up

  1. The user opens the admin UI at /integrations.
  2. They click OpenAI → leave accountKey as default (or use work/personal if they want multiple keys) → Continue.
  3. The Sheet flips to "Set OpenAI key" — paste the sk-… token → Save.

The value is written to the per-user secret store and never returned through the API. If the key is later rotated, repeat the steps — the new value overwrites the old.


Using the key in a tool

The runtime resolves user secrets lazily. To access the key:

const { env } = await integration_secrets({ service: 'openai' })
const apiKey = env.OPENAI_API_KEY
if (!apiKey) {
  return ctx.send(
    'OpenAI isn\'t connected. Open /integrations and add an OpenAI key first.',
  )
}

const res = await fetch('https://api.openai.com/v1/chat/completions', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ model: 'gpt-5', messages: [...] }),
})

If the user has connected multiple OpenAI accounts, the most recently updated one wins OPENAI_API_KEY. To pick a specific one, use the alias: env.OPENAI_API_KEY_PERSONAL.


Don't

  • Don't store the key in agent/secret (per-agent store) — that's for credentials the agent owns. The user's API key follows the user across agents.
  • Don't echo the key in chat output, logs, or error messages. Filter Authorization headers before logging requests.
  • Don't try to read the key directly from the database or AWS Secrets Manager — go through integration_secrets. The resolution rules (most-recent wins, aliases, etc.) only live there.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.