Agent skill
libsecret
libsecret - Secret generation and environment utilities. generateSecret creates cryptographic random secrets. generateSecretB64 creates base64url secrets. createJwt signs HS256 JSON Web Tokens. getEnvVar and setEnvVar manage .env files. hashValues creates deterministic hashes. Use for credential management, JWT creation, and environment configuration.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/libsecret
SKILL.md
libsecret Skill
When to Use
- Generating cryptographic secrets for APIs
- Creating and signing JWTs
- Managing .env file variables
- Creating deterministic hashes from values
Key Concepts
Secret generation: Cryptographically secure random string generation for API keys and tokens.
JWT creation: HS256-signed JSON Web Tokens for authentication.
Environment management: Read/write .env files programmatically.
Usage Patterns
Pattern 1: Generate secrets
import { generateSecret, generateSecretB64 } from "@copilot-ld/libsecret";
const apiKey = generateSecret(); // hex string
const token = generateSecretB64(); // base64url string
Pattern 2: Manage .env variables
import { getEnvVar, setEnvVar } from "@copilot-ld/libsecret";
await setEnvVar(".env", "API_SECRET", secret);
const value = await getEnvVar(".env", "API_SECRET");
Pattern 3: Create JWT
import { createJwt } from "@copilot-ld/libsecret";
const jwt = createJwt({ userId: "123" }, secret, { expiresIn: "1h" });
Integration
Used during setup scripts and initialization. Called by scripts/env-secrets.js.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?