core/packages/hq-pack-cowork/skills/hq-cowork-sync/SKILL.md
Run a full HQ sync (all cloud-backed companies, bidirectional) from a sandboxed Claude Code plugin host (Cowork) by calling the host-side `hq_sync` MCP tool. Same engine as AppBar HQ Sync and the `/hq-sync` skill, but routed through the hq-pack-cowork MCP server so it works even when the `hq` binary and `~/.hq` auth are not reachable from the agent's bash sandbox.
npx skillsauth add indigoai-us/hq-core hq-cowork-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Runs the same sync engine the AppBar HQ Sync menubar app uses, but from inside a sandboxed Claude Code plugin host (Cowork, in particular). Walks every cloud-backed company in your local HQ, syncs in both directions against the vault, and writes conflict mirror files when divergence is detected.
Args: $ARGUMENTS — optional flags. Accepted shapes (parse free-text):
--company <slug> → scope to one company--personal → sync only the caller's personal vault--on-conflict overwrite|keep|abort → conflict strategy (default keep)--message "<msg>" → optional journal message attached to push legWithout args, syncs every membership + personal vault with --on-conflict keep.
/hq-sync~/.hq/cognito-tokens.json and hq isn't on PATH inside it, so the regular
/hq-sync skill (which spawns npx ... hq-sync-runner) cannot run.In a regular Claude Code session running on the host directly, prefer the
unprefixed /hq-sync skill — same engine, fewer hops.
Before the first sync of a session, call mcp__hq__hq_whoami. If it returns
your identity + session expiry, the host MCP is live and authenticated. If
it errors with "not signed in" or "tokens expired", tell the user to run
hq login on the host machine (the sandboxed agent cannot do this itself
— hq login opens a browser on the host).
Parse $ARGUMENTS into the hq_sync tool's input schema:
| Arg pattern | Tool input |
|---|---|
| --company <slug> | { "company": "<slug>" } |
| --personal | { "personal": true } |
| (neither) | {} — server defaults to --all |
| --on-conflict <strategy> | { "onConflict": "<strategy>" } |
| --message "<msg>" | { "message": "<msg>" } |
Call mcp__hq__hq_sync with the assembled input. Sync output can be chunky
(per-company push + pull legs) — surface a terse summary, not the full log,
unless the user asked for verbose detail.
Quiet by default. Surface:
<hqRoot>/.hq-conflicts/index.json
if any — the user can run /resolve-conflicts next)If conflicts were written, mention /resolve-conflicts as the next step.
The unprefixed /hq-sync skill resolves HQ root via four config tiers and
then execs the cloud-runner binary directly with the host's Cognito
session. None of that works from Cowork's sandbox, where ~/.hq is not
mounted and the host's Node binary isn't reachable. The
hq-pack-cowork MCP server fixes that by running on the host (with full
auth + binaries) and exposing hq_sync as a tool call the sandboxed agent
can make. This skill is the thin in-session adapter for that tool.
tools
Discovery + dispatch entry point for native HQ inside Cowork (or any sandboxed Claude Code plugin host). Enumerates every HQ capability available through hq-pack-cowork's host-side MCP server (identity, sync, qmd/search, secrets, vault files, team & membership, packages & modules, meeting intelligence, feedback, schema-backed runs, guarded long-tail CLI) and routes to the right `mcp__hq__*` tool while preserving default HQ behavior through a different transport. Use when the agent needs HQ but `hq`/`qmd` aren't reachable from its bash sandbox and isn't sure which tool to call.
tools
Share an HQ vault path from a sandboxed Claude Code plugin host (Cowork) by calling the host-side `hq_share` MCP tool. Without `--with`, mints an encrypted single-use share-session URL (default 15-min expiry). With `--with`, grants direct ACL access to a person, group, or `@all`. Same capability as `/hq-share`, routed through hq-pack-cowork's MCP server so it works from a sandboxed agent.
tools
--- name: hq-cowork-secrets description: Use HQ secrets from a sandboxed Claude Code plugin host (Cowork). The host-side MCP server never returns a secret value itself: `mcp__hq__hq_secrets_exec` runs a command on the host with named secrets injected as env vars (only the command's output returns), and refuses to launch a shell or value-printing binary; `mcp__hq__hq_secrets_list` lists secret NAMES/metadata only. These tools run host commands with the user's privileges, so treat them as host-tru
tools
--- name: hq-cowork-search description: Hybrid full-text + semantic search across HQ content (policies, skills, knowledge, workers, projects, per-company collections) from a sandboxed Claude Code plugin host (Cowork). Calls the host-side `hq_search` MCP tool, which wraps `qmd query` (hybrid: expansion + RRF + rerank — the recommended search mode). Use when the agent needs to find HQ content but `qmd` isn't reachable from its bash sandbox. allowed-tools: mcp__hq__hq_search --- # /hq-cowork-searc