confidantSecure secret handoff and credential setup wizard for AI agents. Use when you need sensitive information from the user (API keys, passwords, tokens) or need...
Install via ClawdBot CLI:
clawdbot install ericsantos/confidantReceive secrets from humans securely ā no chat exposure, no copy-paste, no history leaks.
This is a human-in-the-loop process. You CANNOT retrieve the secret yourself.
ā DO NOT curl/fetch the secret URL yourself ā it's a web form for humans
ā DO NOT skip sharing the URL ā the user MUST receive it in chat
ā DO NOT poll the API to check if the secret arrived ā the script does this
ā DO NOT proceed without confirming the secret was received
ā
Share URL ā Wait ā Confirm success ā Use the secret silently
Run this once to install the CLI globally (avoids slow npx calls):
bash {skill}/scripts/setup.sh
{skill}is the absolute path to the directory containing thisSKILL.mdfile. Agents can resolve it at runtime:
>
> SKILL_DIR=$(find "$HOME" -name "SKILL.md" -path "*/confidant/skill*" -exec dirname {} \; 2>/dev/null | head -1) > # Then use: bash "$SKILL_DIR/scripts/setup.sh" >
You need an API key from the user? One command:
bash {skill}/scripts/request-secret.sh --label "OpenAI API Key" --service openai
The script handles everything:
~/.config/openai/api_key (chmod 600) and exitsIf the user is remote (not on the same network), add --tunnel:
bash {skill}/scripts/request-secret.sh --label "OpenAI API Key" --service openai --tunnel
This starts a localtunnel automatically (no account needed) and returns a public URL.
Output example:
š Secure link created!
URL: https://gentle-pig-42.loca.lt/requests/abc123
(tunnel: localtunnel | local: http://localhost:3000/requests/abc123)
Save to: ~/.config/openai/api_key
Share the URL above with the user. Secret expires after submission or 24h.
Share the URL ā user opens it ā submits the secret ā script saves to disk ā done.
Without --service or --save, the script still polls and prints the secret to stdout (useful for piping or manual inspection).
request-secret.sh ā Request, receive, and save a secret (recommended)# Save to ~/.config/<service>/api_key (convention)
bash {skill}/scripts/request-secret.sh --label "SerpAPI Key" --service serpapi
# Save to explicit path
bash {skill}/scripts/request-secret.sh --label "Token" --save ~/.credentials/token.txt
# Save + set env var
bash {skill}/scripts/request-secret.sh --label "API Key" --service openai --env OPENAI_API_KEY
# Just receive (no auto-save)
bash {skill}/scripts/request-secret.sh --label "Password"
# Remote user ā start tunnel automatically
bash {skill}/scripts/request-secret.sh --label "Key" --service myapp --tunnel
# JSON output (for automation)
bash {skill}/scripts/request-secret.sh --label "Key" --service myapp --json
| Flag | Description |
| ------------------ | ---------------------------------------------------------- |
| --label | Description shown on the web form (required) |
| --service | Auto-save to ~/.config/ |
| --save | Auto-save to explicit file path |
| --env | Set env var (requires --service or --save) |
| --tunnel | Start localtunnel if no tunnel detected (for remote users) |
| --port | Server port (default: 3000) |
| --timeout | Max wait for startup (default: 30) |
| --json | Output JSON instead of human-readable text |
check-server.sh ā Server diagnostics (no side effects)bash {skill}/scripts/check-server.sh
bash {skill}/scripts/check-server.sh --json
Reports server status, port, PID, and tunnel state (ngrok or localtunnel).
The request-secret.sh script blocks until the secret is submitted (it polls continuously). Most agent runtimes (including OpenClaw's exec tool) impose execution timeouts that will kill the process before the user has time to submit.
Always run Confidant inside a tmux session:
# 1. Start server in tmux
tmux new-session -d -s confidant
tmux send-keys -t confidant "confidant serve --port 3000" Enter
# 2. Create request in a second tmux window
tmux new-window -t confidant -n request
tmux send-keys -t confidant:request "confidant request --label 'API Key' --service openai" Enter
# 3. Share the URL with the user (read from tmux output)
tmux capture-pane -p -t confidant:request -S -30
# 4. After user submits, check the result
tmux capture-pane -p -t confidant:request -S -10
Why not exec? Agent runtimes typically kill processes after 30-60s. Since the script waits for human input (which can take minutes), it gets SIGKILL before completion. tmux keeps the process alive independently.
If your agent platform supports long-running background processes without timeouts, exec with request-secret.sh works fine. But when in doubt, use tmux.
curl the Confidant API directly ā use the scripts--tunnel instead--tunnel when the user is remote (not on the same machine/network)--service for API keys ā cleanest conventionAgents can branch on exit codes for programmatic error handling:
| Code | Constant | Meaning |
| ---- | --------------------------------- | -------------------------------------------------------------- |
| 0 | ā | Success ā secret received (saved to disk or printed to stdout) |
| 1 | MISSING_LABEL | --label flag not provided |
| 2 | MISSING_DEPENDENCY | curl, jq, npm, or confidant not installed |
| 3 | SERVER_TIMEOUT / SERVER_CRASH | Server failed to start or died during startup |
| 4 | REQUEST_FAILED | API returned empty URL ā request not created |
| ā 0 | (from CLI) | confidant request --poll failed (expired, not found, etc.) |
With --json, all errors include a "code" field for programmatic branching:
{ "error": "...", "code": "MISSING_DEPENDENCY", "hint": "..." }
This is what the interaction should look like:
User: Can you set up my OpenAI key?
Agent: I'll create a secure link for you to submit your API key safely.
[runs: request-secret.sh --label "OpenAI API Key" --service openai --tunnel]
Agent: Here's your secure link ā open it in your browser and paste your key:
š https://gentle-pig-42.loca.lt/requests/abc123
The link expires after you submit or after 24h.
User: Done, I submitted it.
Agent: ā
Received and saved to ~/.config/openai/api_key. You're all set!
ā ļø Notice: the agent SENDS the URL and WAITS. It does NOT try to access the URL itself.
confidant request --poll which blocks until the secret is submitted--service or --save: secret is saved to disk (chmod 600), then destroyed on server--service/--save: secret is printed to stdout, then destroyed on server| Provider | Account needed | How |
| ------------------------- | --------------- | ------------------------------------------------ |
| localtunnel (default) | No | --tunnel flag or npx localtunnel --port 3000 |
| ngrok | Yes (free tier) | Auto-detected if running on same port |
The script auto-detects both. If neither is running and --tunnel is passed, it starts localtunnel.
For edge cases not covered by the scripts:
# Start server only
confidant serve --port 3000 &
# Start server + create request + poll (single command)
confidant serve-request --label "Key" --service myapp
# Create request on running server
confidant request --label "Key" --service myapp
# Submit a secret (agent-to-agent)
confidant fill "<url>" --secret "<value>"
# Check status of a specific request
confidant get-request <id>
# Retrieve a delivered secret (by secret ID, not request ID)
confidant get <secret-id>
Ifconfidantis not installed globally, runbash {skill}/scripts/setup.shfirst, or prefix withnpx @aiconnect/confidant.
ā ļø Only use direct CLI if the scripts don't cover your case.
Generated Mar 1, 2026
A development team needs to securely collect API keys from new members for tools like OpenAI, Anthropic, or GitHub. Confidant ensures keys are never exposed in chat logs or shared via insecure methods, automating setup into config files.
A support agent assisting a remote customer with configuring a service like a CRM or email platform requires sensitive login details. Confidant provides a secure web form link, preventing credential leakage in support tickets or messages.
During CI/CD pipeline setup, engineers need to input secrets such as deployment tokens or cloud access keys. Confidant facilitates a human-in-the-loop handoff, saving credentials directly to secure files without manual copy-paste risks.
A fintech firm integrating with banking APIs must handle sensitive authentication tokens. Confidant securely receives these from authorized personnel, storing them in encrypted configs to comply with security protocols and audit trails.
Healthcare providers setting up AI tools for patient data analysis require secure handling of PHI access credentials. Confidant ensures credentials are submitted via a private link, avoiding exposure in communication channels and automating storage.
Offer Confidant as a managed service with enhanced features like audit logs, team management, and compliance reporting. Charge monthly per user or based on secret volume, targeting enterprises needing secure credential workflows.
Sell on-premise or self-hosted versions with custom integrations, priority support, and training. Generate revenue through one-time licenses and annual maintenance contracts, appealing to large organizations with strict security policies.
Provide a free tier for individual developers or small teams with basic functionality, while monetizing advanced features like multi-region tunnels, SLA guarantees, and automated secret rotation. Upsell through usage limits or team collaboration tools.
š¬ Integration Tip
Use tmux sessions to bypass agent runtime timeouts, and always share the secure URL directly in chat to maintain the human-in-the-loop flow.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
Perform a comprehensive read-only security audit of Clawdbot's own configuration. This is a knowledge-based skill that teaches Clawdbot to identify hardening opportunities across the system. Use when user asks to "run security check", "audit clawdbot", "check security hardening", or "what vulnerabilities does my Clawdbot have". This skill uses Clawdbot's internal capabilities and file system access to inspect configuration, detect misconfigurations, and recommend remediations. It is designed to be extensible - new checks can be added by updating this skill's knowledge.
Use when reviewing code for security vulnerabilities, implementing authentication flows, auditing OWASP Top 10, configuring CORS/CSP headers, handling secrets, input validation, SQL injection prevention, XSS protection, or any security-related code review.
Security check for ClawHub skills powered by Koi. Query the Clawdex API before installing any skill to verify it's safe.
Scan Clawdbot and MCP skills for malware, spyware, crypto-miners, and malicious code patterns before you install them. Security audit tool that detects data exfiltration, system modification attempts, backdoors, and obfuscation techniques.