[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71E3EY36Z7K3CZX8MWQV1NT":3,"skill-same:01M71E3EY36Z7K3CZX8MWQV1NT":73},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M71E3EY36Z7K3CZX8MWQV1NT","update-hq",null,"Upgrade HQ from the latest hq-core release.","indigoai-us\u002Fhq-core","indigoai-us","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F122242446?v=4","01M71DTQ5NGD10GT1Z7E6XKWC5","HQ","01M71DTQ6BKSYYBNC9RAKT3YDK",95,"MIT","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fupdate-hq\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"update","update hq","hook","gate","install","latest","settings","release","read","scripts","check","Bash","upgrade","restore","hooks","lf","remove","core","normalize","2026-11-10 10:12:30",false,"---\nname: update-hq\ndescription: Upgrade HQ from the latest hq-core release.\nallowed-tools: Read, Bash, Bash(bash core\u002Fscripts\u002Fcheck-hq-hooks.sh:*), Bash(bash core\u002Fscripts\u002Frestore-hook-settings.sh:*), Bash(bash core\u002Fscripts\u002Fremove-stray-gate-hooks.sh:*), Bash(bash core\u002Fscripts\u002Fremove-retired-core-hooks.sh:*), Bash(bash core\u002Fscripts\u002Fupdate-hq-install-offer.sh:*), Bash(bash core\u002Fscripts\u002Fnormalize-eol-lf.sh:*), AskUserQuestion\n---\n\n# \u002Fupdate-hq — HQ Upgrade\n\nUpgrade your HQ installation from the latest `indigoai-us\u002Fhq-core` release by delegating to **`hq rescue`**, the canonical drift-preserving updater. `hq rescue` re-syncs your HQ core to the target release using a three-way merge that preserves your local edits, takes a pre-op safety snapshot, and reports what changed.\n\n**User's input:** $ARGUMENTS\n\n## Why `hq rescue`\n\n`\u002Fupdate-hq` used to hand-roll the upgrade: fetch `MIGRATION.md`, parse migration sections, then three-way-merge each file one at a time over `gh api`. `hq rescue` does all of that natively and more reliably — it classifies every core path (clean \u002F drifted \u002F locally-added), three-way merges drift against the release, force-takes infrastructure files that must not carry conflict markers, snapshots to `~\u002F.hq\u002Fbackups` first, and prints a single summary. This skill now just maps your arguments onto `hq rescue` flags, previews the plan, and surfaces the result.\n\n## Argument parsing\n\nMap `$ARGUMENTS` onto `hq rescue` flags:\n\n| User input | `hq rescue` flag | Meaning |\n|---|---|---|\n| `--check` \u002F `--dry-run` | `--check` | Plan only — classify and report, change nothing on disk |\n| `v{X.Y.Z}` (bare version) | `--ref v{X.Y.Z}` | Upgrade to a specific release instead of latest |\n| `--ref \u003Cref>` | `--ref \u003Cref>` | Target tag\u002Fbranch (default: latest hq-core release) |\n| `--staging` | `--staging` | Use the staging release channel |\n| `--source \u003Crepo>` | `--source \u003Crepo>` | Override the source repo |\n| `--paths \u003Clist>` | `--paths \u003Clist>` | Narrow the rescue to comma-separated top-level paths |\n| `--floor-sha \u003Csha>` | `--floor-sha \u003Csha>` | Pin the three-way history floor to a 40-char commit SHA |\n| `--no-backup` | `--no-backup` | Skip the pre-op snapshot (default: keep it) |\n| `-y` \u002F `--yes` | `-y` | Skip the confirmation prompt |\n| `--hq-root \u003Cpath>` | `--hq-root \u003Cpath>` | Operate on a specific HQ root (defaults to auto-detected) |\n\nThe legacy `--from v{X.Y.Z}` flag is gone — `hq rescue` detects the three-way history floor automatically. Pin it manually with `--floor-sha` only if the user explicitly asks.\n\n## Phase 1: Preflight\n\nVerify the `hq` CLI is available:\n```bash\ncommand -v hq\n```\nIf it is missing, hard stop and tell the user to install the HQ CLI (e.g. `npm i -g @indigoai-us\u002Fhq-cli`, or per their install method) before re-running `\u002Fupdate-hq`.\n\n## Phase 2: Plan (always dry-run first)\n\nAlways preview before applying. Run rescue in check mode with the user's mapped flags:\n```bash\nhq rescue --check {mapped-flags}\n```\nSurface the plan in plain terms: the target release, how many paths are clean vs. carry local drift vs. are locally added, and anything rescue flags for manual review.\n\nIf the user passed `--check` \u002F `--dry-run`, **stop here** — report the plan and write nothing.\n\nBefore an applying run, check the incoming release's `core\u002Fcore.yaml` from the\nexact source repository and ref shown by the plan. The default source is\n`indigoai-us\u002Fhq-core`; `--staging` selects `indigoai-us\u002Fhq-core-staging`, and\n`--source` or `--ref` overrides those defaults. Read only the metadata file:\n\n```bash\ngh api -H 'Accept: application\u002Fvnd.github.raw+json' \\\n  \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fcontents\u002Fcore\u002Fcore.yaml?ref=\u003Ctarget-ref>\"\n```\n\nIf the metadata file cannot be read from the planned source and ref, stop and\nreport that failure; do not apply the release.\n\nIf the file declares `requiresHqCli`, compare the installed CLI with that floor\nusing `core\u002Fscripts\u002Flib\u002Fhq-cli-floor.sh`. If the floor is malformed, stop and\nreport its value. The reader accepts an HQ root, so place the fetched file under\na temporary `core\u002Fcore.yaml` and call `hq_cli_floor_required` on that root. If\nthe CLI is older, include the required CLI upgrade in the plan. Do not install\nit before the user confirms the applying run.\n\n## Phase 3: Confirm and apply\n\nIf this is not a dry run, confirm with `AskUserQuestion` (skip the prompt only if the user already passed `-y` \u002F `--yes`):\n\n1. Apply this upgrade (recommended)\n2. Cancel\n\nIf the incoming release requires a newer CLI, run the upgrade after this\nconfirmation and before rescue:\n\n```bash\nnpm install -g @indigoai-us\u002Fhq-cli@latest\n```\n\nThen check the installed version again with `hq_cli_floor_check`. If the\ninstall fails or the CLI still misses the floor, stop without applying the\nscaffold release and show the upgrade command. Do not run rescue until the floor\ncheck passes.\n\nOnly after that check passes, run rescue with `-y` so it does not prompt again:\n```bash\nhq rescue -y {mapped-flags}\n```\n\nKeep the pre-op backup: do **not** pass `--no-backup` unless the user explicitly asked for it. `hq rescue` writes a snapshot under `~\u002F.hq\u002Fbackups` before touching anything, which is the recovery path if a merge goes wrong.\n\n## Phase 4: Verify project hooks, repair if needed, and report\n\n`hq rescue` preserves user drift and replaces release-owned paths. Its settings\nreconcile can empty `.claude\u002Fsettings.json` hook arrays and copy `master-hook.sh`\ninto `.claude\u002Fsettings.local.json`. Restore shipped hook wiring before checking\nhealth — a second rescue repeats the same relocate:\n\n```bash\nbash core\u002Fscripts\u002Frestore-hook-settings.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-stray-gate-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-retired-core-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fcheck-hq-hooks.sh --root {hq-root}\n```\n\nAfter `hq rescue` restores the shipped hook settings, run the cleanup before the\nhealth check. This order applies to stable updates and `--staging` replacements.\nThe cleanup removes local hook commands that point to registry scripts. It keeps\nthe local `env` and `permissions` sections and unrelated hooks.\n\n`hq rescue` keeps files that the new release no longer ships. The retired-hook\ncleanup deletes core hook files a release retired, such as the old Stop leaf\n`70-work-mesh-done.sh`, when they still match a released copy. It keeps a file\nwith local edits and names it in its output; master-hook does not run that\nStop leaf either way. It also keeps a file whose folder is a symlink out of\n`core\u002Fhooks`. Show the user every `kept` or `could not remove` line it prints,\nwith the file path, so they can delete or keep that file themselves. A failed\nremoval makes it exit 1; report that line and continue with the health check.\n\nIf settings.json is missing or still invalid, repair the released `.claude` tree,\nrestore hooks again, and re-check. Keep any other mapped release flags such as\n`--ref` \u002F `--staging`; omit a user-provided `--paths` restriction because this\nrepair must include `.claude`:\n\n```bash\nhq rescue -y --paths .claude {mapped release flags}\nbash core\u002Fscripts\u002Frestore-hook-settings.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-stray-gate-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-retired-core-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fcheck-hq-hooks.sh --root {hq-root}\n```\n\nIf the second check fails, stop and report its exact diagnostics; do not claim\nthe update completed successfully. See `core\u002Fdocs\u002Fhq\u002FHOOKS-NOT-FIRING.md` for\nthe Desktop\u002FSDK cwd and `settingSources` recovery instructions.\n\nAfter a real terminal CLI session, the user can additionally prove the\npolicy-trigger hook actually ran:\n\n```bash\nbash core\u002Fscripts\u002Fcheck-hq-hooks.sh --root {hq-root} --require-ledger\n```\n\nThe affected Claude Code app\u002FSDK runtime does not dispatch command-hook events,\neven with valid project settings. `settingSources: [\"project\"]` can load native\nproject context but cannot make that runtime enforce shell hooks. The durable\n`.claude\u002Fpersonal-context.md` import remains available there; use host-side\nenforcement or terminal Claude Code for work that requires a mechanical block.\n\nThen relay rescue's summary in plain language: what was updated, what kept\nlocal edits, hook-health status, and anything that needs manual follow-up.\nRefresh the search index so new\u002Frenamed content is findable:\n\n```bash\nqmd update 2>\u002Fdev\u002Fnull || true\n```\n\nAfter the hook health check passes, check whether the one-time global HQ\nruntime offer is available:\n\n```bash\nbash core\u002Fscripts\u002Fupdate-hq-install-offer.sh --check\n```\n\nThe helper prints `offer`, `answered`, `installed`, or `off`. It uses the\ninstalled hq CLI's existing `hq-anywhere-runtime` flag reader and the active\nsession's bound company. Missing or outdated CLI support, an unresolved\ncompany UID, an unavailable flag service, or a flag value other than true all\ncount as `off`. The current reader does not evaluate person-only overrides\nwhen no company is bound.\n\nIf the result is `offer` and this session can ask the user interactively, use\none `AskUserQuestion` with the question “Install the HQ runtime globally now?”\nand these choices:\n\n1. Install the HQ runtime globally now\n2. No thanks\n\nRecord the answer before taking any follow-up action:\n\n```bash\nbash core\u002Fscripts\u002Fupdate-hq-install-offer.sh --accept\n# or\nbash core\u002Fscripts\u002Fupdate-hq-install-offer.sh --decline\n```\n\nRun `hq install --global` only when `--accept` prints `accepted`. A decline is\nrecorded and the offer does not repeat. If the helper reports `answered` or\n`installed`, take no action. If the session is headless, non-interactive, or\ncannot use `AskUserQuestion`, run `--decline`; do not install. The answer is\nstored at `~\u002F.hq\u002Fanywhere\u002Fupdate-hq-install-offer.json`, next to the global\ninstall records, so it survives HQ core updates. If installation fails after\nacceptance, report the failure and give the user `hq install --global` as a\nmanual retry command; do not ask again.\n\nSetup steps for users live in one page:\n`core\u002Fknowledge\u002Fpublic\u002Fhq-core\u002Fhq-anywhere-runtime.md`. Point users there\ninstead of restating them.\n\n## Phase 5: Normalize line endings (post-rescue)\n\nAfter a successful apply (skip on `--check` \u002F dry-run), rewrite the worktree so tracked text is LF on disk. Existing Windows installs that already materialized CRLF do not pick up `eol=lf` from `.gitattributes` on pull alone — `git status` stays clean while on-disk bytes stay CRLF.\n\nIf `core\u002Fscripts\u002Fnormalize-eol-lf.sh` exists under the HQ root (or the path passed via `--hq-root`), run it:\n\n```bash\nbash core\u002Fscripts\u002Fnormalize-eol-lf.sh {hq-root}\n```\n\n- **Exit 0** — report \"line endings normalized (or already LF)\".\n- **Exit 2** (dirty tree) — do not fail the upgrade; tell the user the upgrade applied but EOL rewrite was skipped because the tree is dirty, and they can re-run the script after commit\u002Fstash.\n- **Missing script** — skip silently (older releases).\n- Safe on macOS\u002FLinux (no-op when already LF).\n\n## Rules\n\n- **Delegate to `hq rescue`** — never hand-roll the migration. No `gh api` fetch\u002Fparse\u002Fmerge loop, no `MIGRATION.md` parsing. `hq rescue` is the single source of truth for upgrades.\n- **Always dry-run first** — run `hq rescue --check` and show the plan before applying, unless the user passed `-y` \u002F `--yes`.\n- **Preserve drift** — `hq rescue` three-way merges local edits by default. Never pass `--no-backup` and never force an overwrite unless the user explicitly asks.\n- **`hq` CLI required** — hard stop if `hq` is not installed.\n- **Staging is opt-in** — only pass `--staging` when the user asks for the staging release; default is the latest stable hq-core release.\n- **Idempotent** — rescue compares against the release; re-running when already current is a safe no-op.\n- **Keep the backup** — the snapshot under `~\u002F.hq\u002Fbackups` is the only easy revert path; don't skip it on the user's behalf.\n\n## See also\n\n- `\u002Fsync-registry` — refresh skill\u002Fworker indexes\n- `\u002Fpromote` — publish your local changes\n","# \u002Fupdate-hq — HQ Upgrade\n\nUpgrade your HQ installation from the latest `indigoai-us\u002Fhq-core` release by delegating to **`hq rescue`**, the canonical drift-preserving updater. `hq rescue` re-syncs your HQ core to the target release using a three-way merge that preserves your local edits, takes a pre-op safety snapshot, and reports what changed.\n\n**User's input:** $ARGUMENTS\n\n## Why `hq rescue`\n\n`\u002Fupdate-hq` used to hand-roll the upgrade: fetch `MIGRATION.md`, parse migration sections, then three-way-merge each file one at a time over `gh api`. `hq rescue` does all of that natively and more reliably — it classifies every core path (clean \u002F drifted \u002F locally-added), three-way merges drift against the release, force-takes infrastructure files that must not carry conflict markers, snapshots to `~\u002F.hq\u002Fbackups` first, and prints a single summary. This skill now just maps your arguments onto `hq rescue` flags, previews the plan, and surfaces the result.\n\n## Argument parsing\n\nMap `$ARGUMENTS` onto `hq rescue` flags:\n\n| User input | `hq rescue` flag | Meaning |\n|---|---|---|\n| `--check` \u002F `--dry-run` | `--check` | Plan only — classify and report, change nothing on disk |\n| `v{X.Y.Z}` (bare version) | `--ref v{X.Y.Z}` | Upgrade to a specific release instead of latest |\n| `--ref \u003Cref>` | `--ref \u003Cref>` | Target tag\u002Fbranch (default: latest hq-core release) |\n| `--staging` | `--staging` | Use the staging release channel |\n| `--source \u003Crepo>` | `--source \u003Crepo>` | Override the source repo |\n| `--paths \u003Clist>` | `--paths \u003Clist>` | Narrow the rescue to comma-separated top-level paths |\n| `--floor-sha \u003Csha>` | `--floor-sha \u003Csha>` | Pin the three-way history floor to a 40-char commit SHA |\n| `--no-backup` | `--no-backup` | Skip the pre-op snapshot (default: keep it) |\n| `-y` \u002F `--yes` | `-y` | Skip the confirmation prompt |\n| `--hq-root \u003Cpath>` | `--hq-root \u003Cpath>` | Operate on a specific HQ root (defaults to auto-detected) |\n\nThe legacy `--from v{X.Y.Z}` flag is gone — `hq rescue` detects the three-way history floor automatically. Pin it manually with `--floor-sha` only if the user explicitly asks.\n\n## Phase 1: Preflight\n\nVerify the `hq` CLI is available:\n```bash\ncommand -v hq\n```\nIf it is missing, hard stop and tell the user to install the HQ CLI (e.g. `npm i -g @indigoai-us\u002Fhq-cli`, or per their install method) before re-running `\u002Fupdate-hq`.\n\n## Phase 2: Plan (always dry-run first)\n\nAlways preview before applying. Run rescue in check mode with the user's mapped flags:\n```bash\nhq rescue --check {mapped-flags}\n```\nSurface the plan in plain terms: the target release, how many paths are clean vs. carry local drift vs. are locally added, and anything rescue flags for manual review.\n\nIf the user passed `--check` \u002F `--dry-run`, **stop here** — report the plan and write nothing.\n\nBefore an applying run, check the incoming release's `core\u002Fcore.yaml` from the\nexact source repository and ref shown by the plan. The default source is\n`indigoai-us\u002Fhq-core`; `--staging` selects `indigoai-us\u002Fhq-core-staging`, and\n`--source` or `--ref` overrides those defaults. Read only the metadata file:\n\n```bash\ngh api -H 'Accept: application\u002Fvnd.github.raw+json' \\\n  \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fcontents\u002Fcore\u002Fcore.yaml?ref=\u003Ctarget-ref>\"\n```\n\nIf the metadata file cannot be read from the planned source and ref, stop and\nreport that failure; do not apply the release.\n\nIf the file declares `requiresHqCli`, compare the installed CLI with that floor\nusing `core\u002Fscripts\u002Flib\u002Fhq-cli-floor.sh`. If the floor is malformed, stop and\nreport its value. The reader accepts an HQ root, so place the fetched file under\na temporary `core\u002Fcore.yaml` and call `hq_cli_floor_required` on that root. If\nthe CLI is older, include the required CLI upgrade in the plan. Do not install\nit before the user confirms the applying run.\n\n## Phase 3: Confirm and apply\n\nIf this is not a dry run, confirm with `AskUserQuestion` (skip the prompt only if the user already passed `-y` \u002F `--yes`):\n\n1. Apply this upgrade (recommended)\n2. Cancel\n\nIf the incoming release requires a newer CLI, run the upgrade after this\nconfirmation and before rescue:\n\n```bash\nnpm install -g @indigoai-us\u002Fhq-cli@latest\n```\n\nThen check the installed version again with `hq_cli_floor_check`. If the\ninstall fails or the CLI still misses the floor, stop without applying the\nscaffold release and show the upgrade command. Do not run rescue until the floor\ncheck passes.\n\nOnly after that check passes, run rescue with `-y` so it does not prompt again:\n```bash\nhq rescue -y {mapped-flags}\n```\n\nKeep the pre-op backup: do **not** pass `--no-backup` unless the user explicitly asked for it. `hq rescue` writes a snapshot under `~\u002F.hq\u002Fbackups` before touching anything, which is the recovery path if a merge goes wrong.\n\n## Phase 4: Verify project hooks, repair if needed, and report\n\n`hq rescue` preserves user drift and replaces release-owned paths. Its settings\nreconcile can empty `.claude\u002Fsettings.json` hook arrays and copy `master-hook.sh`\ninto `.claude\u002Fsettings.local.json`. Restore shipped hook wiring before checking\nhealth — a second rescue repeats the same relocate:\n\n```bash\nbash core\u002Fscripts\u002Frestore-hook-settings.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-stray-gate-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-retired-core-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fcheck-hq-hooks.sh --root {hq-root}\n```\n\nAfter `hq rescue` restores the shipped hook settings, run the cleanup before the\nhealth check. This order applies to stable updates and `--staging` replacements.\nThe cleanup removes local hook commands that point to registry scripts. It keeps\nthe local `env` and `permissions` sections and unrelated hooks.\n\n`hq rescue` keeps files that the new release no longer ships. The retired-hook\ncleanup deletes core hook files a release retired, such as the old Stop leaf\n`70-work-mesh-done.sh`, when they still match a released copy. It keeps a file\nwith local edits and names it in its output; master-hook does not run that\nStop leaf either way. It also keeps a file whose folder is a symlink out of\n`core\u002Fhooks`. Show the user every `kept` or `could not remove` line it prints,\nwith the file path, so they can delete or keep that file themselves. A failed\nremoval makes it exit 1; report that line and continue with the health check.\n\nIf settings.json is missing or still invalid, repair the released `.claude` tree,\nrestore hooks again, and re-check. Keep any other mapped release flags such as\n`--ref` \u002F `--staging`; omit a user-provided `--paths` restriction because this\nrepair must include `.claude`:\n\n```bash\nhq rescue -y --paths .claude {mapped release flags}\nbash core\u002Fscripts\u002Frestore-hook-settings.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-stray-gate-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fremove-retired-core-hooks.sh {hq-root}\nbash core\u002Fscripts\u002Fcheck-hq-hooks.sh --root {hq-root}\n```\n\nIf the second check fails, stop and report its exact diagnostics; do not claim\nthe update completed successfully. See `core\u002Fdocs\u002Fhq\u002FHOOKS-NOT-FIRING.md` for\nthe Desktop\u002FSDK cwd and `settingSources` recovery instructions.\n\nAfter a real terminal CLI session, the user can additionally prove the\npolicy-trigger hook actually ran:\n\n```bash\nbash core\u002Fscripts\u002Fcheck-hq-hooks.sh --root {hq-root} --require-ledger\n```\n\nThe affected Claude Code app\u002FSDK runtime does not dispatch command-hook events,\neven with valid project settings. `settingSources: [\"project\"]` can load native\nproject context but cannot make that runtime enforce shell hooks. The durable\n`.claude\u002Fpersonal-context.md` import remains available there; use host-side\nenforcement or terminal Claude Code for work that requires a mechanical block.\n\nThen relay rescue's summary in plain language: what was updated, what kept\nlocal edits, hook-health status, and anything that needs manual follow-up.\nRefresh the search index so new\u002Frenamed content is findable:\n\n```bash\nqmd update 2>\u002Fdev\u002Fnull || true\n```\n\nAfter the hook health check passes, check whether the one-time global HQ\nruntime offer is available:\n\n```bash\nbash core\u002Fscripts\u002Fupdate-hq-install-offer.sh --check\n```\n\nThe helper prints `offer`, `answered`, `installed`, or `off`. It uses the\ninstalled hq CLI's existing `hq-anywhere-runtime` flag reader and the active\nsession's bound company. Missing or outdated CLI support, an unresolved\ncompany UID, an unavailable flag service, or a flag value other than true all\ncount as `off`. The current reader does not evaluate person-only overrides\nwhen no company is bound.\n\nIf the result is `offer` and this session can ask the user interactively, use\none `AskUserQuestion` with the question “Install the HQ runtime globally now?”\nand these choices:\n\n1. Install the HQ runtime globally now\n2. No thanks\n\nRecord the answer before taking any follow-up action:\n\n```bash\nbash core\u002Fscripts\u002Fupdate-hq-install-offer.sh --accept\n# or\nbash core\u002Fscripts\u002Fupdate-hq-install-offer.sh --decline\n```\n\nRun `hq install --global` only when `--accept` prints `accepted`. A decline is\nrecorded and the offer does not repeat. If the helper reports `answered` or\n`installed`, take no action. If the session is headless, non-interactive, or\ncannot use `AskUserQuestion`, run `--decline`; do not install. The answer is\nstored at `~\u002F.hq\u002Fanywhere\u002Fupdate-hq-install-offer.json`, next to the global\ninstall records, so it survives HQ core updates. If installation fails after\nacceptance, report the failure and give the user `hq install --global` as a\nmanual retry command; do not ask again.\n\nSetup steps for users live in one page:\n`core\u002Fknowledge\u002Fpublic\u002Fhq-core\u002Fhq-anywhere-runtime.md`. Point users there\ninstead of restating them.\n\n## Phase 5: Normalize line endings (post-rescue)\n\nAfter a successful apply (skip on `--check` \u002F dry-run), rewrite the worktree so tracked text is LF on disk. Existing Windows installs that already materialized CRLF do not pick up `eol=lf` from `.gitattributes` on pull alone — `git status` stays clean while on-disk bytes stay CRLF.\n\nIf `core\u002Fscripts\u002Fnormalize-eol-lf.sh` exists under the HQ root (or the path passed via `--hq-root`), run it:\n\n```bash\nbash core\u002Fscripts\u002Fnormalize-eol-lf.sh {hq-root}\n```\n\n- **Exit 0** — report \"line endings normalized (or already LF)\".\n- **Exit 2** (dirty tree) — do not fail the upgrade; tell the user the upgrade applied but EOL rewrite was skipped because the tree is dirty, and they can re-run the script after commit\u002Fstash.\n- **Missing script** — skip silently (older releases).\n- Safe on macOS\u002FLinux (no-op when already LF).\n\n## Rules\n\n- **Delegate to `hq rescue`** — never hand-roll the migration. No `gh api` fetch\u002Fparse\u002Fmerge loop, no `MIGRATION.md` parsing. `hq rescue` is the single source of truth for upgrades.\n- **Always dry-run first** — run `hq rescue --check` and show the plan before applying, unless the user passed `-y` \u002F `--yes`.\n- **Preserve drift** — `hq rescue` three-way merges local edits by default. Never pass `--no-backup` and never force an overwrite unless the user explicitly asks.\n- **`hq` CLI required** — hard stop if `hq` is not installed.\n- **Staging is opt-in** — only pass `--staging` when the user asks for the staging release; default is the latest stable hq-core release.\n- **Idempotent** — rescue compares against the release; re-running when already current is a safe no-op.\n- **Keep the backup** — the snapshot under `~\u002F.hq\u002Fbackups` is the only easy revert path; don't skip it on the user's behalf.\n\n## See also\n\n- `\u002Fsync-registry` — refresh skill\u002Fworker indexes\n- `\u002Fpromote` — publish your local changes\n",{"name":5,"description":7,"allowed-tools":43},"Read, Bash, Bash(bash core\u002Fscripts\u002Fcheck-hq-hooks.sh:*), Bash(bash core\u002Fscripts\u002Frestore-hook-settings.sh:*), Bash(bash core\u002Fscripts\u002Fremove-stray-gate-hooks.sh:*), Bash(bash core\u002Fscripts\u002Fremove-retired-core-hooks.sh:*), Bash(bash core\u002Fscripts\u002Fupdate-hq-install-offer.sh:*), Bash(bash core\u002Fscripts\u002Fnormalize-eol-lf.sh:*), AskUserQuestion","main","205cf61728a27ef15e9153aa38df5856fc8d82f5",".claude\u002Fskills\u002Fupdate-hq",18,"https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core","https:\u002F\u002Fgithub.com\u002Findigoai-us","https:\u002F\u002Fhqforwork.com\u002F","The AI Context Layer for Teams","2026-11-12 06:53:38",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add indigoai-us\u002Fhq-core --skill update-hq",{"tool":59,"command":60},"bunx","bunx skills add indigoai-us\u002Fhq-core --skill update-hq",{"tool":62,"command":63},"pnpm","pnpm dlx skills add indigoai-us\u002Fhq-core --skill update-hq","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fupdate-hq\u002FSKILL.md",true,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"agents\u002Fopenai.yaml","REFERENCE","参考文档",117,"https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fupdate-hq\u002Fagents\u002Fopenai.yaml",[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M73NTNKZ3T2KJNDP2ZF23645","job","Deprecated alias for \u002Fschedule — Outpost recurring agent jobs. Prefer \u002Fschedule.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fjob\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":81},"01M73NTE0H9DQTT6DNHDKRWTXW","import-claude","Deprecated alias for \u002Fimport-context — bootstrap HQ from your prior AI footprint (Claude Code, Codex, Grok, claude.ai history plus on-disk artifacts).","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimport-claude\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":81},"01M73NT67433KKX96CCJWDQQ0X","hq-whoami","Show current HQ Cognito identity and session expiry.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhq-whoami\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":81},"01M73NT17SVXZV2QPT14C2RPJP","hq-share","Share HQ vault paths through single-use links or direct ACL grants.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhq-share\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":81},"01M73NSXYFMD7EHGT8TFDZA3C8","hq-secrets","Use HQ CLI secrets safely through env injection or one-off exec.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhq-secrets\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":81},"01M73NSWCXJK29Q8CNG8AS3ZZQ","hq-logout","Sign out of HQ Cognito and clear local tokens.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhq-logout\u002FSKILL.md",[],[]]