name: secretzero-handle
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.
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.
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).