/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.
$ npx -y skills add growthxai/output --skill output-dev-credentials --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/output-dev-credentials
Context preview
The summary Claude sees to decide when to auto-load this skill.
Store and reference encrypted secrets in Output SDK workflows using @outputai/credentials. Use when integrating API keys, database passwords, or third-party tokens.
SKILL.md
output-dev-credentials.SKILL.mdname: output-dev-credentials
description: Store and reference encrypted secrets in Output SDK workflows using @outputai/credentials. Use when integrating API keys, database passwords, or third-party tokens.
allowed-tools: [Read, Write, Edit, Bash, Glob]
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
import { credentials } from '@outputai/credentials';`credentials.get(path, defaultValue?)`
Safe read with optional default. Never throws.
// 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.
const apiKey = credentials.require('anthropic.api_key');Error Types
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
# 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.keyKey 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:
# 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)
import { createKyClient } from '@outputai/http';
const API_KEY = process.env.SERVICE_API_KEY || '';
const client = createKyClient({
prefix: 'https://api.service.com',
headers: { Authorization: `Bearer ${API_KEY}` }
});After (credentials pattern)
import { createKyClient } from '@outputai/http';
import { credentials } from '@outputai/credentials';
const apiKey = credentials.require('service.api_key');
const client = createKyClient({
prefix: '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.:
import { setProvider } from '@outputai/credentials';
setProvider({
loadGlobal: ({ environment }) => {
return fetchFromVault(`credentials/${environment || 'default'}`);
},
loadForWorkflow: ({ workflowName, environment }) => {
return fetchFromVault(`workflows/${workflowName}`) ?? null;
}
});Provider
Read more
name: output-dev-credentials description: Store and reference encrypted secrets in Output SDK workflows using @outputai/credentials. Use when integrating API keys, database passwords, or third-party tokens. allowed-tools: [Read, Write, Edit, Bash, Glob]
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
import { credentials } from '@outputai/credentials';`credentials.get(path, defaultValue?)`
Safe read with optional default. Never throws.
// 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.
const apiKey = credentials.require('anthropic.api_key');Error Types
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
# 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.keyKey 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:
# 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)
import { createKyClient } from '@outputai/http';
const API_KEY = process.env.SERVICE_API_KEY || '';
const client = createKyClient({
prefix: 'https://api.service.com',
headers: { Authorization: `Bearer ${API_KEY}` }
});After (credentials pattern)
import { createKyClient } from '@outputai/http';
import { credentials } from '@outputai/credentials';
const apiKey = credentials.require('service.api_key');
const client = createKyClient({
prefix: '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.:
import { setProvider } from '@outputai/credentials';
setProvider({
loadGlobal: ({ environment }) => {
return fetchFromVault(`credentials/${environment || 'default'}`);
},
loadForWorkflow: ({ workflowName, environment }) => {
return fetchFromVault(`workflows/${workflowName}`) ?? null;
}
});Provider
The open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code — describe what you want, Claude builds it, with all the best practices already in place. One framework.
Repo: growthxai/output
Other skills on output.
- /llm-output-schema-constraints
Zod schema constraints that Anthropic rejects or silently ignores when sent as structured-output tool definitions via Output.object(). Use when writing or reviewing Zod schemas passed to Output.object(), or debugging structured-output validation errors.
Open skill - /prompt-file-provider-options
Guide to the providerOptions structure in .prompt files — decision tree for where an option goes, common mistakes, per-provider quick reference, and Anthropic prompt caching. Use when writing or reviewing .prompt file frontmatter (provider, model, providerOptions,
Open skill - /validate
Run lint, build, and tests to validate changes are correct
Open skill - /output-build-workflow
Implement an Output SDK workflow from a plan document. Use when the user asks to build, implement, or code a workflow from an existing plan, or after output-plan-workflow has produced a plan and the user is ready to build.
Open skill - /output-credentials-edit
View and edit encrypted credentials in an Output.ai project. Use when adding secrets, updating API keys, verifying credential values, or retrieving a specific credential.
Open skill - /output-credentials-env-vars
Wire encrypted credentials to environment variables using the credential: convention. Use when setting up LLM provider keys (ANTHROPIC_API_KEY, OPENAI_API_KEY) or any env var that should come from encrypted credentials.
Open skill

