# Connect Pixy
Ask me to switch on manual mode of this session before we start.
Never construct, adapt, or guess. If a step fails, stop and report what was off. Do not try alternatives.
Before all print next message exactly as written, on its own. Add nothing. Wait for a yes before step 1.:
```
Here's what I'll do to connect Pixy:
1. Ask your permissions and how you'd like Pixy to be set up
2. Install the script tag
3. Get Pixy's API key using your invitation
4. Install the Pixy skill
5. Save the settings
May I proceed?
```
If canceled, stop immediately.
IMPORTANT: If you need any additional approval or input from me, use your harness's question tool.
## 1. Ask first
After approval, ask all 3 questions at once using your harness's question tool, or in one message if unavailable. Do not guess or answer for the user. Wait for the answers.
* Permission to use curl (or any other suitable tool) to access Pixy's public API endpoint:
https://api.pixydesignapp.com
Allow, Don't allow
* Where the script tag belongs:
Which build do you use to work with Pixy: development only, a staging build, or every build including production? Some sites want it behind a flag or an env variable; some ship one build everywhere. You know project better.
* How to work:
a) Auto: on "Check Pixy", you build the edits, report, and finish without stopping.
b) Manual: you pull, list what the batch changes and which files you would touch, and wait for a yes before building.
## 2. Install the tag
Add the tag from your instructions to the
of every page of the build the user named:
```html
```
Then check the site's Content Security Policy. Never assume there is none: a policy blocks the tag silently, and the Connect Pixy button never shows. It can be set in the project (a meta tag, server or framework headers, middleware) or by the host in front of it (a CDN, the platform's headers). Do both checks:
* Search the project for `Content-Security-Policy`.
* If the site is live, read its headers:
```bash
curl -sI | grep -i content-security-policy
```
If either finds a policy, add `https://pixydesignapp.com` to `script-src`, `https://pixydesignapp.com` and `wss://pixydesignapp.com` to `connect-src`, and `data:` to `img-src` and `font-src` (copying a selection as a PNG draws it with its images and fonts embedded). If the policy is set where you can't edit it, tell me what to add and where.
If the site's images come from another host than its pages, a media subdomain for example, that host has to let the site's origin read them, or they come out blank in a copied PNG: answer the site's origin with `Access-Control-Allow-Origin`, and with `Access-Control-Allow-Credentials: true` when the images need the visitor's cookie.
## 3. Get API Key
I gave you an invitation code. Use it to get an API Key for future interactions when I ask you to. To get an API Key:
Introduce yourself, something like Claude Code, ChatGPT Codex, or Cursor on Alexander's MacBook. I might change your name anytime after.
```bash
curl -s -X POST https://api.pixydesignapp.com/connect \
-H 'X-Pixy-Key: the_invitation' \
-H 'Content-Type: application/json' \
-d '{"name": "YOUR_NAME"}'
```
Ask me where to store received key in pixy-settings.md. Use that key as `X-Pixy-Key` on every call. "invalid_invite" means the invitation expired or was spent: ask the user to copy the instructions again.
## 4. Install the skill
Fetch the working contract with your new key:
```bash
curl -s -X POST https://api.pixydesignapp.com/skill \
-H 'X-Pixy-Key: px_sk_yourkey'
```
The response body is a SKILL.md file. Write it from the output yourself, verbatim, never a paraphrase and never with `curl -o` (a download straight to disk is refused without asking), where your harness discovers skills:
| harness | path |
| --------------------------- | --------------------------------------- |
| Claude Code | `.claude/skills/pixy/SKILL.md` |
| ChatGPT Codex | `.agents/skills/pixy/SKILL.md` |
| Cursor | `.cursor/skills/pixy/SKILL.md` |
| Another skill-aware harness | its skills directory, folder `pixy` |
| No skill support | `pixy.md` beside your instructions file |
Downloading is not studying: read the skill when the user asks you to work, not now.
## 5. Write the settings
a) Add these lines to the instructions your harness loads every session (CLAUDE.md, AGENTS.md, Cursor rules). They are your Pixy settings, and every command reads them first:
```
Pixy is connected. The key is in . Tag: .
Mode: . When asked to "Check Pixy", "Pixy settings", "Disconnect Pixy" or "Uninstall Pixy", follow the pixy skill (pixy.md beside this file if skills don't load) with that key.
```
b) Add these lines to pixy-settings.md
```
To uninstall: list all places you touched in this project to connect Pixy
```
Work from that copy, never re-fetching the docs per ask.
## 6. Close
When every step is done, close with one of these two as your last message, on its own. Add nothing before or after it, no summary of the steps. Print it exactly as written.
If your replies render markdown (a chat app or an IDE panel), print this, as markdown and not in a code block:
```
---
# ✅ Pixy is installed and connected
---
## 1. Connect your browser
Open and click **Connect Pixy**
## 2. From now on, just say
| Say | What I do |
|---|---|
| **Check Pixy** | Bring your edits into the project |
| **Pixy settings** | Change tag location or auto/manual mode |
| **Disconnect Pixy** | Leave the project, keep the tag |
| **Uninstall Pixy** | Remove everything related to Pixy |
```
If your replies show as plain text (a terminal), print this inside a code block, so the spacing holds:
```
╔══════════════════════════════════════════════════════════════╗
║ ║
║ PIXY IS INSTALLED & CONNECTED ║
║ ║
╚══════════════════════════════════════════════════════════════╝
1. CONNECT YOUR BROWSER
────────────────────────────────────────────────────────────
Open
and click "Connect Pixy"
2. FROM NOW ON, JUST SAY:
────────────────────────────────────────────────────────────
"Check Pixy" Bring your edits into the project
"Pixy settings" Change tag location or auto/manual mode
"Disconnect Pixy" Leave the project, keep the tag
"Uninstall Pixy" Remove everything related to Pixy
────────────────────────────────────────────────────────────
```
is the address of the site in the build the tag is in, with `?pixy-connect` added (`&pixy-connect` if the address has a query already), for example `http://localhost:3000/?pixy-connect`. Take the address from the project, its dev server or its config. If you can't tell it, ask me.