secrets-management

Manage environment variables and secrets across deployment environments using Vault, Pydantic settings, and .env.example files.

Updated Jun 5, 2025
One-click install
npx skills add https://github.com/wangzitian0/finance_report --skill secrets-management-wangzitian0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-management
Source: https://github.com/wangzitian0/finance_report/tree/main/.opencode/skills/domain/secrets-management
Command: npx skills add https://github.com/wangzitian0/finance_report --skill secrets-management-wangzitian0

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the complex process of managing environment variables and sensitive secrets across different deployment stages, ensuring consistency and security from local development to production.

Core Features & Use Cases

  • Multi-Layered SSOT: Implements a robust Single Source of Truth strategy using Vault, Pydantic settings, and .env.example files.
  • Environment Strategy: Defines clear roles and secret sources for local, CI, staging, and production environments.
  • Use Case: When deploying a new feature, this Skill ensures that all necessary API keys, database credentials, and configuration settings are correctly managed and injected into the application containers for each environment, preventing misconfigurations and security breaches.

Quick Start

Use the secrets-management skill to add a new required variable to the application configuration.

Frequently Asked Questions about secrets-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to manage environment variables and secrets across multiple deployment environments?

Manage environment variables and secrets across deployment environments using a three-layer Single Source of Truth (SSOT) strategy. This approach combines Vault, Pydantic settings, and `.env.example` files to ensure secure configuration from local development to production.

How do I securely inject API keys and database credentials into CI/CD pipelines?

Securely inject API keys and database credentials into CI/CD pipelines by integrating Vault with Pydantic settings. This ensures all sensitive configuration settings are correctly managed and injected into application containers without exposing hard-coded secrets.

Does this secrets management approach work with Dokploy and direnv for automated provisioning?

Yes, this secrets management approach works with Dokploy and direnv. It integrates with these tools to facilitate automated secret provisioning and management, ensuring consistent configuration across local development and production deployments.

Why do I need a Single Source of Truth strategy for environment configuration?

A Single Source of Truth strategy for environment configuration prevents misconfigurations and security breaches. By defining clear roles and secret sources for local, CI, staging, and production, it maintains consistency and security throughout the deployment lifecycle.

Can I use Pydantic settings to validate environment variables before deployment?

Yes, you can use Pydantic settings to validate environment variables before deployment. Acting as a core layer in the SSOT strategy, Pydantic ensures that all required API keys and configuration settings are correctly typed and present for each environment.