用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/lovstudio/skills --skill lov-env-management命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
从本机 Codex、Claude 等 AI 对话记录中追溯图片、文档与其他交付文件,返回仍然 存在的候选路径、会话证据与存储层级。适用于“上次 AI 给我的文件在哪”或 “find the file from an earlier AI chat”。
Publish or submit a validated Skill. Default to the LovStudio official website, run lov-skill-pricing automatically, and use other channels only when explicitly named.
将已授权观察到的网站 API 转成可验证的 OpenAPI、SDK、Swagger 或任务型 CLI。适用于“把这个网站 API 变成 CLI”“生成可调用 Swagger”以及 “turn observed APIs into a CLI”。
正在显示 SKILL.md
| name | lov-env-management |
| description | 统一管理平台、账号与多组 API Key,维护有效期和启用状态,安全同步到 zsh 或用户会话环境,并提供脱敏 Dashboard;用户说“管理环境变量”“rotate API keys”时使用。 |
| license | MIT |
| metadata | {"author":"contributors","version":"0.2.0","card_standard":"lovstudio/skill-card/v1","tags":["environment","api-key","secrets","shell","dashboard"],"compatibility":"Python 3.9+ standard library; macOS or Linux. Optional macOS Keychain and 1Password CLI backends.","dependencies":[]} |
把散落的开发环境变量收进“平台 → 账号 → Key”账本,明确每个 Key 的生命周期、验证状态和当前投影目标,并在不回显秘密的前提下同步 Shell 或用户图形会话环境。
lov-zsh-alias。--value。0600 的本地 vault;也支持 op:// 引用和已有环境变量引用。~/.zshenv 只写一个受哨兵标记管理的 source 块,实际导出位于权限为 0600 的生成文件。127.0.0.1,不展示秘密,也不提供秘密录入框;所有写操作需要当前进程生成的临时 token 和同源请求。/etc/environment、LaunchAgent plist 或仓库 .env 文件。系统投影仅作用于当前用户会话,并要求显式确认进程环境暴露风险。每次运行先读取 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。
运行前阅读 references/skill-composition.md。外部 Skill 只通过脱敏变量清单或秘密引用进行可选交接,不是隐藏依赖。
SKILL_DIR, then run profile_store.py read for safe defaults.LOV_ENV_HOME, Skill Profile, then the platform-safe config directory.list or audit; never search broad home-directory globs for credentials.python3 "$SKILL_DIR/scripts/env_manager.py" list
python3 "$SKILL_DIR/scripts/env_manager.py" audit
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:
keychain on macOS when available;file vault with mode 0600 elsewhere;op for an explicit op:// reference;env only 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.
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.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.
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.
Read references/environment-targets.md. Every sync is a preview unless --apply is present.
python3 "$SKILL_DIR/scripts/env_manager.py" sync-shell --rcfile "$HOME/.zshenv"
python3 "$SKILL_DIR/scripts/env_manager.py" sync-shell --rcfile "$HOME/.zshenv" --apply
python3 "$SKILL_DIR/scripts/env_manager.py" audit
After applying zsh projection, verify in a new clean zsh process by checking presence or a fingerprint only; never print the value. sync-system targets the current user login session, not machine-wide state, and requires --acknowledge-process-env-risk --apply.
python3 "$SKILL_DIR/scripts/env_manager.py" dashboard --open
The Dashboard shows accounts, effective health, expiry windows, validation age, and target bindings. It can switch bindings and update administrative or validation status, but adding, reading, exporting, or deleting secret values remains terminal-only. See references/dashboard.md.
Report only:
context_id for errors.Never report a raw Key, secret reference path, generated export content, or a command containing a secret.
| Command | Outcome |
|---|---|
init | Create the registry and secure storage directory |
add | Add one platform/account/key record and secret source |
list, show | Return redacted inventory and effective health |
status, mark-validation | Maintain administrative and validation state |
probe | Validate one Key through a guarded HTTPS request |
bind, unbind | Select the only Key used by a target variable |
sync-shell | Preview or update generated zsh exports and ~/.zshenv source block |
sync-system | Preview or update current user session environment |
audit | Detect unsafe permissions, dangling bindings, unhealthy selections, and expiry warnings |
dashboard | Run the redacted local operations console |
All commands support --json. Mutating output names changed records but never secret values.
security command for Keychain storage.op for op:// secret references.sync-shell; macOS launchctl or Linux systemctl --user for sync-system.python3 "$SKILL_DIR/scripts/validate_skill.py" "$SKILL_DIR"
python3 -m unittest discover -s "$SKILL_DIR/tests" -v
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
task-specific(仅本次)还是 reusable(可跨任务复用)。task-specific 只修改当前任务,不改 Skill。reusable 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。reusable 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。