跳到正文
Skillpedia
安全12k · #11560

1password

它能做什么

该技能设置并使用 1Password 官方命令行工具。它让密码和密钥不出现在聊天、日志和已提交的文件中。适用于工具中需要机密信息的开发者。

适用场景

  • ✓当某个命令或配置文件需要存放在 1Password 中的密码、API 密钥或其他机密信息时。
  • ✓当你想检查 1Password CLI 是否已安装并已登录时。
  • ✓当你需要用机密信息填充配置模板,而又不想把它们写入文件时。

技能链接

https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/1password/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/1password/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请设置我的应用配置,让它从 1Password 获取数据库密码,而我不需要把密码粘贴到任何地方。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查 1Password 工具是否已安装并已登录。然后,它使用安全的命令在运行时注入机密信息,使机密信息永远不会出现在对话中。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

1Password CLI

Use the official op CLI for secrets consumed by commands or configuration. Prefer workflows in which the secret never appears in model context, terminal output, logs, chat, shell history, or a committed file.

References

  • Read references/get-started.md for prerequisites, authentication modes, and platform notes.
  • Read references/cli-examples.md for safe command patterns.

Workflow

  1. Check the operating system and shell.
  2. Verify the CLI without installing anything: op --version.
  3. Identify the configured authentication mode:
    • OP_SERVICE_ACCOUNT_TOKEN is present: service account, usually for CI or headless use.
    • 1Password desktop integration is enabled: use the running, unlocked desktop app.
    • Neither applies: standalone interactive sign-in is required.
  4. Verify access with op whoami before a secret-consuming operation.
  5. If more than one account exists, use --account or the already-configured OP_ACCOUNT value.
  6. Prefer op run or op inject; use op read only when its output can be consumed without being exposed.

If op is absent or authentication is not configured, explain the exact prerequisite and point to the official 1Password CLI documentation. Do not silently install the CLI, ask the user to paste a password or token into chat, invent credentials, or place a secret in tool arguments.

Authentication modes

Service account

The user must configure OP_SERVICE_ACCOUNT_TOKEN outside the conversation and agent command history. Do not print or inspect its value.

op whoami
op vault list

Service-account access is limited to its allowed vaults and does not require the desktop app.

Desktop app integration

Run op directly so it can reach the per-user desktop integration channel:

op vault list
op whoami

The first call may request Touch ID, Windows Hello, or system authentication. If the CLI cannot connect, ask the user to open and unlock 1Password and confirm CLI integration is enabled. Do not move this mode into tmux as a workaround.

Standalone interactive sign-in

An interactive sign-in creates a session environment variable that must stay in the same shell. On macOS or Linux, use a private tmux session only when desktop integration and service-account authentication are unavailable. Read the bundled tmux Skill first.

SOCKET_DIR="${EKKO_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/ekko-tmux-sockets}"
mkdir -p "$SOCKET_DIR"
chmod 700 "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/ekko-op.sock"
SESSION="op-auth-$(date +%Y%m%d-%H%M%S)"

tmux -S "$SOCKET" new -d -s "$SESSION" -n shell /bin/sh
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'eval "$(op signin --account my.1password.com)"' Enter
tmux -S "$SOCKET" capture-pane -t "$SESSION":0.0 -p -S - | tail -40

Do not queue later commands while sign-in is prompting. If a password, MFA challenge, or account choice is required, pause and ask the user to complete it locally by attaching to the named socket and session. Never request the password or one-time code in chat. After the prompt returns, send op whoami into that same pane and reuse the same SOCKET and SESSION for subsequent commands.

On Windows, prefer desktop integration or a service account. Do not translate the POSIX tmux flow into PowerShell without an explicitly provided persistent-session mechanism.

Guardrails

  • Never relay secret values through chat or include them in a summary.
  • Never use a command whose purpose is to print a secret merely to prove access; use op whoami and metadata-only listing commands.
  • Prefer op run for process environment variables and op inject for templates.
  • Writing an injected file or op read --out-file persists secret material. Do it only when explicitly requested, restrict permissions, keep it out of version control, and explain cleanup.
  • Do not pass --no-masking unless the user explicitly requires unmasked output and the destination is known to be safe.
  • If authentication expires, fix the active mode rather than switching modes without the user's knowledge.
常见问题

我必须把密码粘贴到聊天中吗?

不必。该技能说明不要在聊天中索要密码或令牌,而是使用 1Password 自己的登录方式。

它支持哪些登录方式?

自动化设置使用服务账户令牌,桌面应用解锁时可以使用 1Password 桌面应用,也可以使用独立的交互式登录。

如果没有安装 CLI 会怎样?

智能体会说明缺少什么,并指引你查阅 1Password 官方文档,而不会静默安装。

详情

作者的原始描述

Set up and use 1Password CLI for authentication, secret references, command injection, and safe configuration templating.

repo: EKKOLearnAI/ekko-studio

热度

GitHub 星标
12k
排名
#11560
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能