
API credentials
Loads stored API keys for Claude, Gemini and GitHub so other skills can call those
API credentials is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- Python
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 428
- Last commit
- License
- MIT
- Listing updated
Similar skills
About API credentials
This skill is a shared helper that other agent skills use to fetch API keys for Anthropic Claude, Google Gemini and GitHub. It provides a small Python module with getter functions for each provider, a masked-key helper for safe logging, and a check that reports whether a provider is configured without raising an error.
Keys are read from a local config.json file in the skill folder first, then from environment variables such as ANTHROPIC_API_KEY, GOOGLE_API_KEY and GITHUB_TOKEN. When a key is missing, the module raises a ValueError with guidance on where to place the key, so calling skills can catch it and respond.
The skill expects a Python environment and a config file copied from the bundled example template or shell environment variables set by the user. The README and SKILL.md mark it as deprecated in favor of newer setup approaches, and it is intended mainly for local development or backward compatibility.
When your agent uses it
Securely manages API credentials for multiple providers (Anthropic Claude, Google Gemini, GitHub). Use when skills need to access stored API keys for external service invocations.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Runs Python scripts(see the files on GitHub)
- No network calls found in its scripts(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 6 files (15 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/api-credentials to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/oaustegard/claude-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-credentials &&
cp -R "$tmp/api-credentials" ~/.claude/skills/api-credentials &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/api-credentials inside it instead.
Copy the skill folder to ~/.agents/skills/api-credentials to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/oaustegard/claude-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-credentials &&
cp -R "$tmp/api-credentials" ~/.agents/skills/api-credentials &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/api-credentials inside it instead.
Copy the skill folder to ~/.cursor/skills/api-credentials to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/oaustegard/claude-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-credentials &&
cp -R "$tmp/api-credentials" ~/.cursor/skills/api-credentials &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/api-credentials inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/oaustegard/claude-skills.git --path api-credentialsOr copy the folder to ~/.gemini/skills/api-credentials yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/api-credentials:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/oaustegard/claude-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-credentials &&
cp -R "$tmp/api-credentials" ~/.copilot/skills/api-credentials &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/api-credentials inside it instead.
Get the folder:
git clone --depth 1 https://github.com/oaustegard/claude-skills.gitThen copy claude-skills/api-credentials into your agent's skills folder as api-credentials. Agents that support SKILL.md read one folder per skill.
What it does
- Multi-provider key retrieval
- Getter functions return the Anthropic, Google Gemini and GitHub keys for dependent skills.
- Config file and environment fallback
- Keys are looked up in a local config.json first, then in environment variables.
- Clear missing-key errors
- A ValueError explains where to place the config file or which variables to set.
- Safe key masking
- A helper returns a shortened version of a key suitable for log output.
- Configuration check
- A verification function reports whether a provider is set up without raising errors.
- Deprecation notice
- The documentation points users to newer credential approaches for hosted environments.
Good for
- Store API keys locally so another skill can call the Claude API
- Check whether a Gemini key is configured before running a task
- Fetch a GitHub token from environment variables for an API script
- Mask stored keys before printing diagnostic output
API credentials FAQ
Where does the skill look for API keys?
It checks config.json in the skill directory first, then environment variables such as ANTHROPIC_API_KEY, GOOGLE_API_KEY, GITHUB_TOKEN or GITHUB_API_KEY.
What happens when a key is missing?
The getter raises a ValueError with guidance on configuring the key, and calling skills are expected to catch it.
Is API credentials still recommended?
No. The documentation marks it as deprecated for hosted skills environments and suggests reading credentials from project knowledge files; it remains for local development or backward compatibility.
Which providers are supported?
Anthropic Claude, Google Gemini and GitHub are supported, and the docs describe adding other providers by extending the module.
How do I install API credentials in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/api-credentials to use it in all your projects, or to .claude/skills/api-credentials in one project.
Does API credentials run scripts?
Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use API credentials?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to API credentials?
The closest alternatives to API credentials are Axiom security, Sh kb secrets, Azure keyvault py, Secrets in git history and Auth.
Where this comes from
- Description: from the skill's own SKILL.md.
More from oaustegard/claude-skills

Guides Claude to write the drawing code for a short animated film rendered to MP4
- Open source
- 428 GitHub stars
- Design and media

Guides an AI agent to ask focused clarifying questions before building
- Open source
- 428 GitHub stars
- Developer tools







