safety-op-creds

Fetch 1Password credentials via op CLI and inject them into command environments.

7|Updated May 28, 2026
One-click install
npx skills add https://github.com/zcaceres/skills --skill safety-op-creds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safety-op-creds
Source: https://github.com/zcaceres/skills/tree/main/skills/safety-op-creds
Command: npx skills add https://github.com/zcaceres/skills --skill safety-op-creds

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires op, jq, bun, and includes scripts (resource) components.

What problem does it solve?

This skill prevents sensitive credentials from being written to disk or exposed in AI agent transcripts by providing a secure, memory-only bridge between 1Password and your command-line tools.

Core Features & Use Cases

  • Secure Secret Injection: Uses bash process substitution and op run to pass secrets directly into process memory via kernel pipes, ensuring they never touch the filesystem.
  • PreToolUse Guardrails: Automatically blocks dangerous Bash commands like bare op read or item reveal that would otherwise leak secrets into the agent's context.
  • Use Case: When you need to run a CLI tool that requires an API key, use this skill to fetch the key from 1Password and inject it into the tool's environment variables or file descriptors without ever exposing the raw value to the AI.

Quick Start

Use the safety-op-creds skill to run your command by prefixing it with with-creds followed by your credential flags and the target program.

Frequently Asked Questions about safety-op-creds

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

FAQPage Schema
How do I pass 1Password secrets to a CLI tool without writing them to disk?

You can fetch 1Password secrets without disk leaks by using bash process substitution or the op run environment variables to pipe credentials directly into process memory via kernel pipes, ensuring they never touch the filesystem.

How do I prevent AI agents from exposing credentials in bash command outputs?

To prevent AI agents from exposing credentials, use PreToolUse guardrails that automatically block dangerous bash commands like bare op read or item reveal from leaking raw secrets into the agent's context transcript.

Do I need the 1Password CLI installed to use process substitution for secrets?

Yes, you need the 1Password op CLI installed and authenticated, along with jq and bun, to securely fetch credentials and inject them into tool environment variables or file descriptors.

What is the best way to run commands with API keys in an AI-assisted workflow?

The best way to run commands with API keys in AI-assisted workflows is to prefix your command with with-creds, followed by credential flags and the target program, to inject secrets directly into process memory.

Can I use this approach to inject certificates and tokens into environment variables?

Yes, this approach applies to secure execution of CLI tools requiring sensitive keys, tokens, or certificates, feeding them through op run environment variables while satisfying zero-disk-persistence and secret masking requirements.

Why should I avoid bare op read commands when automating secret retrieval?

You should avoid bare op read commands because they leak raw secret values directly into the AI agent's context, whereas using op run with process substitution ensures secrets remain masked in tool outputs.