secretzero-handle
Use when the task touches `.env`, dotenv/json/yaml secret files, local `file` targets, or any workflow where secret material could enter agent context. Enforces `SZ_AGENT_MODE=true` spill-safe CLI usage, ingest preseed, strict manifest validation, and safe discovery patterns alongside `secretzero-agent` / `secretzero-author`.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-31
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- secretzero-handle
- license
- Apache-2.0
- metadata
- { "author": "secretzero", "version": "1.1" }
- description
- Use when the task touches `.env`, dotenv/json/yaml secret files, local `file` targets, or any workflow where secret material could enter agent context. Enforces `SZ_AGENT_MODE=true` spill-safe CLI usage, ingest preseed, strict manifest validation, and safe discovery patterns alongside `secretzero-agent` / `secretzero-author`.
- allowed-tools
- Bash(secretzero:*) Read
- compatibility
- Requires SecretZero CLI (Python 3.12+). Always set SZ_AGENT_MODE=true before CLI on agent hosts.
03 SKILL.md 正文
SecretZero Handle (spill-safe context)
Enforces skills/secretzero/SKILL.md absolute rule: SecretZero only for secrets; never load values into agent context.
Use this skill together with skills/secretzero-agent/SKILL.md and skills/secretzero-author/SKILL.md whenever:
- The manifest references
.env,*.env, orlocal/filetargets that read or write environment files. - You are asked to pre-seed or import values from disk into the lockfile.
- The agent might otherwise run
secretzero render,list variables,get --reveal, orterraform --include-static-secrets.
Set spill-safe mode
export SZ_AGENT_MODE=true
With this set:
secretzero validatealso enforces no plaintext static-like payloads in the merged manifest (same rules as--strict-manifest-plaintext).secretzero renderis blocked (full interpolated manifest may contain secrets).secretzero list variables --format jsonreturns names only (values_redacted).secretzero list targetsredacts non-structural targetconfigfields in JSON and text summaries.secretzero get --revealis blocked.secretzero backup createwithout--encryptedis blocked;backup restore --printis blocked.secretzero agent adopt/agent listare safe under spill mode (metadata-only JSON). Use--preseed-lockfileto hash present credentials without printing values.agent backupis an alias ofagent adopt(not value-export backup).secretzero terraformwith--include-static-secretsis blocked.
Unset SZ_AGENT_MODE only on trusted local shells when you intentionally need full dumps.
SZ_AGENT (Vector 3 automation) and SZ_AGENT_MODE can both be set; spill guards apply when either is true.
MCP server spill mode
The first-party MCP server (secretzero-mcp, see docs/mcp-setup.md) sets SZ_AGENT_MODE=true on startup when the variable is unset — same spill contract as CLI above.
- MCP tools (
sz_status,sz_sync,sz_discover,sz_rotate,sz_drift_check) return metadata only and rejectrevealparameters. - Set
SZ_WORKSPACE(or pass toolworkspace) to the repository root so lockfile/Secretfile resolution matches the project. - MCP does not replace
agent sync --weboringest preseed— use CLI for human seeding and lockfile import from disk. - Co-load this skill whenever MCP is used for authoring or operations alongside
secretzero-author/secretzero-agent.
Pre-seed lockfile from a secrets file (no values on stdout)
- Ensure
Secretfile.ymldefines each secret with alocal/filetarget whoseconfig.pathmatches the on-disk file (e.g..env). - Use placeholders / null leaves for static-like secrets—no literals in YAML when
SZ_AGENT_MODEis on. - Run:
secretzero ingest preseed --source ./.env --file Secretfile.yml --format json
Stdout is metadata only (counts, per-secret status, matched secret names)—same contract as secretzero import.
For broader key discovery when authoring manifests:
secretzero detect . --all-keys --format json
That lists variable names from dotenv-style files (no values).
Authoring rules under agent handle
- Never
read_fileon.env,.env.*,*.pem, or lane.szvarfiles that may contain secrets. - Prefer
secretzero ingest preseed+secretzero validateinstead of copying values into chat or YAML. - Use
secretzero agent sync --webfor human entry when ingest cannot cover a secret.
Install / verify
Same as other SecretZero skills (uv tool install "secretzero[all]", then secretzero --help, secretzero ingest preseed --help).
04 同仓库更多 Skills
secretzero
Compatibility entrypoint for SecretZero skills. Enforces the absolute rule: never consume secrets in agent context — use SecretZero for all secret handling. Routes to secretzero-author, secretzero-agent, secretzero-handle, and secretzero-agent-adopt.
secretzero-handle
Use when the task touches `.env`, dotenv/json/yaml secret files, local `file` targets, or any workflow where secret material could enter agent context. Enforces `SZ_AGENT_MODE=true` spill-safe CLI usage, ingest preseed, strict manifest validation, and safe discovery patterns alongside `secretzero-agent` / `secretzero-author`.
secretzero-author
Use when authoring, reviewing, or walking a user through a new or existing `Secretfile.yml`. Guided session: manifest root, inventory table, optional local discovery, add/edit loop with secret-type and target menus, validate, optional `secretzero web`. Hermes + MCP notes included. Safe contextless discovery, `.szvar` lanes, policy-bound targets. Inherits absolute rule from `skills/secretzero/SKILL.md`. Co-load `skills/secretzero-handle/SKILL.md` for `.env` / spill-safe CLI.
secretzero-agent
Use for agentic and operational SecretZero workflows including unified `agent sync`, CLI/API/MCP parity, secure human-in-the-loop vectors, and automation-safe run loops.
secretzero-agent-adopt
Use for agent runtime integration: discover Hermes/OpenClaw installs, bootstrap SecretZero environments with `secretzero agent list` / `agent adopt`, lockfile preseed, and restore loops. Inherits absolute rule from `skills/secretzero/SKILL.md` (SecretZero only; never secrets in context).
secretzero
Compatibility entrypoint for SecretZero skills. Enforces the absolute rule: never consume secrets in agent context — use SecretZero for all secret handling. Routes to secretzero-author, secretzero-agent, secretzero-handle, and secretzero-agent-adopt.