/outputai:output-dev-credentialsfrom outputai
Manages encrypted secrets in Output SDK workflows using @outputai/core/credentials. Handles API keys, database passwords, and third-party tokens with scoped YAML-based storage.
Ships in outputai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The @outputai/core/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.
process.env to encrypted credentialsMissingCredentialError, MissingKeyError)import { credentials } from '@outputai/core/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 | 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 |
InvalidCredentialsKeyError | Key doesn't match the encrypted file, or the file is corrupted | Use the key the file was encrypted with |
MalformedCredentialsKeyError | Key isn't exactly 64 hex characters | Check the key for typos, whitespace, or truncation |
All four extend FatalError, so a step that throws one fails without retries. A key error while resolving credential: env vars stops the worker at startup.
# 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
# Set a single credential value (no editor needed)
output credentials set anthropic.api_key sk-ant-... # Global
output credentials set stripe.key sk_live_... -w payment_processing # Workflow
# 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 or development, the only values the worker reads)-w / --workflow: Target a specific workflow-f / --force: init overwrites existing credentials; edit and set re-encrypt with the current key when it can't decrypt the file (discards existing values)-y / --yes: Skip the confirmation when set replaces a value of a different shape (set only)-e and -w are mutually exclusiveconfig/credentials.yml.enc # Encrypted YAML
config/credentials.key # Decryption key (DO NOT COMMIT)
Key env var: OUTPUT_CREDENTIALS_KEY
config/credentials/production.yml.enc
config/credentials/production.key
Key env var: OUTPUT_CREDENTIALS_KEY_PRODUCTION
src/workflows/{name}/credentials.yml.enc
src/workflows/{name}/credentials.key
Key env var: OUTPUT_CREDENTIALS_KEY_{WORKFLOW_NAME} (uppercased)
For each scope, the key is resolved in order:
OUTPUT_CREDENTIALS_KEY, OUTPUT_CREDENTIALS_KEY_{ENV}, or OUTPUT_CREDENTIALS_KEY_{WORKFLOW})config/credentials.key)MissingKeyError if neither foundWorkflow credentials fall back to the global key if no workflow-specific key exists.
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)
process.envimport { createKyClient } from '@outputai/core/http';
const API_KEY = process.env.SERVICE_API_KEY || '';
const client = createKyClient({
prefix: 'https://api.service.com',
headers: { Authorization: `Bearer ${API_KEY}` }
});
import { createKyClient } from '@outputai/core/http';
import { credentials } from '@outputai/core/credentials';
const apiKey = credentials.require('service.api_key');
const client = createKyClient({
prefix: 'https://api.service.com',
headers: { Authorization: `Bearer ${apiKey}` }
});
output credentials init to create the encrypted file and keyoutput credentials edit (or output credentials set <path> <value>) to add your secretsprocess.env.X reads with credentials.require('x') or credentials.get('x', default).env files*.key to .gitignoreReplace the default encrypted YAML backend with Vault, AWS Secrets Manager, etc.:
import { setProvider } from '@outputai/core/credentials';
setProvider({
loadGlobal: ({ environment }) => {
return fetchFromVault(`credentials/${environment || 'default'}`);
},
loadForWorkflow: ({ workflowName, environment }) => {
return fetchFromVault(`workflows/${workflowName}`) ?? null;
}
});
Call setProvider() in a hook file listed under outputai.hookFiles, not in step code. Hook files load before the worker resolves credential: env vars, so those resolve through the custom provider too.
interface CredentialsProvider {
loadGlobal(context: { environment: string | undefined }): Record<string, unknown>;
loadForWorkflow(context: {
workflowName: string;
workflowDir: string | undefined;
environment?: string | undefined;
}): Record<string, unknown> | null;
}
.key files - Add *.key to .gitignore.yml.enc files - Cannot be read without the key0o600 (owner-only read/write)editOUTPUT_CREDENTIALS_KEY in your pipelinecredentials imported from @outputai/core/credentialscredentials.require() used for mandatory secrets (not process.env)credentials.get() used with default for optional values*.key listed in .gitignoreoutput credentials initoutput credentials editoutput-credentials-init - Initializing credentials files for the first timeoutput-credentials-edit - Viewing and editing credential valuesoutput-credentials-env-vars - Wiring credentials to env vars with the credential: conventionoutput-dev-http-client-create - Creating HTTP clients that use credentialsoutput-dev-step-function - Using credentials in step functionsoutput-error-http-client - Troubleshooting HTTP client issuesWhat SKILL.md sets; muted values are Claude Code's defaults
51 skills in this plugin
/output-build-workflowImplement 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./output-credentials-editView, edit, and set encrypted credentials in an Output.ai project. Use when adding secrets, updating API keys, verifying credential values, or retrieving a specific credential./output-credentials-env-varsWire 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.npx claudepluginhub growthxai/output --plugin outputaiOther plugins' skills for the same job