api-credentials
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.
What this skill does
# 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:
- [orchestrating-agents](../orchestrating-agents/SKILL.md#setup)
- [invoking-gemini](../invoking-gemini/SKILL.md#setup)
- [invoking-github](../invoking-github/SKILL.md#quick-start)
**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
```python
import sys
sys.path.append('/home/user/claude-skills/api-credentials/scripts')
from credentials import get_anthropic_api_key
try:
api_key = get_anthropic_api_key()
# Use api_key for Claude API calls
except ValueError as e:
print(f"Error: {e}")
```
### Google Gemini API
```python
import sys
sys.path.append('/home/user/claude-skills/api-credentials/scripts')
from credentials import get_google_api_key
try:
api_key = get_google_api_key()
# Use api_key for Gemini API calls
except ValueError as e:
print(f"Error: {e}")
```
### GitHub API
```python
import sys
sys.path.append('/home/user/claude-skills/api-credentials/scripts')
from credentials import get_github_api_key
try:
api_key = get_github_api_key()
# Use api_key for GitHub API calls
except ValueError as e:
print(f"Error: {e}")
```
## Setup Instructions
### Option 1: Configuration File (Recommended)
1. Copy the example config:
```bash
cp /home/user/claude-skills/api-credentials/assets/config.json.example \
/home/user/claude-skills/api-credentials/config.json
```
2. Edit `config.json` and add your API keys:
```json
{
"anthropic_api_key": "sk-ant-api03-...",
"google_api_key": "AIzaSy...",
"github_api_key": "ghp_..."
}
```
3. Ensure the config file is in `.gitignore` (already configured)
### Option 2: Environment Variables
Set environment variables for the providers you need:
```bash
# Anthropic Claude
export ANTHROPIC_API_KEY="sk-ant-api03-..."
# Google Gemini
export GOOGLE_API_KEY="AIzaSy..."
# GitHub
export GITHUB_TOKEN="ghp_..."
# or
export GITHUB_API_KEY="ghp_..."
```
Add to your shell profile (~/.bashrc, ~/.zshrc) to persist.
## Priority
Credential retrieval follows this priority for each provider:
1. `config.json` in the skill directory (highest priority)
2. Environment variable (ANTHROPIC_API_KEY or GOOGLE_API_KEY)
3. 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
```
api-credentials/
โโโ SKILL.md # This file
โโโ config.json # YOUR credentials (gitignored)
โโโ scripts/
โ โโโ credentials.py # Credential retrieval module
โโโ assets/
โโโ config.json.example # Template for users
```
## 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:
1. Add field to `assets/config.json.example`
2. Add getter function to `scripts/credentials.py`:
```python
def get_provider_api_key() -> str:
# Follow existing pattern with config file + env var
pass
```
3. Add to `verify_credential()` mapping
4. 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.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.