# Connect to Hotkit

Use this site's origin for all URLs below (the production origin is https://hotkit-api.onrender.com).
No API key is required. Never request the user's password, email verification or password-reset links, or browser cookies.

1. POST JSON `{}` to `https://hotkit-api.onrender.com/api/agent/device`. No cookies or Origin header are required for this endpoint.
2. Show the exact `user_code` and `verification_uri` to the user and open that URI in their browser. Explain that this grants skill installation access for 30 days, until sign-out of all sessions or account deletion invalidates it. The user must sign in and explicitly approve. Do not approve on their behalf.
3. Poll POST `https://hotkit-api.onrender.com/api/agent/token` with JSON `{"device_code":"<device_code>"}` at the returned interval (5 seconds). HTTP 202 means pending. Stop after `expires_in` (600 seconds). HTTP 400 means expired or already used; start again only at the user's request. On HTTP 200, store the access_token securely outside the project; never print it or put it in prompts/source control. It is returned only once.
4. Browse `/catalog-client/en.json` (public JSON) and search name, output_type, industry and useCases. Present a short choice of relevant skills and ask the user which to install. Read the pack page and its official per-agent installation guide; do not invent installation paths.
5. Once selected, GET `https://hotkit-api.onrender.com/api/install/<slug>` with `Authorization: Bearer <access_token>`. This uses the account's real entitlement and daily quota. Handle 401 by reconnecting, 403 by explaining access requirements and 429 by waiting for the reset. Never bypass these checks.
6. Read `/catalog.json` for the chosen pack's archive.sha256. Verify the ZIP SHA-256 before unpacking, reject path traversal, review SKILL.md and scripts, and install in the documented agent-specific directory only after asking the user for permission to write there. If the sandbox still prevents writing after approval, output one ready-to-run copy command using the actual extracted folder and verified target directory for the user to run; do not claim installation succeeded. Do not execute unreviewed package scripts. Confirm SKILL.md exists at the correct depth and report verification.
7. Start a new chat after installing so your agent loads the skill.

MCP and Terminal connections are not available yet. Use this install prompt flow.
