[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M784S8HE4XHFBK0MFZ4VTFX6":3,"skill-same:01M784S8HE4XHFBK0MFZ4VTFX6":57},{"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":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":6,"updatedAt":43,"install":44,"resources":56},"01M784S8HE4XHFBK0MFZ4VTFX6","zitadel-bootstrap",null,"Use when setting up Zitadel for a new plan.ai-style deployment (a cloud console, a chat\u002Fagent and optionally a Harbor on their own domains, like webapp.agency) or re-running it — asks for the domains, org and login names, social-login credentials and shared keys, writes ansible\u002Fzitadel\u002Fdeployments\u002F\u003Cname>.yml, runs setup.yml (Zitadel orgs, login policy, IdPs, projects, clients, service users) and secrets.yml (the rest of the secrets, private\u002F\u003Cname>-{cloud,chat,harbor}.nix).","planailabs\u002Fnixos-infra","planailabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F261949590?v=4","01M784QMNK8YTQBDBX1G4QWPBZ","plan.ai Labs","01M784S1HQN2W6B9ZTXNA7N91T",1,"MIT","https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra\u002Fblob\u002Ftrunk\u002F.agents\u002Fskills\u002Fzitadel-bootstrap\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: zitadel-bootstrap\ndescription: Use when setting up Zitadel for a new plan.ai-style deployment (a cloud console, a chat\u002Fagent and optionally a Harbor on their own domains, like webapp.agency) or re-running it — asks for the domains, org and login names, social-login credentials and shared keys, writes ansible\u002Fzitadel\u002Fdeployments\u002F\u003Cname>.yml, runs setup.yml (Zitadel orgs, login policy, IdPs, projects, clients, service users) and secrets.yml (the rest of the secrets, private\u002F\u003Cname>-{cloud,chat,harbor}.nix).\nversion: 1.0.0\nauthor: plan.ai\nlicense: MIT\nmetadata:\n  tags: [nixos, zitadel, ansible, secrets, bootstrap]\n  related_skills: [update-nixos]\nuser_invocable: true\n---\n\n# Zitadel bootstrap for a console + chat deployment\n\n`ansible\u002Fzitadel\u002F` does what was done by hand for webapp.agency: everything a\nconsole (plan-ai-cloud), a chat (plan-ai-chat) and a Harbor need from their\nZitadel, and the private NixOS files that carry the secrets. It is idempotent\nand its state, `private\u002F\u003Cdeployment>-zitadel.json`, is the source of truth:\ndelete a secret from it to rotate it. `deployments\u002Fwebapp.yml` is a worked\nexample; the VM test (`nix build .#checks.x86_64-linux.zitadel-ansible -L`)\nshows a full run.\n\nRun everything from the `nixos-infra` root. Never print the state file or the\nrendered files: they are secrets.\n\n## 1. Ask\n\nAsk the user, with the defaults in brackets (webapp.agency's values as the\nexample). Don't guess domains or names: they become clients, orgs and what\npeople see on the login page.\n\n| Variable | Question | Example |\n| --- | --- | --- |\n| `deployment` | Short name for files and the console's service user | `webapp` |\n| `zitadel_url` | Zitadel's URL (the instance must exist, first-run setup done) | `https:\u002F\u002Fid.webapp.agency` |\n| `zitadel_pat_command` | How to read an IAM_OWNER PAT (the first instance's bootstrap machine user writes one with `FirstInstance.PatPath`) | `ssh root@\u003Chost> cat \u002Fvar\u002Flib\u002Fzitadel\u002Fbootstrap.pat` |\n| `partner_org_name` | The org partners sign in through | `webapp-agency` |\n| `partner_login_name` | What the services call that sign-in | `the.webapp.agency Partner` |\n| `apps_project_name` | Project holding the services' clients | `webapp.agency apps` |\n| `console_domain` | The console's domain | `cms.webapp.agency` |\n| `agent_domain` | The chat's domain | `agent.webapp.agency` |\n| `harbor_domain` | Harbor's domain, or empty for none | `harbor.webapp.agency` |\n| `admin_emails` | Who administers console, chat and Harbor | `[maciej@plan.ai]` |\n| `internal_login_name`, `internal_allowed_domains` | Name and allowed email domains of the services' own Google sign-in (optional) | `the.webapp.agency Internal`, `[plan.ai, webapp.agency]` |\n| `legal_tos_link`, `legal_privacy_link` | URL of the AGB & Datenschutz the login makes users accept (privacy defaults to the tos link; pkgs\u002Fzitadel-login) | `https:\u002F\u002Fplan.ai\u002Flegal-de.md` |\n| `litellm_url`, `litellm_key_alias` | LiteLLM for the chat's agents, and the key's alias | `https:\u002F\u002Fcodex.plan.ai`, `webapp-chat` |\n| `harbor_ssh`, `harbor_database` | Where to insert the console's Harbor admin token (empty: skip) | `root@\u003Charbor host>`, `harbor` |\n\nThen the secrets, as environment variables (only on the first run; the state\nremembers them):\n\n- `GITHUB_CLIENT_ID`\u002F`_SECRET`, `GOOGLE_CLIENT_ID`\u002F`_SECRET`: the partner org's\n  social logins. Give the user the callback to register:\n  `\u003Czitadel_url>\u002Fui\u002Flogin\u002Flogin\u002Fexternalidp\u002Fcallback`.\n- `INTERNAL_GOOGLE_CLIENT_ID`\u002F`_SECRET`: the services' own Google client;\n  redirect URIs `https:\u002F\u002F\u003Cconsole_domain>\u002Fauth\u002Fgoogle\u002Fcallback` and\n  `https:\u002F\u002F\u003Charbor_domain>\u002Fauth\u002Fgoogle\u002Fcallback`.\n- `LITELLM_MASTER_KEY`, `REGISTRY_ADMIN_TOKEN`: shared with cloud.plan.ai,\n  in `private\u002Flogos-cloud.nix` (`inference.master_key`, `registry.admin_token`).\n- `CONTEXT7_API_KEY`, `FIRECRAWL_API_KEY`: the agents' MCP servers (plan.ai's\n  are in `private\u002Flogos-chat.nix`), optional.\n\nRead shared values from the private files into the environment yourself;\ndon't ask the user to paste what the repo already has.\n\n## 2. Run\n\n```bash\ncd ansible\u002Fzitadel\n$EDITOR deployments\u002F\u003Cdeployment>.yml              # from the answers\nGITHUB_CLIENT_ID=… GITHUB_CLIENT_SECRET=… GOOGLE_CLIENT_ID=… GOOGLE_CLIENT_SECRET=… \\\n  ansible-playbook setup.yml -e @deployments\u002F\u003Cdeployment>.yml\nLITELLM_MASTER_KEY=… REGISTRY_ADMIN_TOKEN=… INTERNAL_GOOGLE_CLIENT_ID=… … \\\n  ansible-playbook secrets.yml -e @deployments\u002F\u003Cdeployment>.yml\n```\n\n`setup.yml` writes the state after every step that produced a secret, so a\nfailed run loses nothing; run it again. A second run of either playbook\nreports `changed=0`.\n\n## 3. Wire up\n\n- The host's config imports `private\u002F\u003Cdeployment>-cloud.nix` and `-chat.nix`\n  (webapp\u002Fcloud.nix and webapp\u002Fchat.nix show how), Harbor's\n  `private\u002F\u003Cdeployment>-harbor.nix`.\n- Public ids the configs need: the chat's `connector.console.audience_project_id`\n  is `console_api.project_id` and the Harbor app's `mcp.audience_project_id`\n  is `harbor_api.project_id` (read with `jq` from the state; ids aren't secret).\n- Commit the private repo (state and rendered files), then nixos-infra's\n  `private` pointer; deploy.\n\n## Notes\n\n- An existing social login is left as it is; to change its secret, delete it\n  in Zitadel and run `setup.yml` again with the new credentials.\n- The bootstrap PAT is IAM_OWNER: once the deployment is up, remove the\n  bootstrap user's PAT in Zitadel and delete the PatPath file, and point\n  `zitadel_pat_command` at the console's own IAM_OWNER PAT in the state\n  (`jq -r .console_pat …\u002Fprivate\u002F\u003Cdeployment>-zitadel.json`), as\n  `deployments\u002Fwebapp.yml` does.\n","# Zitadel bootstrap for a console + chat deployment\n\n`ansible\u002Fzitadel\u002F` does what was done by hand for webapp.agency: everything a\nconsole (plan-ai-cloud), a chat (plan-ai-chat) and a Harbor need from their\nZitadel, and the private NixOS files that carry the secrets. It is idempotent\nand its state, `private\u002F\u003Cdeployment>-zitadel.json`, is the source of truth:\ndelete a secret from it to rotate it. `deployments\u002Fwebapp.yml` is a worked\nexample; the VM test (`nix build .#checks.x86_64-linux.zitadel-ansible -L`)\nshows a full run.\n\nRun everything from the `nixos-infra` root. Never print the state file or the\nrendered files: they are secrets.\n\n## 1. Ask\n\nAsk the user, with the defaults in brackets (webapp.agency's values as the\nexample). Don't guess domains or names: they become clients, orgs and what\npeople see on the login page.\n\n| Variable | Question | Example |\n| --- | --- | --- |\n| `deployment` | Short name for files and the console's service user | `webapp` |\n| `zitadel_url` | Zitadel's URL (the instance must exist, first-run setup done) | `https:\u002F\u002Fid.webapp.agency` |\n| `zitadel_pat_command` | How to read an IAM_OWNER PAT (the first instance's bootstrap machine user writes one with `FirstInstance.PatPath`) | `ssh root@\u003Chost> cat \u002Fvar\u002Flib\u002Fzitadel\u002Fbootstrap.pat` |\n| `partner_org_name` | The org partners sign in through | `webapp-agency` |\n| `partner_login_name` | What the services call that sign-in | `the.webapp.agency Partner` |\n| `apps_project_name` | Project holding the services' clients | `webapp.agency apps` |\n| `console_domain` | The console's domain | `cms.webapp.agency` |\n| `agent_domain` | The chat's domain | `agent.webapp.agency` |\n| `harbor_domain` | Harbor's domain, or empty for none | `harbor.webapp.agency` |\n| `admin_emails` | Who administers console, chat and Harbor | `[maciej@plan.ai]` |\n| `internal_login_name`, `internal_allowed_domains` | Name and allowed email domains of the services' own Google sign-in (optional) | `the.webapp.agency Internal`, `[plan.ai, webapp.agency]` |\n| `legal_tos_link`, `legal_privacy_link` | URL of the AGB & Datenschutz the login makes users accept (privacy defaults to the tos link; pkgs\u002Fzitadel-login) | `https:\u002F\u002Fplan.ai\u002Flegal-de.md` |\n| `litellm_url`, `litellm_key_alias` | LiteLLM for the chat's agents, and the key's alias | `https:\u002F\u002Fcodex.plan.ai`, `webapp-chat` |\n| `harbor_ssh`, `harbor_database` | Where to insert the console's Harbor admin token (empty: skip) | `root@\u003Charbor host>`, `harbor` |\n\nThen the secrets, as environment variables (only on the first run; the state\nremembers them):\n\n- `GITHUB_CLIENT_ID`\u002F`_SECRET`, `GOOGLE_CLIENT_ID`\u002F`_SECRET`: the partner org's\n  social logins. Give the user the callback to register:\n  `\u003Czitadel_url>\u002Fui\u002Flogin\u002Flogin\u002Fexternalidp\u002Fcallback`.\n- `INTERNAL_GOOGLE_CLIENT_ID`\u002F`_SECRET`: the services' own Google client;\n  redirect URIs `https:\u002F\u002F\u003Cconsole_domain>\u002Fauth\u002Fgoogle\u002Fcallback` and\n  `https:\u002F\u002F\u003Charbor_domain>\u002Fauth\u002Fgoogle\u002Fcallback`.\n- `LITELLM_MASTER_KEY`, `REGISTRY_ADMIN_TOKEN`: shared with cloud.plan.ai,\n  in `private\u002Flogos-cloud.nix` (`inference.master_key`, `registry.admin_token`).\n- `CONTEXT7_API_KEY`, `FIRECRAWL_API_KEY`: the agents' MCP servers (plan.ai's\n  are in `private\u002Flogos-chat.nix`), optional.\n\nRead shared values from the private files into the environment yourself;\ndon't ask the user to paste what the repo already has.\n\n## 2. Run\n\n```bash\ncd ansible\u002Fzitadel\n$EDITOR deployments\u002F\u003Cdeployment>.yml              # from the answers\nGITHUB_CLIENT_ID=… GITHUB_CLIENT_SECRET=… GOOGLE_CLIENT_ID=… GOOGLE_CLIENT_SECRET=… \\\n  ansible-playbook setup.yml -e @deployments\u002F\u003Cdeployment>.yml\nLITELLM_MASTER_KEY=… REGISTRY_ADMIN_TOKEN=… INTERNAL_GOOGLE_CLIENT_ID=… … \\\n  ansible-playbook secrets.yml -e @deployments\u002F\u003Cdeployment>.yml\n```\n\n`setup.yml` writes the state after every step that produced a secret, so a\nfailed run loses nothing; run it again. A second run of either playbook\nreports `changed=0`.\n\n## 3. Wire up\n\n- The host's config imports `private\u002F\u003Cdeployment>-cloud.nix` and `-chat.nix`\n  (webapp\u002Fcloud.nix and webapp\u002Fchat.nix show how), Harbor's\n  `private\u002F\u003Cdeployment>-harbor.nix`.\n- Public ids the configs need: the chat's `connector.console.audience_project_id`\n  is `console_api.project_id` and the Harbor app's `mcp.audience_project_id`\n  is `harbor_api.project_id` (read with `jq` from the state; ids aren't secret).\n- Commit the private repo (state and rendered files), then nixos-infra's\n  `private` pointer; deploy.\n\n## Notes\n\n- An existing social login is left as it is; to change its secret, delete it\n  in Zitadel and run `setup.yml` again with the new credentials.\n- The bootstrap PAT is IAM_OWNER: once the deployment is up, remove the\n  bootstrap user's PAT in Zitadel and delete the PatPath file, and point\n  `zitadel_pat_command` at the console's own IAM_OWNER PAT in the state\n  (`jq -r .console_pat …\u002Fprivate\u002F\u003Cdeployment>-zitadel.json`), as\n  `deployments\u002Fwebapp.yml` does.\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"description":7,"user_invocable":35},"plan.ai","1.0.0",{"tags":27,"related_skills":33},[28,29,30,31,32],"nixos","zitadel","ansible","secrets","bootstrap",[34],"update-nixos",true,"trunk","bdf931f9978b5b9c0badc0628e0ec12674fd517a",".agents\u002Fskills\u002Fzitadel-bootstrap",0,"https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra","https:\u002F\u002Fgithub.com\u002Fplanailabs","https:\u002F\u002Fplan.ai","2026-11-13 18:32:11",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":35},[46,49,52],{"tool":47,"command":48},"npx","npx skills add planailabs\u002Fnixos-infra --skill zitadel-bootstrap",{"tool":50,"command":51},"bunx","bunx skills add planailabs\u002Fnixos-infra --skill zitadel-bootstrap",{"tool":53,"command":54},"pnpm","pnpm dlx skills add planailabs\u002Fnixos-infra --skill zitadel-bootstrap","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra\u002Fblob\u002Ftrunk\u002F.agents\u002Fskills\u002Fzitadel-bootstrap\u002FSKILL.md",[],[58,65,71,76],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M784SR5XNTH2VERG3XDJENK2","fix-codex-litellm","Use when the codex.plan.ai litellm plugin (Codex OAuth custom provider) is throwing errors — HTTP 400\u002F4xx\u002F5xx from the Codex \u002Fresponses endpoint, request\u002Fresponse translation failures, model-name or auth errors — to diagnose, fix the provider fork, and redeploy codex.plan.ai.","https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra\u002Fblob\u002Ftrunk\u002F.hermes\u002Fskills\u002Ffix-codex-litellm\u002FSKILL.md",[],[],{"skillNo":66,"name":34,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M784SJ9C733C0G2GFXR5EJ5C","Use when updating NixOS flake inputs and deploying nixos-infra to all plan.ai servers, including fixing build errors and pushing resulting commits.","https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra\u002Fblob\u002Ftrunk\u002F.claude\u002Fskills\u002Fupdate-nixos\u002FSKILL.md",[],[],{"skillNo":72,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M784SDEW9G4REFT90HT4EDM2","https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra\u002Fblob\u002Ftrunk\u002F.claude\u002Fskills\u002Ffix-codex-litellm\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M784S448ZG86SRRW2RQJH65N","codex-healthcheck","Use when checking whether the codex.plan.ai litellm proxy works (scheduled health check) or when it is reported broken — probe \u002Fv1\u002Fmodels + a tiny chat completion, classify the failure against the known layers, then fix it (container\u002Fconfig, fork+repin+deploy, auth) and verify.","https:\u002F\u002Fgithub.com\u002Fplanailabs\u002Fnixos-infra\u002Fblob\u002Ftrunk\u002F.agents\u002Fskills\u002Fcodex-healthcheck\u002FSKILL.md",[],[]]