lov-env-management
БесплатноЗапускает вложенные скриптыНе проверен统一管理平台、账号与多组 API Key,维护有效期和启用状态,安全同步到 zsh 或用户会话环境,并提供脱敏 Dashboard;用户说“管理环境变量”“rotate API keys”时使用。
от lovstudio★ 72 звезды на GitHubОб этом скилле
凭据管家 · Credential Keeper
把散落的开发环境变量收进“平台 → 账号 → Key”账本,明确每个 Key 的生命周期、验证状态和当前投影目标,并在不回显秘密的前提下同步 Shell 或用户图形会话环境。
Triggers
Activate when
- 用户说“管理我的环境变量”“同一个平台有多个账号和 API Key”“把这个 Key 轮换到 zsh”或“打开环境变量 Dashboard”。
- User asks to “manage API keys”, “rotate an environment variable”, “switch the active account”, or “audit expiring keys”.
- 用户需要维护 Key 的生效时间、过期时间、远端验证结果,或在多个 Key 中选择一个投影到指定变量。
Do not activate when
- 用户只要给当前单次命令临时传一个环境变量;直接使用当前 Shell 的 invocation-scoped environment。
- 用户要把云端 Secret 写入 Vercel、GitHub Actions、Supabase 或 Kubernetes;使用目标平台的 Secret 管理流程,本 Skill 只可提供经过确认的变量名清单。
- 用户要管理登录密码、信用卡或恢复码;使用密码管理器。1Password 仅作为本 Skill 的可选秘密来源。
- 用户要新增 zsh 快捷命令或函数而不是环境变量;交给
lov-zsh-alias。
Security Invariants
- 绝不把 Key 值写入聊天、Profile、日志、Dashboard、URL、命令参数或版本库。
- 新增 Key 只接受隐藏交互输入或标准输入;CLI 故意不提供
--value。 - Registry 只保存脱敏元数据。默认 macOS 使用 Keychain,其他系统使用权限为
0600的本地 vault;也支持op://引用和已有环境变量引用。 ~/.zshenv只写一个受哨兵标记管理的source块,实际导出位于权限为0600的生成文件。- 同一 target 和变量名只允许一个 binding。切换账号或 Key 是替换 binding,不是复制多份 export。
- Dashboard 只绑定
127.0.0.1,不展示秘密,也不提供秘密录入框;所有写操作需要当前进程生成的临时 token 和同源请求。 - 不自动把 Key 写入
/etc/environment、LaunchAgent plist 或仓库.env文件。系统投影仅作用于当前用户会话,并要求显式确认进程环境暴露风险。
User Profile (cross-session)
每次运行先读取 skill.yaml 声明的 user-profile/v1。Profile 只保存安全的工作偏好,例如默认秘密后端、过期预警天数、Shell rc 文件和 Dashboard 是否自动打开;所有 Key 值及秘密引用都留在专用存储,不进入 Profile。
当用户直接声明需要跨 session 保存的非秘密偏好时,通过 scripts/profile_store.py record --skill-id lov-env-management --confirm 写入 records 并报告保存路径。凭据、token、cookie 和任何 secret-like 字段不得写入 Profile。完整契约见 references/user-profile.md。
Skill Group Composition
运行前阅读 references/skill-composition.md。外部 Skill 只通过脱敏变量清单或秘密引用进行可选交接,不是隐藏依赖。
Workflow (MANDATORY)
Step 0: Resolve context and inspect without secrets
- Resolve
SKILL_DIR, then runprofile_store.py readfor safe defaults. - Resolve storage with this precedence: current CLI flag,
LOV_ENV_HOME, Skill Profile, then the platform-safe config directory. - Start with
listoraudit; never search broad home-directory globs for credentials. - Separate requested targets: current command, zsh startup, current user GUI session, or a platform-specific remote Secret store.
python3 "$SKILL_DIR/scripts/env_manager.py" list
python3 "$SKILL_DIR/scripts/env_manager.py" audit
Step 1: Model platform, account, and Key identity
Use stable kebab-case IDs. A Key locator is platform/account/key, for example openai/personal/primary or openai/work/rotation-2026-08.
Add every rotated Key as a new record so history stays attributable. Do not overwrite an existing key ID. Choose a secret backend automatically unless the user named one:
keychainon macOS when available;filevault with mode0600elsewhere;opfor an explicitop://reference;envonly when an existing variable is the intended source.
python3 "$SKILL_DIR/scripts/env_manager.py" add \
--platform openai --account personal --key rotation-2026-08 \
--env-var OPENAI_API_KEY --backend auto \
--status standby --expires-at 2026-12-31
The command prompts without echo. For automation, pipe the value and add --secret-stdin; never place it in a shell argument.
Step 2: Maintain lifecycle and validity evidence
Read references/data-model.md before changing lifecycle fields.
active: eligible for a binding.standby: stored for rotation but not preferred.disabled: temporarily excluded.revoked: permanently excluded; keep metadata for audit history.- Effective health additionally accounts for
not_before,expires_at, and the latest validation result.
Use status for administrative state and probe for remote evidence. probe sends the Key only in an HTTPS header, blocks redirects, never stores a response body, and records only origin, status code, time, and redacted result.
python3 "$SKILL_DIR/scripts/env_manager.py" status \
openai/personal/rotation-2026-08 --status active
python3 "$SKILL_DIR/scripts/env_manager.py" probe \
openai/personal/rotation-2026-08 \
--url https://api.openai.com/v1/models --auth bearer
If a service cannot be probed generically, use mark-validation --result valid|invalid|unknown after a real platform-specific check and record a non-secret note.
Step 3: Bind exactly one Key per target variable
Bindings are independent for shell and system. The binding is the atomic switch point for multiple accounts and multiple keys.
python3 "$SKILL_DIR/scripts/env_manager.py" bind \
--target shell --env-var OPENAI_API_KEY \
openai/personal/rotation-2026-08
Reject expired, invalid, disabled, revoked, or not-yet-valid Keys. Only use --allow-unhealthy when the user explicitly accepts the reason and the resulting risk.
Step 4: Preview, apply, and verify environment projection
Read [references/environment-target
Установить lov-env-management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lov-env-management?
统一管理平台、账号与多组 API Key,维护有效期和启用状态,安全同步到 zsh 或用户会话环境,并提供脱敏 Dashboard;用户说“管理环境变量”“rotate API keys”时使用。
Как установить скилл lov-env-management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lov-env-management запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic