libsecret

Generate cryptographic secrets, HS256 JWTs, and manage .env files.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill libsecret
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libsecret
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/libsecret
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill libsecret

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Secret generation and environment management for secure credential handling across development and deployment.

Core Features & Use Cases

  • Generate cryptographic secrets with generateSecret and generateSecretB64.
  • Create HS256-signed JWTs with generateJWT for authentication and authorization.
  • Read and update .env files with readEnvFile and updateEnvFile to manage configuration.

Quick Start

Generate a cryptographic secret using generateSecret and persist it to a .env file using updateEnvFile.

Frequently Asked Questions about libsecret

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

FAQPage Schema
How do I generate cryptographic secrets for a Node.js application?

You can generate cryptographic secrets for a Node.js application by calling the secret generation functions to create secure random values and persist them directly to your environment configuration files.

What is the best way to manage .env files across deployment pipelines?

Managing .env files across deployment pipelines is handled through robust read and update utilities that securely update environment configurations. This approach ensures consistent credential handling across local setups and deployment workflows.

How do I create an HS256-signed JWT for authentication workflows?

Creating an HS256-signed JWT for authentication workflows involves using a dedicated generation function that signs tokens with your cryptographic secret. This provides secure token creation for authentication and authorization processes.

Can I use this to automatically generate missing secrets in my .env file?

Yes, you can automatically generate missing secrets in your .env file by using a get-or-generate utility. This mechanism checks for existing credentials and securely generates new cryptographic secrets if they are absent.

Does this approach require external dependencies for secret generation and dotenv management?

No external dependencies are required for secret generation and dotenv management, as the implementation operates independently. It provides self-contained tools for generating cryptographic secrets and handling environment file updates.

When should I use base64 secret generation instead of standard generation?

Base64 secret generation should be used instead of standard generation when your specific authentication workflow or external service requires URL-safe string representations. This ensures format compatibility for your credential handling.