oaustegard/claude-skills/api-credentials
Claude Code and agent skill by oaustegard/claude-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install oaustegard/claude-skills/api-credentialsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
API Credentials Management
🚨 DEPRECATED: This skill is no longer needed for hosted skills environments.
New approach: Skills now read credentials directly from project knowledge files:
ANTHROPIC_API_KEY.txt,GOOGLE_API_KEY.txt,GITHUB_API_KEY.txt(recommended)- Or
API_CREDENTIALS.json(combined file)
See updated skill documentation:
Legacy use only: This skill may still be useful for local development environments or backward compatibility.
⚠️ WARNING: This is a PERSONAL skill - DO NOT share or commit with actual credentials!
This skill provides secure storage and retrieval of API credentials for multiple providers. It serves as a dependency for other skills that need to invoke external APIs programmatically.
Supported Providers
- Anthropic (Claude API)
- Google (Gemini API, Vertex AI, etc.)
- GitHub (GitHub API, Personal Access Tokens)
- Extensible for additional providers
Purpose
- Centralized credential storage for multiple API providers
- Secure retrieval methods for dependent skills
- Clear error messages when credentials are missing
- Support for multiple credential sources (config file, environment variables)
Usage by Other Skills
Skills that need to invoke APIs should reference this skill:
Anthropic Claude API
Google Gemini API
GitHub API
Setup Instructions
Option 1: Configuration File (Recommended)
- Copy the example config:
- Edit
config.jsonand add your API keys:
- Ensure the config file is in
.gitignore(already configured)
Option 2: Environment Variables
Set environment variables for the providers you need:
Add to your shell profile (~/.bashrc, ~/.zshrc) to persist.
Priority
Credential retrieval follows this priority for each provider:
config.jsonin the skill directory (highest priority)- Environment variable (ANTHROPIC_API_KEY or GOOGLE_API_KEY)
- ValueError raised if neither is available
Security Notes
- Never commit config.json with real credentials
- The config.json file should be in .gitignore
- Only config.json.example should be version controlled
- Consider using environment variables in shared/production environments
- Rotate API keys regularly
- Skills should never log or display full API keys
File Structure
Error Handling
When credentials are not found, the module raises ValueError with clear guidance:
- Where to place config.json
- How to set environment variables
- Links to provider consoles for key generation
Skills should catch ValueError exceptions and handle appropriately.
Available Functions
get_anthropic_api_key() → str
- Returns Anthropic API key
- Raises ValueError if not configured
get_google_api_key() → str
- Returns Google API key
- Raises ValueError if not configured
get_github_api_key() → str
- Returns GitHub API token (Personal Access Token)
- Raises ValueError if not configured
get_api_key_masked(api_key) → str
- Returns masked version for safe logging
- Example: "sk-ant-...xyz"
verify_credential(provider) → bool
- Checks if provider is configured
- Returns True/False without raising exceptions
- Providers: 'anthropic', 'google', 'github'
Adding New Providers
To support additional providers:
- Add field to
assets/config.json.example - Add getter function to
scripts/credentials.py:
``python def get_provider_api_key() -> str: # Follow existing pattern with config file + env var pass ``
- Add to
verify_credential()mapping - Update this documentation
Token Efficiency
This skill uses ~300 tokens when loaded but saves repeated credential management code across multiple skills that invoke external APIs. It provides a single, consistent pattern for all credential handling.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingapi-credentials/SKILL.md
Popularity
- Repository stars
- 151
- Repository forks
- 7
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/oaustegard/claude-skills/api-credentials)