[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AGDAW0ZPZP84WYP2CZQFNX":3,"skill-same:01M7AGDAW0ZPZP84WYP2CZQFNX":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7AGDAW0ZPZP84WYP2CZQFNX","secretzero-author",null,"Use when authoring, reviewing, or walking a user through a new or existing\n`Secretfile.yml`. Guided session: manifest root, inventory table, optional\nlocal discovery, add\u002Fedit loop with secret-type and target menus, validate,\noptional `secretzero web`. Hermes + MCP notes included. Safe contextless\ndiscovery, `.szvar` lanes, policy-bound targets. Inherits absolute rule from\n`skills\u002Fsecretzero\u002FSKILL.md`. Co-load `skills\u002Fsecretzero-handle\u002FSKILL.md`\nfor `.env` \u002F spill-safe CLI.","zloeber\u002FSecretZero","zloeber","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4702624?v=4","01M7AGCEQ32CCAQKAJJ3NS7BE3","Zachary Loeber","01M7AGCEQV5M7FRW8FYTJQAM64",8,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecretzero-author\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: secretzero-author\ndescription: |\n  Use when authoring, reviewing, or walking a user through a new or existing\n  `Secretfile.yml`. Guided session: manifest root, inventory table, optional\n  local discovery, add\u002Fedit loop with secret-type and target menus, validate,\n  optional `secretzero web`. Hermes + MCP notes included. Safe contextless\n  discovery, `.szvar` lanes, policy-bound targets. Inherits absolute rule from\n  `skills\u002Fsecretzero\u002FSKILL.md`. Co-load `skills\u002Fsecretzero-handle\u002FSKILL.md`\n  for `.env` \u002F spill-safe CLI.\n---\n\n# SecretZero Author Skill\n\nUse this skill whenever the task is to create or improve `Secretfile.yml` and related `.szvar` files.\n\n**Absolute rule (non-negotiable):** see `skills\u002Fsecretzero\u002FSKILL.md` — **never consume secrets in agent context**; route all secret operations through SecretZero (detect\u002Fdiscover, validate, sync, web UI, agent sync). Do not ask users to paste values into chat.\n\nFor **new manifests**, **updates to existing manifests**, or **Hermes \u002F MCP-driven authoring**, follow **Guided authoring session** below.\n\n## Mission\n\nProduce high-quality, json-schema compliant SecretZero manifests that:\n\n- Pass `secretzero validate` with zero issues.\n- Keep discovery and inventory **contextless** (metadata only; SecretZero commands, not file reads).\n- Intelligently break out environment variance into `.szvar` files.\n- Bind provider-backed targets to least-privilege identity policies for AWS\u002FAzure\u002Fother authenticated environments.\n\n## Capability discovery (generators & targets)\n\nUse the **live catalog** before inventing `secrets[].kind` or `targets[].kind` values.\n\n**Primary (machine-complete — preferred for agents):**\n\n```bash\nsecretzero catalog --format json\nsecretzero catalog --provider gitlab --format json\nsecretzero catalog --bundle core --format json\nsecretzero catalog --kind gitlab_variable --kind-type target --verbose\n```\n\nThe catalog is backed by `BundleRegistry` and includes every registered generator, target, and provider bundle with `typical_generators` hints per target.\n\n**Human-readable summary:**\n\n```bash\nsecretzero catalog\nsecretzero secret-types\n```\n\n**Manifest-scoped (already configured in this Secretfile — not the global catalog):**\n\n```bash\nsecretzero list providers -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\nsecretzero list targets -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\n```\n\n**Provider introspection:**\n\n```bash\nsecretzero providers list\nsecretzero providers capabilities \u003Cprovider_kind>\n```\n\nThe static **decision map** below is a curated shortcut; when it disagrees with `secretzero catalog --format json`, trust the catalog.\n\n## Safety Rules (Non-Negotiable)\n\nInherits the **SecretZero only — never secrets in context** rule from `skills\u002Fsecretzero\u002FSKILL.md`.\n\n- Never ask for, copy, log, or output plaintext secret values in chat, prompts, or tool results.\n- Never use IDE\u002Ffilesystem\u002FMCP tools to read files that may contain secrets; use `detect` \u002F `discover` \u002F `list` \u002F `status` instead.\n- Discovery and inventory use metadata only (`status`, `test`, provider identity, `list secrets` JSON) — not `get --reveal` or manifest `render`.\n- Human entry for missing values: `secretzero web` or `secretzero agent sync --web` — not chat paste.\n- If provider identity evidence is missing, mark policy confidence as low and require human confirmation.\n\n## Guided authoring session\n\nUse this flow for **new** or **existing** manifests. Phases 0–1 apply to both; Phase 2 onward supports agent-assisted **add\u002Fedit loops** after discovery or whenever the user wants to extend `secrets[]`.\n\nDo not skip steps unless the user explicitly says they already decided (then record their choice and continue).\n\n### Phase 0 — Confirm manifest root (required, always first)\n\nBefore naming secrets or picking generators, **confirm the manifest root** with the user:\n\n| Concept | Meaning |\n|---------|---------|\n| **Manifest root** | Directory that will contain `Secretfile.yml` (and usually `.gitsecrets.lock`) |\n| **CLI path** | `secretzero -f \u003Cmanifest_root>\u002FSecretfile.yml …` for all later commands |\n\n**Ask explicitly:**\n\n1. Absolute path to the manifest root (default: current project\u002Frepo root if obvious).\n2. Whether `Secretfile.yml` already exists there (edit vs create).\n3. Default **local target base** for `provider: local` \u002F `kind: file` paths — almost always the manifest root (`.`). If secrets should land under a subfolder (e.g. `config\u002F`, `secrets\u002F`), confirm that **once** and use it consistently in `config.path` (paths are relative to the manifest root unless absolute).\n\n**Rules:**\n\n- Do not draft `config.path` values until manifest root and local base folder are confirmed.\n- Repeat the chosen root in one line before presenting secret-type options (e.g. “Manifest root: `\u002Fpath\u002Fto\u002Fapp`, local files under `.`”).\n- If the user points at a monorepo subproject, use **that** directory as manifest root, not the repo apex, unless they want a shared top-level manifest.\n\n### Phase 1 — Offer local discovery (optional)\n\nOffer discovery when it helps; skip when the project is greenfield with no env files yet.\n\n**Offer this prompt:**\n\n> I can scan the manifest root for existing secret *names* (no values) and suggest manifest entries. Use local discovery? (yes \u002F no)\n\n| User choice | When it makes sense | Command (agent-safe; no values in output) |\n|-------------|---------------------|-------------------------------------------|\n| **Light scan** | `.env`, `.env.*`, `secrets*`, `credentials*` files may exist | `secretzero detect \u003Cmanifest_root> --all-keys --format json` |\n| **Deep scan** | Many config files; want ranked candidates + `Secretfile.detect.yml` draft | `secretzero discover \u003Cmanifest_root> --local-only --dry-run --format json` (add `--no-llm` if LLM must stay off) |\n| **Skip** | Greenfield or user already has a secret list | Continue to Phase 2 (inventory) or Phase 3 (add loop) |\n\n**After discovery:**\n\n- Present results as a **table of names** (and source file paths only) — never paste values from disk into chat.\n- Ask which candidates to include in `secrets[]` (multi-select or “all above threshold”).\n- Merge chosen rows into the manifest using **placeholders** (`null` leaves, `${VAR}`) — not literals. Co-load `skills\u002Fsecretzero-handle\u002FSKILL.md` when `.env` preseed is next.\n- If `Secretfile.detect.yml` was written, treat it as a **draft**; human reviews before rename\u002Freplace to `Secretfile.yml`.\n\n**Never** `read_file` on `.env`, `.env.*`, `*.pem`, or lane `.szvar` files in agent sessions.\n\n### Phase 2 — Show current manifest inventory (existing or after first draft)\n\nWhenever `Secretfile.yml` exists (or you just merged discovery drafts), **show what is already defined** before adding more entries. This phase applies to **updates** as well as greenfield manifests that already have rows.\n\n**Load metadata (no values):**\n\n```bash\nsecretzero list secrets -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\nsecretzero status -f \u003Cmanifest_root>\u002FSecretfile.yml --format json   # optional: synced \u002F not_synced\n```\n\n**Present visually in chat** — use a clear markdown table (and optional compact mermaid summary when ≤8 secrets):\n\n| Secret | Generator | Targets | Lockfile status |\n|--------|-----------|---------|-----------------|\n| `db_password` | `random_password` | `local\u002Ffile`, `aws\u002Fssm_parameter` | synced |\n| `api_key` | `static` | `local\u002Ffile` | not_synced |\n\nRules:\n\n- Include **name**, **kind**, **targets** (`provider\u002Fkind`), and **status** when `status --format json` was run.\n- Do **not** include secret values, static defaults, or full target `config` blobs in chat (use `SZ_AGENT_MODE` when editing existing manifests under an agent).\n- If the manifest is empty, say so explicitly and skip straight to Phase 3.\n\n**Offer:**\n\n> Here is your current Secretfile inventory. Add another secret, edit an existing one, or continue to validate? (add \u002F edit \u002F done)\n\n### Phase 3 — Add \u002F edit loop (repeat until user says done)\n\nHumans can run the same loop in the CLI:\n\n```bash\nsecretzero add\nsecretzero new          # alias of add\nsecretzero add db_password --kind random_password \\\n  --target provider=local,kind=file,path=.env.local,format=dotenv\n```\n\n`secretzero add` writes generator kind, optional `source:`, and targets. It refuses plaintext static values. Enter those later with `secretzero web` or `secretzero sync`.\n\nThis loop is the main **agent-assisted authoring** path for both new and existing manifests. Run it after Phase 1 merges discovery candidates, or anytime the user wants to extend the manifest without rescanning disk.\n\n**Loop prompt (each iteration):**\n\n> Add a new secret, modify an existing entry, or finish manifest edits? (add \u002F edit name \u002F done)\n\nWhen the user chooses **add** or **edit**:\n\n1. **Destination category** (numbered menu):\n\n   | # | Category | Typical `providers` \u002F targets |\n   |---|----------|-------------------------------|\n   | 1 | **Local disk** | `provider: local` → `file` or `template` |\n   | 2 | **Cloud \u002F platform API** | `aws`, `azure`, `vault`, `github`, … |\n   | 3 | **Encrypted in git** | `sops` \u002F `git_crypt` \u002F `ansible_vault` file targets |\n\n2. **Refresh live capability lists** (once per iteration or when the user changes destination):\n\n   ```bash\n   secretzero catalog --format json\n   secretzero catalog --provider \u003Cprovider_kind> --format json\n   secretzero catalog --kind \u003Ckind> --kind-type generator --verbose\n   secretzero catalog --kind \u003Ckind> --kind-type target --verbose\n   secretzero list providers -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\n   secretzero list targets -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\n   ```\n\n3. **Generator menu** (`secrets[].kind`) — present as lettered options (run `secretzero catalog --format json` for the full list):\n\n   | Option | `kind` | Use when |\n   |--------|--------|----------|\n   | A | `random_password` | High-entropy password |\n   | B | `random_string` | API keys, tokens, alphanumeric secrets |\n   | C | `static` | Human prompt, `${VAR}`, or structured dict leaves |\n   | D | `script` | Generate via command (`ssh-keygen`, etc.) |\n   | E | `azure_app_reg` | Entra app registration-shaped fields |\n   | F | `github_pat` | Create GitHub App installation token via API |\n   | G | `entra-agent-blueprint` | Agent Identity blueprint lifecycle |\n   | H | `gitlab_project_token` | Create GitLab project access token via API |\n   | I | `provider_backed` | Advanced; only if no bundle-specific kind fits |\n\n4. **Target menu** — from `secretzero catalog --format json` (bundle `targets` + `typical_generators`) and the **Decision map**; for local, offer dotenv \u002F json \u002F yaml \u002F toml \u002F tfvars \u002F template options.\n\n5. **Per-entry checklist:** `name`, generator, target(s) (paths relative to manifest root), `.szvar` lane variance, `identity_policies` on cloud targets.\n\n6. **Apply the edit** to `Secretfile.yml` (and `.szvar` if needed), then **re-run Phase 2** (refresh inventory table) before the next iteration.\n\nStop the loop when the user chooses **done** or confirms the inventory is complete.\n\n### Phase 4 — Validate\n\n1. `secretzero validate -f \u003Cmanifest_root>\u002FSecretfile.yml`\n2. `secretzero sync --dry-run -f …` (and `--var-file` when lanes exist)\n3. Fix schema\u002Fpolicy errors; re-show inventory if secrets were renamed or removed.\n\n### Phase 5 — Optional operations UI and seeding handoff\n\nAfter a clean validate (and dry-run when providers exist), offer **two separate checkpoints** (do not merge in one step):\n\n**A — Network dashboard (optional, human-operated sync UI)**\n\n> Start the SecretZero web dashboard in the background so you can sync, refresh, and edit static values in the browser? (yes \u002F no)\n\nIf **yes** (trusted local machine only):\n\n```bash\ncd \u003Cmanifest_root>\nsecretzero web -f Secretfile.yml --host 127.0.0.1 --port \u003Cfree-port> \\\n  > \u002Ftmp\u002Fsecretzero-web.log 2>&1 &\n```\n\n- Use **`127.0.0.1`** unless the user explicitly needs LAN access.\n- Relay the **full login URL and bootstrap token** from command output or log — never paraphrase the token.\n- Tell the user this is the **persistent dashboard** (`secretzero web`), not the one-shot Vector 2 form from `secretzero agent sync --web`.\n- Remind them to use **Shut down** in the UI or stop the background job when finished.\n\n**B — Agent seeding (when values are still missing)**\n\nLoad `skills\u002Fsecretzero-agent\u002FSKILL.md` for `secretzero agent sync --json` (and `--web` only for the **one-shot** localhost seeding form). Prefer the Phase 5A dashboard when the human wants a full UI; prefer agent sync when the agent should stay structured and metadata-only.\n\n### Hermes + MCP\n\nThe guided phases are **transport-agnostic**; only the invocation changes.\n\n| Phase | Hermes chat | SecretZero via MCP \u002F CLI |\n|-------|-------------|---------------------------|\n| 0 Manifest root | Always ask in chat | — |\n| 1 Discovery | Offer yes\u002Fno | **`sz_discover`** or `discover --local-only --dry-run --format json` |\n| 2 Inventory | Format JSON as markdown table | **`sz_status`** or `list secrets` \u002F `status --format json` |\n| 3 Add\u002Fedit loop | Menus + user choices | `secret-types`, `list providers`, `list targets`; write YAML via edit tool |\n| 4 Validate | Report errors | `validate`, **`sz_sync`** with `dry_run: true` or `sync --dry-run` |\n| 5 Web \u002F seed | Offer dashboard; hand off sync skill | CLI `web` subprocess or **`agent sync --json [--web]`** (not on MCP) |\n\n**MCP notes:**\n\n- This repo ships a **first-party MCP server** (`secretzero mcp serve`, see `docs\u002Fmcp-setup.md`) plus CLI + REST API. Tools: `sz_sync`, `sz_discover`, `sz_status`, `sz_rotate`, `sz_drift_check` — metadata only, `SZ_AGENT_MODE=true` by default. Host config: `secretzero mcp config generate`; defaults in `config.mcp`.\n- **Tool parity:**\n\n| MCP tool | CLI equivalent |\n|----------|----------------|\n| `sz_discover` | `secretzero discover --format json` |\n| `sz_status` | `secretzero status --format json` |\n| `sz_sync` | `secretzero sync --format json` |\n| `sz_rotate` | `secretzero rotate --format json` |\n| `sz_drift_check` | `secretzero drift --format json` |\n\n- Use **`sz_discover`** (not host filesystem reads of `.env`) for credential inventory during MCP authoring.\n- **Do not use MCP `sampling\u002FcreateMessage`** for discovery. Use `sz_discover` \u002F `secretzero discover` (metadata-only JSON). Sampling sends file context to the host LLM and increases spill risk versus purpose-built scanners.\n- Leave **sampling disabled** on untrusted MCP bridges unless you operate a custom server with an explicit spill policy.\n- With **`SZ_AGENT_MODE=true`**, co-load `skills\u002Fsecretzero-handle\u002FSKILL.md`; inventory and validate still work; avoid `render` and plaintext dumps.\n- **Bootstrap \u002F seeding** still requires CLI **`agent sync --json [--web]`** or API `POST \u002Fagent\u002Fsync` — MCP has no Vector 1–3 tools.\n\n### Definition of done (guided session)\n\n- Manifest root and local path base were **confirmed with the user**.\n- Current `secrets[]` were shown in a **readable inventory table** before and after edits.\n- Add\u002Fedit loop ran until the user said **done**; kinds\u002Ftargets chosen from **menus + CLI lists**, not invented.\n- Discovery was offered when appropriate; if run, only metadata was shown in chat.\n- `secretzero validate` passes; dry-run sync attempted when providers are configured.\n- User was offered **`secretzero web`** (background, localhost) and\u002For **`secretzero-agent`** seeding, as separate optional steps.\n\n---\n\n## Install \u002F Verify\n\nPreferred:\n\n```bash\nuv tool install -U \"secretzero[all]\"\n```\n\nTargeted extras (install only what you author against):\n\n| Bundle \u002F area | Extra |\n|---------------|--------|\n| AWS | `secretzero[aws]` |\n| Azure + Key Vault | `secretzero[azure]` |\n| Entra Agent ID | `secretzero[entra_agent_id]` |\n| Vault | `secretzero[vault]` |\n| GitHub | `secretzero[github]` |\n| GitLab | `secretzero[gitlab]` |\n| Jenkins | `secretzero[jenkins]` |\n| Kubernetes | `secretzero[kubernetes]` |\n| Ansible Vault file | `secretzero[ansible_vault]` |\n| Infisical (read) | `secretzero[infisical]` |\n| Vercel | `secretzero[vercel]` |\n| SOPS \u002F git-crypt | core package (no extra) |\n\nVerify:\n\n```bash\nsecretzero --help\nsecretzero validate --help\nsecretzero catalog --format json\nsecretzero providers list\n```\n\n**Live bundle matrix (targets only):** `docs\u002Freference\u002Fprovider-bundles-auto.md` — supplement with `secretzero catalog --format json` for generators.\n\n---\n\n## Decision map: where should this secret go?\n\nStart with the **destination**, then pick **provider → target kind → generator kind**.\n\n```mermaid\nflowchart TD\n  Q[\"Where must the secret live?\"]\n  Q --> L[\"Local disk \u002F repo-adjacent file\"]\n  Q --> C[\"Cloud or platform API\"]\n  Q --> E[Encrypted in git]\n  L --> LF[\"provider: local\"]\n  LF --> F1[\"kind: file — pick format\"]\n  LF --> F2[\"kind: template — Jinja2 render\"]\n  C --> CP[Pick provider bundle row below]\n  E --> EP[\"sops \u002F git_crypt \u002F ansible_vault file targets\"]\n```\n\n### Local provider (`provider: local`)\n\nNo `providers:` entry required. Use for dev, CI artifacts, Terraform var files, and blueprint metadata sidecars.\n\n| You need | `kind` | `config` highlights |\n|----------|--------|---------------------|\n| `.env` \u002F `TF_VAR_*` workflows | `file` | `format: dotenv`, `path: .env`, `merge: true` |\n| JSON\u002FYAML\u002FTOML config on disk | `file` | `format: json` \\| `yaml` \\| `toml` |\n| **Terraform HCL** `terraform.tfvars` | `file` | `format: tfvars`, `path: …\u002F*.tfvars`, `merge: true`, optional `key:` for TF variable name |\n| Terraform **JSON** var file | `file` | `format: json`, `path: …\u002F*.tfvars.json` |\n| Rendered multi-secret file | `template` | `template_path`, `output_path` |\n\n**tfvars v1 limits:** flat `name = \"string\"` only; gitignore `*.tfvars`; use `key` when manifest secret name ≠ Terraform variable name. See `examples\u002Fterraform-tfvars\u002F`.\n\n### Provider bundles (sync targets)\n\n| Destination | `providers:` kind | `kind` (target) | Typical `secrets[].kind` (generator) | Notes |\n|-------------|-------------------|-----------------|--------------------------------------|-------|\n| AWS SSM Parameter | `aws` | `ssm_parameter` | `random_password`, `random_string`, `static` | Optional `config.format: json` for structured payloads |\n| AWS Secrets Manager | `aws` | `secrets_manager` | same | same |\n| Azure Key Vault | `azure` | `azure_keyvault` or `key_vault` | same + `azure_app_reg` for app-reg-shaped static | Bind `provider_identity` on tenant\u002Fsubscription |\n| HashiCorp Vault KV | `vault` | `vault_kv` or `kv` | same | Token\u002Fambient auth |\n| GitHub Actions \u002F repo secret | `github` | `github_secret` | `random_*`, `static`, **`github_pat`** | PAT uses dedicated generator |\n| GitLab CI variable (project) | `gitlab` | `gitlab_variable` | `random_*`, `static`, **`gitlab_project_token`** | `project: auto` supported |\n| GitLab CI variable (group) | `gitlab` | `gitlab_group_variable` | `random_*`, `static` | Shared across group projects |\n| Jenkins credential | `jenkins` | `jenkins_credential` | `random_*`, `static` | |\n| Kubernetes Secret | `kubernetes` | `kubernetes_secret` | `random_*`, `static` | |\n| K8s ExternalSecret (ESO) | `kubernetes` | `external_secret` | `random_*`, `static` | ESO-shaped sync |\n| Vercel env var | `vercel` | `vercel_env` | `random_*`, `static` | `development` \u002F `preview` \u002F `production` |\n| SOPS-encrypted file in repo | `sops` | `sops_file` | `random_*`, `static` | Unlock via SOPS; not plaintext in git |\n| git-crypt filtered file | `git_crypt` | `git_crypt_file` | `random_*`, `static` | Requires git-crypt setup |\n| Ansible Vault file | `ansible_vault` | `ansible_vault_file` | `random_*`, `static` | `secretzero[ansible_vault]` |\n| **Entra Agent ID blueprint** | `entra-agent-id` | *(none — provider-only)* | **`entra-agent-blueprint`** | Graph lifecycle; often **also** `local`\u002F`file`\u002F`json` for metadata export |\n| Infisical | `infisical` | *(none today)* | use **`source`** `provider_read` or import flows | Read\u002Freference; not a write target |\n| Keeper Password Manager | `keeper` | `keeper_record` | `random_*`, `static` | Read via `provider_read`; write\u002Fcreate\u002Fupdate vault records; rotate via sync |\n\n### Core generators (any provider)\n\n| `kind` | Use when |\n|--------|----------|\n| `random_password` | High-entropy password (length, charset in `config`) |\n| `random_string` | API keys, tokens, alphanumeric secrets |\n| `static` | Known value, human prompt, or `${VAR}` placeholder; dict leaves for multi-field |\n| `script` | Generate via command (`zsh`, `ssh-keygen`, etc.) |\n| `provider_backed` | Value created by provider API (advanced; prefer bundle-specific kinds when available) |\n\n### Bundle-specific generators\n\n| `kind` | Provider | Use when |\n|--------|----------|----------|\n| `azure_app_reg` | `azure` | Entra app registration fields (static-like prompting) |\n| `github_pat` | `github` | Create GitHub App installation token via API |\n| `gitlab_project_token` | `gitlab` | Create GitLab project access token via API (bootstrap PAT required) |\n| `entra-agent-blueprint` | `entra-agent-id` | Microsoft Agent Identity blueprint + creds + optional child agents |\n\n**Static-like kinds** (`static`, `azure_app_reg`, …): agent sync may prompt per null leaf; prefer `.szvar` to pre-fill lane values.\n\n### Multi-target pattern\n\nSame secret, multiple destinations (common):\n\n```yaml\ntargets:\n  - provider: aws\n    kind: ssm_parameter\n    config: { name: \u002F${env}\u002Fdb\u002Fpassword }\n  - provider: local\n    kind: file\n    config: { path: .env, format: dotenv, merge: true, key: DB_PASSWORD }\n```\n\nAttach `identity_policies` on cloud targets when sync must be lane-bound (see below).\n\n---\n\n## Authoring Workflow\n\nFor **interactive**, **Hermes**, or **MCP** work, use **Guided authoring session** (inventory + add\u002Fedit loop). For quick expert edits without a walkthrough, use this checklist:\n\n1. **Load schema context**\n   - Treat `Secretfile.schema.json` and `src\u002Fsecretzero\u002Fmodels.py` as source of truth.\n2. **Confirm manifest root** (if paths or `-f` may change)\n   - Same rules as Phase 0 in guided session.\n3. **Use the decision map**\n   - Pick destination → provider\u002Ftarget → generator before writing YAML.\n4. **Model whole secrets first**\n   - One logical secret per `secrets[]` entry unless a true multi-field bundle is needed.\n5. **Select generator intentionally**\n   - Prefer `random_password`, `random_string`, `static` (or static-like kinds) before `script` \u002F `provider_backed`.\n6. **Map explicit targets**\n   - Every secret has clear targets unless intentionally deferred (e.g. Entra blueprint metadata-only phase).\n7. **Break out environment variance**\n   - Keep structural defaults in `Secretfile.yml`.\n   - Move lane-specific values to `*.szvar` files (`dev.szvar`, `staging.szvar`, `prod.szvar`).\n8. **Apply identity guardrails**\n   - Add `kind: provider_identity` policies and attach with `identity_policies` where needed.\n9. **Validate in loop**\n   - `secretzero validate`\n   - `secretzero render` (if interpolation\u002Ftemplating is used)\n   - `secretzero sync --dry-run --var-file \u003Clane>.szvar`\n\n## Environment Breakout Heuristics (`.szvar`)\n\nPrefer `.szvar` breakout when values differ by deployment lane:\n\n- Target names\u002Fpaths (`\u002F${env}\u002F...`)\n- Regions, accounts, tenants, namespaces\n- Role\u002Fsession specific selectors\n- Non-structural per-lane toggles\n- Pre-filled `static` \u002F `azure_app_reg` leaves (avoid re-prompts)\n\nKeep in manifest:\n\n- Secret definitions (`name`, `kind`, generator config shape)\n- Provider aliases and auth mode intent\n- Policy object structure\n\nPattern:\n\n```yaml\nvariables:\n  env: dev\n  aws_region: us-east-1\n```\n\n`dev.szvar`:\n\n```yaml\nenv: dev\naws_region: us-east-1\n```\n\n`prod.szvar`:\n\n```yaml\nenv: prod\naws_region: us-west-2\n```\n\n## Contextless Secret Discovery (Safe Mode)\n\nUse only discovery commands that return metadata (no secret values):\n\n```bash\n# Local repo scan (names \u002F paths only)\nsecretzero detect \u003Cmanifest_root> --all-keys --format json\nsecretzero discover \u003Cmanifest_root> --local-only --dry-run --format json\n\n# Provider \u002F lockfile metadata (existing manifest)\nsecretzero status --format json\nsecretzero test --verbose --format json\nsecretzero catalog --format json\nsecretzero list providers -f Secretfile.yml --format json\nsecretzero list targets -f Secretfile.yml --format json\n```\n\nDerive policy candidates from actor\u002Fauth metadata (account, region, arn, tenant_id, subscription_id, namespace, etc.), never from secret contents.\n\n**Guided session:** offer `detect` \u002F `discover` in Phase 1; use this section for provider-identity policy drafting on an existing manifest.\n\n## Target Policy Binding Guidance\n\n- **AWS**: constrain `account` and `region` first; optionally constrain role\u002Farn patterns.\n- **Azure**: constrain `tenant_id` and, when available, `subscription_id`.\n- **Other providers**: bind to strongest stable identity fields exposed by `get_actor_info()`.\n- Avoid broad `*` or permissive regex unless explicitly approved.\n\nExample:\n\n```yaml\npolicies:\n  aws_prod_identity:\n    kind: provider_identity\n    providers: [aws]\n    match: all\n    rules:\n      - field: account\n        glob: \"111111111111\"\n      - field: region\n        glob: us-east-1\n```\n\n## Related skills & examples\n\n| Topic | Location |\n|-------|----------|\n| Agent sync \u002F vectors | `skills\u002Fsecretzero-agent\u002FSKILL.md` |\n| `.env`, ingest, `SZ_AGENT_MODE` | `skills\u002Fsecretzero-handle\u002FSKILL.md` |\n| tfvars file target | `examples\u002Fterraform-tfvars\u002F`, `.mex\u002Fpatterns\u002Ffile-target-tfvars.md` |\n| Multi-env + AWS policies | `examples\u002Fmulti-env-aws-policies\u002F` |\n| GitLab project token + variable | `examples\u002Fgitlab-project-token.yml` |\n| Entra Agent ID | `examples\u002Fentra-agent-id-blueprint.yml`, `docs\u002FENTRA-AGENT-ID.md` |\n\n## Definition of Done\n\n- Manifest root (and local path base) were confirmed for new manifests.\n- `Secretfile.yml` is schema compliant and readable.\n- Provider\u002Ftarget\u002Fgenerator choices match the decision map (or document intentional exceptions).\n- `secretzero validate` exits cleanly.\n- `.szvar` files cover lane variance without duplicating manifest structure.\n- Provider-backed targets are bound to least-privilege identity policies where supported.\n- No plaintext secret material appears in prompts, logs, files, or responses.\n","# SecretZero Author Skill\n\nUse this skill whenever the task is to create or improve `Secretfile.yml` and related `.szvar` files.\n\n**Absolute rule (non-negotiable):** see `skills\u002Fsecretzero\u002FSKILL.md` — **never consume secrets in agent context**; route all secret operations through SecretZero (detect\u002Fdiscover, validate, sync, web UI, agent sync). Do not ask users to paste values into chat.\n\nFor **new manifests**, **updates to existing manifests**, or **Hermes \u002F MCP-driven authoring**, follow **Guided authoring session** below.\n\n## Mission\n\nProduce high-quality, json-schema compliant SecretZero manifests that:\n\n- Pass `secretzero validate` with zero issues.\n- Keep discovery and inventory **contextless** (metadata only; SecretZero commands, not file reads).\n- Intelligently break out environment variance into `.szvar` files.\n- Bind provider-backed targets to least-privilege identity policies for AWS\u002FAzure\u002Fother authenticated environments.\n\n## Capability discovery (generators & targets)\n\nUse the **live catalog** before inventing `secrets[].kind` or `targets[].kind` values.\n\n**Primary (machine-complete — preferred for agents):**\n\n```bash\nsecretzero catalog --format json\nsecretzero catalog --provider gitlab --format json\nsecretzero catalog --bundle core --format json\nsecretzero catalog --kind gitlab_variable --kind-type target --verbose\n```\n\nThe catalog is backed by `BundleRegistry` and includes every registered generator, target, and provider bundle with `typical_generators` hints per target.\n\n**Human-readable summary:**\n\n```bash\nsecretzero catalog\nsecretzero secret-types\n```\n\n**Manifest-scoped (already configured in this Secretfile — not the global catalog):**\n\n```bash\nsecretzero list providers -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\nsecretzero list targets -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\n```\n\n**Provider introspection:**\n\n```bash\nsecretzero providers list\nsecretzero providers capabilities \u003Cprovider_kind>\n```\n\nThe static **decision map** below is a curated shortcut; when it disagrees with `secretzero catalog --format json`, trust the catalog.\n\n## Safety Rules (Non-Negotiable)\n\nInherits the **SecretZero only — never secrets in context** rule from `skills\u002Fsecretzero\u002FSKILL.md`.\n\n- Never ask for, copy, log, or output plaintext secret values in chat, prompts, or tool results.\n- Never use IDE\u002Ffilesystem\u002FMCP tools to read files that may contain secrets; use `detect` \u002F `discover` \u002F `list` \u002F `status` instead.\n- Discovery and inventory use metadata only (`status`, `test`, provider identity, `list secrets` JSON) — not `get --reveal` or manifest `render`.\n- Human entry for missing values: `secretzero web` or `secretzero agent sync --web` — not chat paste.\n- If provider identity evidence is missing, mark policy confidence as low and require human confirmation.\n\n## Guided authoring session\n\nUse this flow for **new** or **existing** manifests. Phases 0–1 apply to both; Phase 2 onward supports agent-assisted **add\u002Fedit loops** after discovery or whenever the user wants to extend `secrets[]`.\n\nDo not skip steps unless the user explicitly says they already decided (then record their choice and continue).\n\n### Phase 0 — Confirm manifest root (required, always first)\n\nBefore naming secrets or picking generators, **confirm the manifest root** with the user:\n\n| Concept | Meaning |\n|---------|---------|\n| **Manifest root** | Directory that will contain `Secretfile.yml` (and usually `.gitsecrets.lock`) |\n| **CLI path** | `secretzero -f \u003Cmanifest_root>\u002FSecretfile.yml …` for all later commands |\n\n**Ask explicitly:**\n\n1. Absolute path to the manifest root (default: current project\u002Frepo root if obvious).\n2. Whether `Secretfile.yml` already exists there (edit vs create).\n3. Default **local target base** for `provider: local` \u002F `kind: file` paths — almost always the manifest root (`.`). If secrets should land under a subfolder (e.g. `config\u002F`, `secrets\u002F`), confirm that **once** and use it consistently in `config.path` (paths are relative to the manifest root unless absolute).\n\n**Rules:**\n\n- Do not draft `config.path` values until manifest root and local base folder are confirmed.\n- Repeat the chosen root in one line before presenting secret-type options (e.g. “Manifest root: `\u002Fpath\u002Fto\u002Fapp`, local files under `.`”).\n- If the user points at a monorepo subproject, use **that** directory as manifest root, not the repo apex, unless they want a shared top-level manifest.\n\n### Phase 1 — Offer local discovery (optional)\n\nOffer discovery when it helps; skip when the project is greenfield with no env files yet.\n\n**Offer this prompt:**\n\n> I can scan the manifest root for existing secret *names* (no values) and suggest manifest entries. Use local discovery? (yes \u002F no)\n\n| User choice | When it makes sense | Command (agent-safe; no values in output) |\n|-------------|---------------------|-------------------------------------------|\n| **Light scan** | `.env`, `.env.*`, `secrets*`, `credentials*` files may exist | `secretzero detect \u003Cmanifest_root> --all-keys --format json` |\n| **Deep scan** | Many config files; want ranked candidates + `Secretfile.detect.yml` draft | `secretzero discover \u003Cmanifest_root> --local-only --dry-run --format json` (add `--no-llm` if LLM must stay off) |\n| **Skip** | Greenfield or user already has a secret list | Continue to Phase 2 (inventory) or Phase 3 (add loop) |\n\n**After discovery:**\n\n- Present results as a **table of names** (and source file paths only) — never paste values from disk into chat.\n- Ask which candidates to include in `secrets[]` (multi-select or “all above threshold”).\n- Merge chosen rows into the manifest using **placeholders** (`null` leaves, `${VAR}`) — not literals. Co-load `skills\u002Fsecretzero-handle\u002FSKILL.md` when `.env` preseed is next.\n- If `Secretfile.detect.yml` was written, treat it as a **draft**; human reviews before rename\u002Freplace to `Secretfile.yml`.\n\n**Never** `read_file` on `.env`, `.env.*`, `*.pem`, or lane `.szvar` files in agent sessions.\n\n### Phase 2 — Show current manifest inventory (existing or after first draft)\n\nWhenever `Secretfile.yml` exists (or you just merged discovery drafts), **show what is already defined** before adding more entries. This phase applies to **updates** as well as greenfield manifests that already have rows.\n\n**Load metadata (no values):**\n\n```bash\nsecretzero list secrets -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\nsecretzero status -f \u003Cmanifest_root>\u002FSecretfile.yml --format json   # optional: synced \u002F not_synced\n```\n\n**Present visually in chat** — use a clear markdown table (and optional compact mermaid summary when ≤8 secrets):\n\n| Secret | Generator | Targets | Lockfile status |\n|--------|-----------|---------|-----------------|\n| `db_password` | `random_password` | `local\u002Ffile`, `aws\u002Fssm_parameter` | synced |\n| `api_key` | `static` | `local\u002Ffile` | not_synced |\n\nRules:\n\n- Include **name**, **kind**, **targets** (`provider\u002Fkind`), and **status** when `status --format json` was run.\n- Do **not** include secret values, static defaults, or full target `config` blobs in chat (use `SZ_AGENT_MODE` when editing existing manifests under an agent).\n- If the manifest is empty, say so explicitly and skip straight to Phase 3.\n\n**Offer:**\n\n> Here is your current Secretfile inventory. Add another secret, edit an existing one, or continue to validate? (add \u002F edit \u002F done)\n\n### Phase 3 — Add \u002F edit loop (repeat until user says done)\n\nHumans can run the same loop in the CLI:\n\n```bash\nsecretzero add\nsecretzero new          # alias of add\nsecretzero add db_password --kind random_password \\\n  --target provider=local,kind=file,path=.env.local,format=dotenv\n```\n\n`secretzero add` writes generator kind, optional `source:`, and targets. It refuses plaintext static values. Enter those later with `secretzero web` or `secretzero sync`.\n\nThis loop is the main **agent-assisted authoring** path for both new and existing manifests. Run it after Phase 1 merges discovery candidates, or anytime the user wants to extend the manifest without rescanning disk.\n\n**Loop prompt (each iteration):**\n\n> Add a new secret, modify an existing entry, or finish manifest edits? (add \u002F edit name \u002F done)\n\nWhen the user chooses **add** or **edit**:\n\n1. **Destination category** (numbered menu):\n\n   | # | Category | Typical `providers` \u002F targets |\n   |---|----------|-------------------------------|\n   | 1 | **Local disk** | `provider: local` → `file` or `template` |\n   | 2 | **Cloud \u002F platform API** | `aws`, `azure`, `vault`, `github`, … |\n   | 3 | **Encrypted in git** | `sops` \u002F `git_crypt` \u002F `ansible_vault` file targets |\n\n2. **Refresh live capability lists** (once per iteration or when the user changes destination):\n\n   ```bash\n   secretzero catalog --format json\n   secretzero catalog --provider \u003Cprovider_kind> --format json\n   secretzero catalog --kind \u003Ckind> --kind-type generator --verbose\n   secretzero catalog --kind \u003Ckind> --kind-type target --verbose\n   secretzero list providers -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\n   secretzero list targets -f \u003Cmanifest_root>\u002FSecretfile.yml --format json\n   ```\n\n3. **Generator menu** (`secrets[].kind`) — present as lettered options (run `secretzero catalog --format json` for the full list):\n\n   | Option | `kind` | Use when |\n   |--------|--------|----------|\n   | A | `random_password` | High-entropy password |\n   | B | `random_string` | API keys, tokens, alphanumeric secrets |\n   | C | `static` | Human prompt, `${VAR}`, or structured dict leaves |\n   | D | `script` | Generate via command (`ssh-keygen`, etc.) |\n   | E | `azure_app_reg` | Entra app registration-shaped fields |\n   | F | `github_pat` | Create GitHub App installation token via API |\n   | G | `entra-agent-blueprint` | Agent Identity blueprint lifecycle |\n   | H | `gitlab_project_token` | Create GitLab project access token via API |\n   | I | `provider_backed` | Advanced; only if no bundle-specific kind fits |\n\n4. **Target menu** — from `secretzero catalog --format json` (bundle `targets` + `typical_generators`) and the **Decision map**; for local, offer dotenv \u002F json \u002F yaml \u002F toml \u002F tfvars \u002F template options.\n\n5. **Per-entry checklist:** `name`, generator, target(s) (paths relative to manifest root), `.szvar` lane variance, `identity_policies` on cloud targets.\n\n6. **Apply the edit** to `Secretfile.yml` (and `.szvar` if needed), then **re-run Phase 2** (refresh inventory table) before the next iteration.\n\nStop the loop when the user chooses **done** or confirms the inventory is complete.\n\n### Phase 4 — Validate\n\n1. `secretzero validate -f \u003Cmanifest_root>\u002FSecretfile.yml`\n2. `secretzero sync --dry-run -f …` (and `--var-file` when lanes exist)\n3. Fix schema\u002Fpolicy errors; re-show inventory if secrets were renamed or removed.\n\n### Phase 5 — Optional operations UI and seeding handoff\n\nAfter a clean validate (and dry-run when providers exist), offer **two separate checkpoints** (do not merge in one step):\n\n**A — Network dashboard (optional, human-operated sync UI)**\n\n> Start the SecretZero web dashboard in the background so you can sync, refresh, and edit static values in the browser? (yes \u002F no)\n\nIf **yes** (trusted local machine only):\n\n```bash\ncd \u003Cmanifest_root>\nsecretzero web -f Secretfile.yml --host 127.0.0.1 --port \u003Cfree-port> \\\n  > \u002Ftmp\u002Fsecretzero-web.log 2>&1 &\n```\n\n- Use **`127.0.0.1`** unless the user explicitly needs LAN access.\n- Relay the **full login URL and bootstrap token** from command output or log — never paraphrase the token.\n- Tell the user this is the **persistent dashboard** (`secretzero web`), not the one-shot Vector 2 form from `secretzero agent sync --web`.\n- Remind them to use **Shut down** in the UI or stop the background job when finished.\n\n**B — Agent seeding (when values are still missing)**\n\nLoad `skills\u002Fsecretzero-agent\u002FSKILL.md` for `secretzero agent sync --json` (and `--web` only for the **one-shot** localhost seeding form). Prefer the Phase 5A dashboard when the human wants a full UI; prefer agent sync when the agent should stay structured and metadata-only.\n\n### Hermes + MCP\n\nThe guided phases are **transport-agnostic**; only the invocation changes.\n\n| Phase | Hermes chat | SecretZero via MCP \u002F CLI |\n|-------|-------------|---------------------------|\n| 0 Manifest root | Always ask in chat | — |\n| 1 Discovery | Offer yes\u002Fno | **`sz_discover`** or `discover --local-only --dry-run --format json` |\n| 2 Inventory | Format JSON as markdown table | **`sz_status`** or `list secrets` \u002F `status --format json` |\n| 3 Add\u002Fedit loop | Menus + user choices | `secret-types`, `list providers`, `list targets`; write YAML via edit tool |\n| 4 Validate | Report errors | `validate`, **`sz_sync`** with `dry_run: true` or `sync --dry-run` |\n| 5 Web \u002F seed | Offer dashboard; hand off sync skill | CLI `web` subprocess or **`agent sync --json [--web]`** (not on MCP) |\n\n**MCP notes:**\n\n- This repo ships a **first-party MCP server** (`secretzero mcp serve`, see `docs\u002Fmcp-setup.md`) plus CLI + REST API. Tools: `sz_sync`, `sz_discover`, `sz_status`, `sz_rotate`, `sz_drift_check` — metadata only, `SZ_AGENT_MODE=true` by default. Host config: `secretzero mcp config generate`; defaults in `config.mcp`.\n- **Tool parity:**\n\n| MCP tool | CLI equivalent |\n|----------|----------------|\n| `sz_discover` | `secretzero discover --format json` |\n| `sz_status` | `secretzero status --format json` |\n| `sz_sync` | `secretzero sync --format json` |\n| `sz_rotate` | `secretzero rotate --format json` |\n| `sz_drift_check` | `secretzero drift --format json` |\n\n- Use **`sz_discover`** (not host filesystem reads of `.env`) for credential inventory during MCP authoring.\n- **Do not use MCP `sampling\u002FcreateMessage`** for discovery. Use `sz_discover` \u002F `secretzero discover` (metadata-only JSON). Sampling sends file context to the host LLM and increases spill risk versus purpose-built scanners.\n- Leave **sampling disabled** on untrusted MCP bridges unless you operate a custom server with an explicit spill policy.\n- With **`SZ_AGENT_MODE=true`**, co-load `skills\u002Fsecretzero-handle\u002FSKILL.md`; inventory and validate still work; avoid `render` and plaintext dumps.\n- **Bootstrap \u002F seeding** still requires CLI **`agent sync --json [--web]`** or API `POST \u002Fagent\u002Fsync` — MCP has no Vector 1–3 tools.\n\n### Definition of done (guided session)\n\n- Manifest root and local path base were **confirmed with the user**.\n- Current `secrets[]` were shown in a **readable inventory table** before and after edits.\n- Add\u002Fedit loop ran until the user said **done**; kinds\u002Ftargets chosen from **menus + CLI lists**, not invented.\n- Discovery was offered when appropriate; if run, only metadata was shown in chat.\n- `secretzero validate` passes; dry-run sync attempted when providers are configured.\n- User was offered **`secretzero web`** (background, localhost) and\u002For **`secretzero-agent`** seeding, as separate optional steps.\n\n---\n\n## Install \u002F Verify\n\nPreferred:\n\n```bash\nuv tool install -U \"secretzero[all]\"\n```\n\nTargeted extras (install only what you author against):\n\n| Bundle \u002F area | Extra |\n|---------------|--------|\n| AWS | `secretzero[aws]` |\n| Azure + Key Vault | `secretzero[azure]` |\n| Entra Agent ID | `secretzero[entra_agent_id]` |\n| Vault | `secretzero[vault]` |\n| GitHub | `secretzero[github]` |\n| GitLab | `secretzero[gitlab]` |\n| Jenkins | `secretzero[jenkins]` |\n| Kubernetes | `secretzero[kubernetes]` |\n| Ansible Vault file | `secretzero[ansible_vault]` |\n| Infisical (read) | `secretzero[infisical]` |\n| Vercel | `secretzero[vercel]` |\n| SOPS \u002F git-crypt | core package (no extra) |\n\nVerify:\n\n```bash\nsecretzero --help\nsecretzero validate --help\nsecretzero catalog --format json\nsecretzero providers list\n```\n\n**Live bundle matrix (targets only):** `docs\u002Freference\u002Fprovider-bundles-auto.md` — supplement with `secretzero catalog --format json` for generators.\n\n---\n\n## Decision map: where should this secret go?\n\nStart with the **destination**, then pick **provider → target kind → generator kind**.\n\n```mermaid\nflowchart TD\n  Q[\"Where must the secret live?\"]\n  Q --> L[\"Local disk \u002F repo-adjacent file\"]\n  Q --> C[\"Cloud or platform API\"]\n  Q --> E[Encrypted in git]\n  L --> LF[\"provider: local\"]\n  LF --> F1[\"kind: file — pick format\"]\n  LF --> F2[\"kind: template — Jinja2 render\"]\n  C --> CP[Pick provider bundle row below]\n  E --> EP[\"sops \u002F git_crypt \u002F ansible_vault file targets\"]\n```\n\n### Local provider (`provider: local`)\n\nNo `providers:` entry required. Use for dev, CI artifacts, Terraform var files, and blueprint metadata sidecars.\n\n| You need | `kind` | `config` highlights |\n|----------|--------|---------------------|\n| `.env` \u002F `TF_VAR_*` workflows | `file` | `format: dotenv`, `path: .env`, `merge: true` |\n| JSON\u002FYAML\u002FTOML config on disk | `file` | `format: json` \\| `yaml` \\| `toml` |\n| **Terraform HCL** `terraform.tfvars` | `file` | `format: tfvars`, `path: …\u002F*.tfvars`, `merge: true`, optional `key:` for TF variable name |\n| Terraform **JSON** var file | `file` | `format: json`, `path: …\u002F*.tfvars.json` |\n| Rendered multi-secret file | `template` | `template_path`, `output_path` |\n\n**tfvars v1 limits:** flat `name = \"string\"` only; gitignore `*.tfvars`; use `key` when manifest secret name ≠ Terraform variable name. See `examples\u002Fterraform-tfvars\u002F`.\n\n### Provider bundles (sync targets)\n\n| Destination | `providers:` kind | `kind` (target) | Typical `secrets[].kind` (generator) | Notes |\n|-------------|-------------------|-----------------|--------------------------------------|-------|\n| AWS SSM Parameter | `aws` | `ssm_parameter` | `random_password`, `random_string`, `static` | Optional `config.format: json` for structured payloads |\n| AWS Secrets Manager | `aws` | `secrets_manager` | same | same |\n| Azure Key Vault | `azure` | `azure_keyvault` or `key_vault` | same + `azure_app_reg` for app-reg-shaped static | Bind `provider_identity` on tenant\u002Fsubscription |\n| HashiCorp Vault KV | `vault` | `vault_kv` or `kv` | same | Token\u002Fambient auth |\n| GitHub Actions \u002F repo secret | `github` | `github_secret` | `random_*`, `static`, **`github_pat`** | PAT uses dedicated generator |\n| GitLab CI variable (project) | `gitlab` | `gitlab_variable` | `random_*`, `static`, **`gitlab_project_token`** | `project: auto` supported |\n| GitLab CI variable (group) | `gitlab` | `gitlab_group_variable` | `random_*`, `static` | Shared across group projects |\n| Jenkins credential | `jenkins` | `jenkins_credential` | `random_*`, `static` | |\n| Kubernetes Secret | `kubernetes` | `kubernetes_secret` | `random_*`, `static` | |\n| K8s ExternalSecret (ESO) | `kubernetes` | `external_secret` | `random_*`, `static` | ESO-shaped sync |\n| Vercel env var | `vercel` | `vercel_env` | `random_*`, `static` | `development` \u002F `preview` \u002F `production` |\n| SOPS-encrypted file in repo | `sops` | `sops_file` | `random_*`, `static` | Unlock via SOPS; not plaintext in git |\n| git-crypt filtered file | `git_crypt` | `git_crypt_file` | `random_*`, `static` | Requires git-crypt setup |\n| Ansible Vault file | `ansible_vault` | `ansible_vault_file` | `random_*`, `static` | `secretzero[ansible_vault]` |\n| **Entra Agent ID blueprint** | `entra-agent-id` | *(none — provider-only)* | **`entra-agent-blueprint`** | Graph lifecycle; often **also** `local`\u002F`file`\u002F`json` for metadata export |\n| Infisical | `infisical` | *(none today)* | use **`source`** `provider_read` or import flows | Read\u002Freference; not a write target |\n| Keeper Password Manager | `keeper` | `keeper_record` | `random_*`, `static` | Read via `provider_read`; write\u002Fcreate\u002Fupdate vault records; rotate via sync |\n\n### Core generators (any provider)\n\n| `kind` | Use when |\n|--------|----------|\n| `random_password` | High-entropy password (length, charset in `config`) |\n| `random_string` | API keys, tokens, alphanumeric secrets |\n| `static` | Known value, human prompt, or `${VAR}` placeholder; dict leaves for multi-field |\n| `script` | Generate via command (`zsh`, `ssh-keygen`, etc.) |\n| `provider_backed` | Value created by provider API (advanced; prefer bundle-specific kinds when available) |\n\n### Bundle-specific generators\n\n| `kind` | Provider | Use when |\n|--------|----------|----------|\n| `azure_app_reg` | `azure` | Entra app registration fields (static-like prompting) |\n| `github_pat` | `github` | Create GitHub App installation token via API |\n| `gitlab_project_token` | `gitlab` | Create GitLab project access token via API (bootstrap PAT required) |\n| `entra-agent-blueprint` | `entra-agent-id` | Microsoft Agent Identity blueprint + creds + optional child agents |\n\n**Static-like kinds** (`static`, `azure_app_reg`, …): agent sync may prompt per null leaf; prefer `.szvar` to pre-fill lane values.\n\n### Multi-target pattern\n\nSame secret, multiple destinations (common):\n\n```yaml\ntargets:\n  - provider: aws\n    kind: ssm_parameter\n    config: { name: \u002F${env}\u002Fdb\u002Fpassword }\n  - provider: local\n    kind: file\n    config: { path: .env, format: dotenv, merge: true, key: DB_PASSWORD }\n```\n\nAttach `identity_policies` on cloud targets when sync must be lane-bound (see below).\n\n---\n\n## Authoring Workflow\n\nFor **interactive**, **Hermes**, or **MCP** work, use **Guided authoring session** (inventory + add\u002Fedit loop). For quick expert edits without a walkthrough, use this checklist:\n\n1. **Load schema context**\n   - Treat `Secretfile.schema.json` and `src\u002Fsecretzero\u002Fmodels.py` as source of truth.\n2. **Confirm manifest root** (if paths or `-f` may change)\n   - Same rules as Phase 0 in guided session.\n3. **Use the decision map**\n   - Pick destination → provider\u002Ftarget → generator before writing YAML.\n4. **Model whole secrets first**\n   - One logical secret per `secrets[]` entry unless a true multi-field bundle is needed.\n5. **Select generator intentionally**\n   - Prefer `random_password`, `random_string`, `static` (or static-like kinds) before `script` \u002F `provider_backed`.\n6. **Map explicit targets**\n   - Every secret has clear targets unless intentionally deferred (e.g. Entra blueprint metadata-only phase).\n7. **Break out environment variance**\n   - Keep structural defaults in `Secretfile.yml`.\n   - Move lane-specific values to `*.szvar` files (`dev.szvar`, `staging.szvar`, `prod.szvar`).\n8. **Apply identity guardrails**\n   - Add `kind: provider_identity` policies and attach with `identity_policies` where needed.\n9. **Validate in loop**\n   - `secretzero validate`\n   - `secretzero render` (if interpolation\u002Ftemplating is used)\n   - `secretzero sync --dry-run --var-file \u003Clane>.szvar`\n\n## Environment Breakout Heuristics (`.szvar`)\n\nPrefer `.szvar` breakout when values differ by deployment lane:\n\n- Target names\u002Fpaths (`\u002F${env}\u002F...`)\n- Regions, accounts, tenants, namespaces\n- Role\u002Fsession specific selectors\n- Non-structural per-lane toggles\n- Pre-filled `static` \u002F `azure_app_reg` leaves (avoid re-prompts)\n\nKeep in manifest:\n\n- Secret definitions (`name`, `kind`, generator config shape)\n- Provider aliases and auth mode intent\n- Policy object structure\n\nPattern:\n\n```yaml\nvariables:\n  env: dev\n  aws_region: us-east-1\n```\n\n`dev.szvar`:\n\n```yaml\nenv: dev\naws_region: us-east-1\n```\n\n`prod.szvar`:\n\n```yaml\nenv: prod\naws_region: us-west-2\n```\n\n## Contextless Secret Discovery (Safe Mode)\n\nUse only discovery commands that return metadata (no secret values):\n\n```bash\n# Local repo scan (names \u002F paths only)\nsecretzero detect \u003Cmanifest_root> --all-keys --format json\nsecretzero discover \u003Cmanifest_root> --local-only --dry-run --format json\n\n# Provider \u002F lockfile metadata (existing manifest)\nsecretzero status --format json\nsecretzero test --verbose --format json\nsecretzero catalog --format json\nsecretzero list providers -f Secretfile.yml --format json\nsecretzero list targets -f Secretfile.yml --format json\n```\n\nDerive policy candidates from actor\u002Fauth metadata (account, region, arn, tenant_id, subscription_id, namespace, etc.), never from secret contents.\n\n**Guided session:** offer `detect` \u002F `discover` in Phase 1; use this section for provider-identity policy drafting on an existing manifest.\n\n## Target Policy Binding Guidance\n\n- **AWS**: constrain `account` and `region` first; optionally constrain role\u002Farn patterns.\n- **Azure**: constrain `tenant_id` and, when available, `subscription_id`.\n- **Other providers**: bind to strongest stable identity fields exposed by `get_actor_info()`.\n- Avoid broad `*` or permissive regex unless explicitly approved.\n\nExample:\n\n```yaml\npolicies:\n  aws_prod_identity:\n    kind: provider_identity\n    providers: [aws]\n    match: all\n    rules:\n      - field: account\n        glob: \"111111111111\"\n      - field: region\n        glob: us-east-1\n```\n\n## Related skills & examples\n\n| Topic | Location |\n|-------|----------|\n| Agent sync \u002F vectors | `skills\u002Fsecretzero-agent\u002FSKILL.md` |\n| `.env`, ingest, `SZ_AGENT_MODE` | `skills\u002Fsecretzero-handle\u002FSKILL.md` |\n| tfvars file target | `examples\u002Fterraform-tfvars\u002F`, `.mex\u002Fpatterns\u002Ffile-target-tfvars.md` |\n| Multi-env + AWS policies | `examples\u002Fmulti-env-aws-policies\u002F` |\n| GitLab project token + variable | `examples\u002Fgitlab-project-token.yml` |\n| Entra Agent ID | `examples\u002Fentra-agent-id-blueprint.yml`, `docs\u002FENTRA-AGENT-ID.md` |\n\n## Definition of Done\n\n- Manifest root (and local path base) were confirmed for new manifests.\n- `Secretfile.yml` is schema compliant and readable.\n- Provider\u002Ftarget\u002Fgenerator choices match the decision map (or document intentional exceptions).\n- `secretzero validate` exits cleanly.\n- `.szvar` files cover lane variance without duplicating manifest structure.\n- Provider-backed targets are bound to least-privilege identity policies where supported.\n- No plaintext secret material appears in prompts, logs, files, or responses.\n",{"name":5,"description":7},"main","a682dba45de8f378811b7c88ac060527ce90a912",".agents\u002Fskills\u002Fsecretzero-author",0,"https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero","https:\u002F\u002Fsecret0.com\u002F","https:\u002F\u002Fgithub.com\u002Fzloeber","https:\u002F\u002Fblog.zacharyloeber.com","Infrastructure and cloud solutions architect. Automation engineer. Professional complexity eater.","2026-10-31 22:04:55",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add zloeber\u002FSecretZero --skill secretzero-author",{"tool":40,"command":41},"bunx","bunx skills add zloeber\u002FSecretZero --skill secretzero-author",{"tool":43,"command":44},"pnpm","pnpm dlx skills add zloeber\u002FSecretZero --skill secretzero-author","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecretzero-author\u002FSKILL.md",true,[],[49,56,63,68,75,82],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7AGFT72DBDAFDCCS2SCY12Q","secretzero","Compatibility entrypoint for SecretZero skills. Enforces the absolute rule:\nnever consume secrets in agent context — use SecretZero for all secret\nhandling. Routes to secretzero-author, secretzero-agent, secretzero-handle,\nand secretzero-agent-adopt.","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002Fsrc\u002Fsecretzero\u002Fdata\u002Fskills\u002Fsecretzero\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7AGFNGG84QMWQ97NP7SAQZE","secretzero-handle","Use when the task touches `.env`, dotenv\u002Fjson\u002Fyaml secret files, local `file` targets,\nor any workflow where secret material could enter agent context. Enforces\n`SZ_AGENT_MODE=true` spill-safe CLI usage, ingest preseed, strict manifest validation,\nand safe discovery patterns alongside `secretzero-agent` \u002F `secretzero-author`.","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002Fsrc\u002Fsecretzero\u002Fdata\u002Fskills\u002Fsecretzero-handle\u002FSKILL.md",[],[],{"skillNo":64,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7AGFDSKKWBQY3F3KE1DTVCE","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002Fsrc\u002Fsecretzero\u002Fdata\u002Fskills\u002Fsecretzero-author\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7AGFAAKHFGJWNPE0R6Q6PT9","secretzero-agent","Use for agentic and operational SecretZero workflows including unified\n`agent sync`, CLI\u002FAPI\u002FMCP parity, secure human-in-the-loop vectors, and\nautomation-safe run loops.","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002Fsrc\u002Fsecretzero\u002Fdata\u002Fskills\u002Fsecretzero-agent\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AGF6EQTHKAE55FJA8M23PM","secretzero-agent-adopt","Use for agent runtime integration: discover Hermes\u002FOpenClaw installs,\nbootstrap SecretZero environments with `secretzero agent list` \u002F `agent adopt`,\nlockfile preseed, and restore loops. Inherits absolute rule from\n`skills\u002Fsecretzero\u002FSKILL.md` (SecretZero only; never secrets in context).","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002Fsrc\u002Fsecretzero\u002Fdata\u002Fskills\u002Fsecretzero-agent-adopt\u002FSKILL.md",[],[],{"skillNo":83,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7AGF26S7HJT7571JWGV2E53","https:\u002F\u002Fgithub.com\u002Fzloeber\u002FSecretZero\u002Fblob\u002Fmain\u002Fskills\u002Fsecretzero\u002FSKILL.md",[],[]]