Logo de Bitwarden Credential Management

Bitwarden Credential Management

Comunidade
tamirdresher
bitwarden-credential-management

Secure credential management for AI agents via official Bitwarden MCP server and bw CLI. Agents can store and retrieve secrets without exposing the entire vault. All access is audited.

Visão geral

Publicado portamirdresher
Repositóriosquad-skills
Nome da habilidadebitwarden-credential-management
Estrelas
44
Forks
9
Arquivos incluídos
2
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 2

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por tamirdresher no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Bitwarden Credential Management no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/tamirdresher/squad-skills/tree/main/plugins/bitwarden-credential-management
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tamirdresher/squad-skills.git /tmp/squad-skills
mkdir -p .claude/skills
cp -r /tmp/squad-skills/plugins/bitwarden-credential-management .claude/skills/bitwarden-credential-management
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Bitwarden Credential Management em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Bitwarden Credential Management automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Bitwarden Credential Management não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Bitwarden — AI Agent Credential Management

Provides secure, audited credential management for AI agents. Two access methods: Bitwarden MCP server (preferred) and bw CLI (fallback).

CRITICAL: Security Rules

  1. NO DELETE — Agents may NEVER delete vault items. Only the vault owner (human) can delete.
  2. NO EXPORT — Never export the entire vault or dump all passwords.
  3. NO MASTER PASSWORD — Never request, store, or log the master password.
  4. AUDIT ALL ACCESS — Every credential access must be logged.
  5. LEAST PRIVILEGE — Only retrieve the specific credential needed for the current task.
  6. NO PLAINTEXT LOGGING — Never log actual password values. Log only item name/ID + action + timestamp.

Architecture

┌─────────────────────────────────────────────────┐
│  Agent Process (Copilot CLI, CI runner, etc.)    │
│                                                   │
│  ┌──────────────┐    ┌─────────────────────────┐ │
│  │ MCP tools     │    │ bw CLI (fallback)       │ │
│  │ (preferred)   │    │ inherits BW_SESSION     │ │
│  └──────┬───────┘    └────────────┬────────────┘ │
│         │                         │               │
│  ┌──────▼─────────────────────────▼──────────┐   │
│  │ @bitwarden/mcp-server (stdio)             │   │
│  │ Inherits BW_SESSION from User env var      │   │
│  └──────────────────┬────────────────────────┘   │
│                      │                             │
└──────────────────────┼─────────────────────────────┘
                       │
               ┌───────▼───────┐
               │ Bitwarden     │
               │ Vault (cloud) │
               └───────────────┘

Prerequisites

  • Bitwarden CLI: npm install -g @bitwarden/cli
  • Bitwarden MCP server: npm install -g @bitwarden/mcp-server
  • BW_SESSION: Set as a persistent environment variable (see below)
  • MCP config: Entry in your Copilot MCP config for the "bitwarden" server

BW_SESSION — Persistent Session Key

BW_SESSION is an encryption key derived from the master password. It is NOT a JWT and does NOT expire on its own. This is the key insight that makes persistent agent access work.

How it's stored: As a User-level environment variable (Windows) or in shell profile (macOS/Linux). All new processes inherit it automatically — including background agents, watch processes, and new terminal sessions.

It only breaks if:

  • Master password is changed
  • Account is reset
  • Explicit bw lock or bw logout is run

Setting it (one-time, done by vault owner):

Windows (PowerShell)
powershell
# Login (first time only)
bw login your-vault-email@example.com

# Unlock and persist as User-level env var
$session = bw unlock --raw
[System.Environment]::SetEnvironmentVariable("BW_SESSION", $session, "User")
$env:BW_SESSION = $session
macOS / Linux
bash
# Login (first time only)
bw login your-vault-email@example.com

# Unlock and persist in shell profile
export BW_SESSION=$(bw unlock --raw)
echo "export BW_SESSION=$BW_SESSION" >> ~/.bashrc  # or ~/.zshrc

Agent Auto-Detection Pattern

Before using Bitwarden, every agent MUST run this check:

1. Is the Bitwarden MCP server available? (check tool list for bitwarden tools)
   → YES: Use MCP tools (preferred path)
2. Is BW_SESSION set?
   → YES: Use bw CLI as fallback
3. Neither available?
   → Report: "Bitwarden not available — BW_SESSION not set and MCP server not configured."
   → Do NOT fail silently. Do NOT attempt to unlock.

Access Method 1: MCP Tools (Preferred)

When the Bitwarden MCP server is configured, agents get native tools for vault operations. No CLI invocation needed.

MCP config entry (add to your MCP config file):

json
{
  "servers": {
    "bitwarden": {
      "type": "stdio",
      "command": "npx",
      "args": ["@bitwarden/mcp-server"]
    }
  }
}

The MCP server runs via stdio, inherits env vars (including BW_SESSION), and exposes tools directly. Agents don't need to do anything special — the tools appear automatically.

Key MCP tools available:

ToolPurpose
listList vault items (with search/filter)
getRetrieve a specific item by ID or name
create_itemCreate a new vault item
edit_itemUpdate an existing item
generateGenerate secure passwords/passphrases
get_totpGet current TOTP code for an item

Access Method 2: bw CLI (Fallback)

When MCP is not available, use the standard bw CLI. The BW_SESSION env var is inherited automatically.

Store a Credential

powershell
$item = @{
  type = 1  # Login type
  name = "squad/service-name"
  notes = "Created by [agent-name] for [purpose]"
  login = @{
    username = "the-username"
    password = "the-password"
    uris = @(@{ uri = "https://service-url.com" })
  }
} | ConvertTo-Json -Depth 5

$encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($item))
bw create item $encoded --session $env:BW_SESSION

Naming Convention: Prefix item names with a namespace (e.g., squad/github-api-key, myproject/azure-storage-key).

Retrieve a Credential

powershell
bw get item "squad/service-name" --session $env:BW_SESSION
bw get password "squad/service-name" --session $env:BW_SESSION

List Credentials

powershell
bw list items --search "squad/" --session $env:BW_SESSION

Update a Credential

powershell
$item = bw get item "squad/service-name" --session $env:BW_SESSION | ConvertFrom-Json
$item.login.password = "new-password"
$encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(($item | ConvertTo-Json -Depth 5)))
bw edit item $item.id $encoded --session $env:BW_SESSION

Audit Logging

Every credential access MUST be logged. Example format:

[2026-03-26T18:20:00Z] GET    | agent=AgentName | item=squad/github-token | method=MCP
[2026-03-26T18:21:00Z] STORE  | agent=AgentName | item=squad/azure-key    | method=CLI
[2026-03-26T18:22:00Z] LIST   | agent=AgentName | search=squad/           | method=MCP  | count=5

Format: [ISO-timestamp] ACTION | agent=NAME | item=ITEM_NAME | method=MCP|CLI

Background Agent Integration

Background watch processes and autonomous agents inherit BW_SESSION from the User env var automatically — no special setup needed.

Startup health check: Agents SHOULD verify Bitwarden availability at startup:

powershell
# Check BW health at startup
$bwStatus = bw status --session $env:BW_SESSION 2>&1 | ConvertFrom-Json
if ($bwStatus.status -ne "unlocked") {
    Write-Warning "⚠️ Bitwarden vault is NOT unlocked. Status: $($bwStatus.status)"
    Write-Warning "Credential operations will fail. Notify vault owner."
} else {
    Write-Host "✅ Bitwarden vault unlocked. Last sync: $($bwStatus.lastSync)"
}

Cross-Machine Setup

Each machine needs a one-time setup:

powershell
# 1. Install tooling
npm install -g @bitwarden/cli
npm install -g @bitwarden/mcp-server

# 2. Login and unlock
bw login your-vault-email@example.com
$session = bw unlock --raw

# 3. Persist BW_SESSION (Windows)
[System.Environment]::SetEnvironmentVariable("BW_SESSION", $session, "User")
$env:BW_SESSION = $session

# 4. Configure MCP server in your Copilot MCP config
# Add the bitwarden server entry to your mcp-config.json

# 5. Verify
bw status --session $env:BW_SESSION

What's Next: Bitwarden Agent Access (aac)

Bitwarden is building an official Agent Access tool (aac) — an open protocol with E2E encrypted tunnels (Noise protocol) for agent credential access. Key differences from the BW_SESSION approach:

BW_SESSION approachAgent Access (aac)
ScopeFull vault accessiblePer-domain credential scoping
SecuritySession key in env varE2E encrypted tunnel
LLM exposureCreds flow through toolsaac run injects via env vars only
StatusProduction-readyEarly preview

Watch: github.com/bitwarden/agent-access

Troubleshooting

SymptomCauseFix
You are not logged inNever logged in on this machinebw login your-email@example.com
Vault is lockedBW_SESSION missing or invalidVault owner re-unlocks, sets env var
Item not foundName mismatch or stale cacheCheck namespace prefix; run bw sync
MCP tools not appearingMCP server not configuredAdd entry to your MCP config
MCP tools fail silentlyBW_SESSION not inheritedVerify User-level env var is set (not just process-level)
bw status shows locked after rebootUser env var lost or password changedRe-run unlock + persist steps

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Bitwarden Credential Management faz?

Secure credential management for AI agents via official Bitwarden MCP server and bw CLI. Agents can store and retrieve secrets without exposing the entire vault. All access is audited.

Por que usar Bitwarden Credential Management no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Bitwarden Credential Management é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Bitwarden Credential Management no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/tamirdresher/squad-skills/tree/main/plugins/bitwarden-credential-management. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Bitwarden Credential Management?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Bitwarden Credential Management?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Bitwarden Credential Management com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Bitwarden Credential Management é gratuita?

Sim. A habilidade é publicada no GitHub por tamirdresher sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇