1password-sa
БесплатноБез исполняемых скриптовНе проверенSecurely inject secrets from 1Password into agent workflows. Uses service accounts with op run/.env.tpl as the primary pattern, op read as fallback. Includes…
от modbender★ 21 звезда на GitHubОб этом скилле
1Password CLI (Hardened)
Secure secret access via 1Password CLI (op) for OpenClaw agents. Service accounts are the canonical approach.
References
references/get-started.md— install + baseline setupreferences/cli-examples.md— safe command patternsreferences/troubleshooting.md— failure/recovery runbook
Security Rules (must follow)
- Prefer
op runover all alternatives for secret injection. - Never enable shell tracing around secret commands (
set -x,bash -x). - Never print secrets to stdout/logs (
echo,caton secret values/files).printfpiped directly to stdin of another command (e.g.,printf ... | curl -H @-) is acceptable when the output never reaches a log or terminal. - Never dump environment inside/after secret-bearing runs (
env,printenv,set). - Never pass secrets as CLI args (arguments can appear in process lists).
- Never pipe secret output to logs/files (
tee,>,>>) unless explicitly writing a protected temporary file forop inject. - Never pipe
op readoutput into logging pipelines. - Use
op injectonly with locked-down temp files:umask 077,chmod 600,trapcleanup. - Never include secret values in chat, tool output, or agent responses. If a command outputs a secret, do not echo or reference its value.
Banned Flags/Patterns
--no-masking— never use in agent workflows. Masking redacts accidental secret output and must stay on.--reveal— never use in routine workflows. Outputs field values in cleartext.op signin --raw— outputs raw session token to stdout.- Bare
op read— never run without capturing into a variable. It prints secrets to stdout. set -x— never enable around anyopcommand.curl -v— verbose mode logs auth headers. Usecurl -sSfinstead.script/ terminal recorders — session recording captures all secret output.
Untrusted Input
- Never interpolate user-provided or external text into shell commands without strict quoting.
- Always use
--to separateopflags from command arguments. - Vault/item/field names from untrusted sources must be validated (alphanumeric, hyphens, underscores, and spaces only).
- Never use
eval, backtick substitution, or string-built shell commands with secret references. - If an item name looks suspicious (contains
$, backticks, semicolons, or pipes), stop and verify with the user.
Safe dynamic input template:
VAULT="my-vault"
ITEM="my-item"
# Validate: reject names with dangerous characters
for NAME in "$VAULT" "$ITEM"; do
if ! LC_ALL=C [[ "$NAME" =~ ^[a-zA-Z0-9\ _-]+$ ]]; then
echo "ERROR: invalid vault/item name: $NAME" >&2; exit 1
fi
done
VALUE="$(op read "op://${VAULT}/${ITEM}/password")"
# use $VALUE, then:
unset VALUE
Always double-quote variable expansions. Never build op:// references from untrusted input without validation. Reject names containing /, $, backticks, semicolons, pipes, or other shell metacharacters.
.env.tpl Security
- Treat as code: verify ownership, review changes, restrict permissions (
chmod 600). - Do not accept
.env.tplfiles from untrusted sources. - Do not commit to public repos — references reveal vault/item structure.
- Add to
.gitignoreif in a repo. - After creating/editing:
chmod 600 .env.tpl - Only define expected variable names — reject templates containing dangerous env vars (
PATH,LD_PRELOAD,BASH_ENV,NODE_OPTIONS, etc.).
Service Account Workflow (Primary)
Service accounts are the default for agents. No interactive auth needed.
1) Load and scope token
Load the token from your platform's secure store:
# macOS Keychain:
# security find-generic-password -a <account> -s OP_SERVICE_ACCOUNT_TOKEN -w
# Linux (GNOME Keyring / libsecret):
# secret-tool lookup service OP_SERVICE_ACCOUNT_TOKEN
# Last resort (interactive prompt, not automatable):
# read -rs OP_SERVICE_ACCOUNT_TOKEN
OP_SERVICE_ACCOUNT_TOKEN="$(__REPLACE_WITH_SECURE_STORE_COMMAND__)"
[ -z "$OP_SERVICE_ACCOUNT_TOKEN" ] && { echo "ERROR: token retrieval failed" >&2; exit 1; }
Preferred: single-command scope (token never persists in shell env):
OP_SERVICE_ACCOUNT_TOKEN="$OP_SERVICE_ACCOUNT_TOKEN" \
op run --env-file=.env.tpl -- <command>
unset OP_SERVICE_ACCOUNT_TOKEN
If multiple commands needed: export briefly with trap cleanup:
export OP_SERVICE_ACCOUNT_TOKEN
trap 'unset OP_SERVICE_ACCOUNT_TOKEN' EXIT
op run --env-file=.env.tpl -- <command-1>
op run --env-file=.env.tpl -- <command-2>
unset OP_SERVICE_ACCOUNT_TOKEN
2) Use .env.tpl + op run (preferred)
Create .env.tpl with 1Password references (not raw secrets):
API_KEY=op://my-vault/my-item/api-key
DB_PASSWORD=op://my-vault/my-item/password
Run:
Установить 1password-sa в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 1password-sa?
Securely inject secrets from 1Password into agent workflows. Uses service accounts with op run/.env.tpl as the primary pattern, op read as fallback. Includes hardened security rules, input validation, and troubleshooting for auth/permission failures. Use when accessing API keys, credentials, or any 1Password secret.
Как установить скилл 1password-sa?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл 1password-sa запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic