output-dev-credentials
Store and reference encrypted secrets in Output SDK workflows using @outputai/credentials. Use when integrating API keys, database passwords, or third-party tokens.
What this skill does
# Encrypted Credentials Management
## Overview
The `@outputai/credentials` package provides encrypted secrets management for Output SDK workflows. It replaces `process.env` patterns with a structured, encrypted YAML-based system that supports scoped credentials with deep merging.
## When to Use This Skill
- Adding API keys or tokens to a workflow
- Migrating from `process.env` to encrypted credentials
- Setting up per-workflow or per-environment secrets
- Debugging missing credential errors (`MissingCredentialError`, `MissingKeyError`)
- Configuring custom credential providers (Vault, AWS Secrets Manager)
## Library API
### Import
```typescript
import { credentials } from '@outputai/credentials';
```
### `credentials.get(path, defaultValue?)`
Safe read with optional default. Never throws.
```typescript
// Returns value or undefined
const region = credentials.get('aws.region');
// Returns value or default
const region = credentials.get('aws.region', 'us-east-1');
```
### `credentials.require(path)`
Strict read. Throws `MissingCredentialError` if not found.
```typescript
const apiKey = credentials.require('anthropic.api_key');
```
### Error Types
```typescript
import { MissingCredentialError, MissingKeyError } from '@outputai/credentials';
```
| Error | Thrown When | Fix |
|-------|------------|-----|
| `MissingCredentialError` | `credentials.require()` path not found | Add the credential via `output credentials edit` |
| `MissingKeyError` | No decryption key available | Set `OUTPUT_CREDENTIALS_KEY` env var or create `.key` file |
## CLI Commands
```bash
# Initialize credentials (generates key + encrypted YAML template)
output credentials init # Global
output credentials init -e production # Environment-specific
output credentials init -w payment_processing # Workflow-specific
# Edit credentials (decrypts, opens $EDITOR, re-encrypts on save)
output credentials edit # Global
output credentials edit -e production # Environment
output credentials edit -w payment_processing # Workflow
# Show decrypted credentials (debugging)
output credentials show # Global
output credentials show -e development # Environment
# Get single credential value
output credentials get anthropic.api_key # Global
output credentials get stripe.key -w payment_processing # Workflow
```
**Flags:**
- `-e` / `--environment`: Target environment (production, development)
- `-w` / `--workflow`: Target a specific workflow
- `-f` / `--force`: Overwrite existing credentials (init only)
- Note: `-e` and `-w` are mutually exclusive
## Three-Tier Scope System
### 1. Global Credentials
```
config/credentials.yml.enc # Encrypted YAML
config/credentials.key # Decryption key (DO NOT COMMIT)
```
Key env var: `OUTPUT_CREDENTIALS_KEY`
### 2. Environment-Specific Credentials
```
config/credentials/production.yml.enc
config/credentials/production.key
```
Key env var: `OUTPUT_CREDENTIALS_KEY_PRODUCTION`
### 3. Per-Workflow Credentials
```
src/workflows/{name}/credentials.yml.enc
src/workflows/{name}/credentials.key
```
Key env var: `OUTPUT_CREDENTIALS_KEY_{WORKFLOW_NAME}` (uppercased)
## Key Resolution Chain
For each scope, the key is resolved in order:
1. **Environment variable** (`OUTPUT_CREDENTIALS_KEY`, `OUTPUT_CREDENTIALS_KEY_{ENV}`, or `OUTPUT_CREDENTIALS_KEY_{WORKFLOW}`)
2. **Key file** on disk (e.g., `config/credentials.key`)
3. **Throws `MissingKeyError`** if neither found
Workflow credentials fall back to the global key if no workflow-specific key exists.
## Credential Merging
When a workflow has its own credentials, they deep-merge over global credentials. Workflow values win at the same path:
```yaml
# Global (config/credentials.yml.enc)
anthropic:
api_key: sk-ant-global
aws:
region: us-east-1
# Workflow (src/workflows/my_workflow/credentials.yml.enc)
anthropic:
api_key: sk-ant-workflow-specific
stripe:
secret_key: sk_live_workflow
# Merged result at runtime:
# anthropic.api_key -> sk-ant-workflow-specific (overridden by workflow)
# aws.region -> us-east-1 (from global)
# stripe.secret_key -> sk_live_workflow (added by workflow)
```
## Migration from `process.env`
### Before (old pattern)
```typescript
import { httpClient } from '@outputai/http';
const API_KEY = process.env.SERVICE_API_KEY || '';
const client = httpClient({
prefixUrl: 'https://api.service.com',
headers: { Authorization: `Bearer ${API_KEY}` }
});
```
### After (credentials pattern)
```typescript
import { httpClient } from '@outputai/http';
import { credentials } from '@outputai/credentials';
const apiKey = credentials.require('service.api_key');
const client = httpClient({
prefixUrl: 'https://api.service.com',
headers: { Authorization: `Bearer ${apiKey}` }
});
```
### Migration Steps
1. Run `output credentials init` to create the encrypted file and key
2. Run `output credentials edit` to add your secrets
3. Replace `process.env.X` reads with `credentials.require('x')` or `credentials.get('x', default)`
4. Remove environment variables from `.env` files
5. Add `*.key` to `.gitignore`
## Custom Providers
Replace the default encrypted YAML backend with Vault, AWS Secrets Manager, etc.:
```typescript
import { setProvider } from '@outputai/credentials';
setProvider({
loadGlobal: ({ environment }) => {
return fetchFromVault(`credentials/${environment || 'default'}`);
},
loadForWorkflow: ({ workflowName, environment }) => {
return fetchFromVault(`workflows/${workflowName}`) ?? null;
}
});
```
### Provider Interface
```typescript
interface CredentialsProvider {
loadGlobal(context: { environment: string | undefined }): Record<string, unknown>;
loadForWorkflow(context: {
workflowName: string;
workflowDir: string | undefined;
environment?: string | undefined;
}): Record<string, unknown> | null;
}
```
## Security Considerations
- **Never commit `.key` files** - Add `*.key` to `.gitignore`
- **Safe to commit `.yml.enc` files** - Cannot be read without the key
- **Key file permissions** - Created with mode `0o600` (owner-only read/write)
- **Temp file cleanup** - Plaintext overwritten with null bytes before deletion during `edit`
- **Use env vars in CI/CD** - Set `OUTPUT_CREDENTIALS_KEY` in your pipeline
- **Encryption** - AES-256-GCM with unique random nonce per encryption
## Verification Checklist
- [ ] `credentials` imported from `@outputai/credentials`
- [ ] `credentials.require()` used for mandatory secrets (not `process.env`)
- [ ] `credentials.get()` used with default for optional values
- [ ] `*.key` listed in `.gitignore`
- [ ] Credentials initialized via `output credentials init`
- [ ] Secrets added via `output credentials edit`
## Related Skills
- `output-credentials-init` - Initializing credentials files for the first time
- `output-credentials-edit` - Viewing and editing credential values
- `output-credentials-env-vars` - Wiring credentials to env vars with the `credential:` convention
- `output-dev-http-client-create` - Creating HTTP clients that use credentials
- `output-dev-step-function` - Using credentials in step functions
- `output-error-http-client` - Troubleshooting HTTP client issues
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.