Bun Secrets
Use Bun's Secrets API to store and retrieve sensitive credentials securely
Install
npx skills add jarle/bun-skills --skill Bun Secretsgit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-secrets ~/.claude/skills/Bun-SecretsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Secrets
> Use Bun's Secrets API to store and retrieve sensitive credentials securely
Store and retrieve sensitive credentials securely using the operating system's native credential storage APIs.
<Warning>This API is new and experimental. It may change in the future.</Warning>
```typescript index.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { secrets } from "bun";
let githubToken: string | null = await secrets.get({
service: "my-cli-tool",
name: "github-token",
});
if (!githubToken) {
githubToken = prompt("Please enter your GitHub token");
await secrets.set({
service: "my-cli-tool",
name: "github-token",
value: githubToken,
});
console.log("GitHub token stored");
}
const response = await fetch("https://api.github.com/user", {
headers: { Authorization: `token ${githubToken}` },
});
console.log(`Logged in as ${(await response.json()).login}`);
```
***
## Overview
`Bun.secrets` provides a cross-platform API for managing sensitive credentials that CLI tools and development applications typically store in plaintext files like `~/.npmrc`, `~/.aws/credentials`, or `.env` files. It uses:
* **macOS**: Keychain Services
* **Linux**: libsecret (GNOME Keyring, KWallet, etc.)
* **Windows**: Windows Credential ManagerDetails
- Skill name
Bun Secrets- Repository
- jarle/bun-skills
- Path
skills/bun-runtime-secrets/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun Secrets skill do?
Use Bun's Secrets API to store and retrieve sensitive credentials securely
How do I install the Bun Secrets skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Secrets. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun Secrets popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun Shell
9jarle/bun-skills
Use Bun's shell scripting API to run shell commands from JavaScript
Bun Plugins
9jarle/bun-skills
Universal plugin API for extending Bun's runtime and bundler
Bun Single File Executable
9jarle/bun-skills
Generate standalone executables from TypeScript or JavaScript files with Bun
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.