| name | install-context-hub |
| description | Install, upgrade, sign in to, repair, or verify InThree Context Hub on Codex, Claude Code, or nanobot. Use when an employee asks to install or connect Context Hub, says “升级 Context Hub” or “更新插件”, asks whether a newer version exists, or needs help with the MCP bridge, OAuth login, or shared-context Skills. Preview every mutation, use only official stable releases, and never handle access tokens directly. |
Install or upgrade Context Hub
Manage the public Context Hub client bundle for the active agent host. Installing or authenticating never grants company-data access; the server authorizes every request independently.
Safety boundary
- Trust only
https://github.com/Re-bin/context-hub-plugin and stable tags shaped like vMAJOR.MINOR.PATCH.
- Never use a fork, mirror, shortened URL, floating
main, prerelease, or repository under nanobot-dev.
- Never request, paste, print, or write an access token, refresh token, cookie, client secret, or private key.
- Preview first. Ask for explicit confirmation before
--apply, OAuth, replacement, or host reload.
- Never weaken server authorization or copy company data elsewhere to work around a failure.
Choose the host
Use the host the employee is actively running. If intent is ambiguous, ask whether this is Codex, Claude Code, or nanobot. Read the matching reference:
Use the installer script adjacent to this Skill when it is already installed. For a first installation, clone the exact current release outside the employee's project:
tmp_dir="$(mktemp -d)"
git clone --depth 1 --branch v1.5.0 \
https://github.com/Re-bin/context-hub-plugin.git \
"$tmp_dir/context-hub-plugin"
installer="$tmp_dir/context-hub-plugin/skills/install-context-hub/scripts/install.py"
Before applying a first install, confirm VERSION is 1.5.0, origin is exact, HEAD is exactly tagged v1.5.0, and the checkout is clean. Read SECURITY.md and inspect the installer and bridge.
Install
Dry-run first, replacing codex with claude or nanobot:
python3 "$installer" --host codex --action install
Show the detected executable, changes, conflicts, backups, production endpoint, runtime directory, and scopes. After the employee confirms the exact preview, apply the same plan. Add --replace only when the preview reports a conflicting named Context Hub entry and the employee approves its replacement.
python3 "$installer" --host codex --action install --apply
Upgrade naturally
When the employee says “升级 Context Hub”, “更新 Context Hub”, or equivalent:
-
Use the currently installed Skill's adjacent installer.
-
Check the official GitHub latest stable release:
python3 "$installer" --host codex --action check
-
If newer, preview the trusted upgrade:
python3 "$installer" --host codex --action upgrade
-
Explain the exact current and target tags. After explicit confirmation, apply:
python3 "$installer" --host codex --action upgrade --apply
The upgrader accepts only the official Releases API, a strict stable semantic-version tag, and the allowlisted repository. It clones the exact tag into a temporary directory; the target installer independently validates origin, exact tag, version, and clean status before replacing only the named Context Hub entries. It preserves Keychain credentials and unrelated configuration, then runs read-only verification.
The local bridge also performs one non-blocking, cached update check per day. It may print an advisory to stderr, but it never downloads or executes an update by itself. A host reload is still required after client code changes because Codex, Claude Code, and nanobot cache plugins and MCP processes.
Authenticate
Run only after the employee confirms the interactive browser login:
python3 "$installer" --host codex --action login --apply
The bridge uses Auth0 Device Authorization and stores the refresh credential directly in macOS Keychain. Auth0's one-time Device Confirmation is expected: compare its code with the installer and confirm only when this employee initiated the login. Authentication is not administrator approval; new accounts may remain pending_approval.
Verify without writing data
python3 "$installer" --host codex --action verify
Verification checks service readiness, the pinned host configuration, Keychain refresh, MCP initialization, and account_status. Both approved and pending_approval are valid installation states. For an approved account, finish with one harmless read-only search that returns authorized results or a valid empty result. Do not publish, update, consolidate, change access, or propose a Skill just to test.
Report the failing layer without credentials. If an approved user has stale membership or scopes, run logout, login once, and reload the host. Use logout only when the employee asks to remove the local credential:
python3 "$installer" --host codex --action logout --apply