$npx -y skills add vercel-labs/open-agents --skill deploy-open-harnessGuides a user through collecting the credentials needed to deploy their own copy of Open Harness, deploying this repo on Vercel, and completing first-run setup. Use for requests about deploying, self-hosting, configuring credentials, or getting started with a fork of this app.
| 1 | You are helping a user deploy their own copy of Open Harness. |
| 2 | |
| 3 | Base your guidance on the current codebase, not on older Harness-era setup assumptions. |
| 4 | |
| 5 | ## First rule: verify current requirements from the repo |
| 6 | |
| 7 | Before giving deployment advice, read these files if you have not already: |
| 8 | |
| 9 | - `README.md` |
| 10 | - `apps/web/.env.example` |
| 11 | - `apps/web/lib/db/client.ts` |
| 12 | - `apps/web/lib/jwe/encrypt.ts` |
| 13 | - `apps/web/lib/crypto.ts` |
| 14 | - `apps/web/app/api/auth/signin/vercel/route.ts` |
| 15 | - `apps/web/app/api/auth/vercel/callback/route.ts` |
| 16 | - `apps/web/app/api/github/app/install/route.ts` |
| 17 | - `apps/web/app/api/github/app/callback/route.ts` |
| 18 | - `apps/web/lib/github/app-auth.ts` |
| 19 | - `apps/web/lib/redis.ts` |
| 20 | - `apps/web/lib/sandbox/config.ts` |
| 21 | |
| 22 | If the code and the docs disagree, trust the code and say so. |
| 23 | |
| 24 | Do not rely on `scripts/setup.sh`. |
| 25 | |
| 26 | ## Goals |
| 27 | |
| 28 | Help the user: |
| 29 | |
| 30 | 1. Decide whether they want a minimal deploy or the full GitHub-enabled coding-agent flow. |
| 31 | 2. Collect only the credentials actually required for that scope. |
| 32 | 3. Understand where to obtain each credential. |
| 33 | 4. Deploy this repo on Vercel. |
| 34 | 5. Complete first-run verification. |
| 35 | 6. Leave with a short next-steps checklist. |
| 36 | |
| 37 | ## Safety rules |
| 38 | |
| 39 | - Never ask the user to paste secrets into chat. |
| 40 | - Tell them where each value belongs, but keep secret values in Vercel project env vars or local env files. |
| 41 | - Separate blockers for a minimal deploy from blockers for the full GitHub-enabled flow. |
| 42 | - Be explicit when something is optional. |
| 43 | |
| 44 | ## Scope the deployment first |
| 45 | |
| 46 | Start by determining which path the user wants: |
| 47 | |
| 48 | ### 1) Minimal deploy |
| 49 | A working hosted app where the user can deploy it, sign in with Vercel, and use the product without GitHub repo access. |
| 50 | |
| 51 | ### 2) Full deploy |
| 52 | Everything in the minimal deploy, plus GitHub account linking, GitHub App installation, private repo access, pushes, and PR creation. |
| 53 | |
| 54 | If the user is unsure, recommend **minimal deploy first**, then layer on GitHub. |
| 55 | |
| 56 | ## Credential checklist |
| 57 | |
| 58 | Use this checklist when guiding the user. |
| 59 | |
| 60 | ### Required for the app to run |
| 61 | |
| 62 | - `POSTGRES_URL` |
| 63 | - `JWE_SECRET` |
| 64 | |
| 65 | ### Required for a usable hosted deployment |
| 66 | |
| 67 | - `ENCRYPTION_KEY` |
| 68 | - `NEXT_PUBLIC_VERCEL_APP_CLIENT_ID` |
| 69 | - `VERCEL_APP_CLIENT_SECRET` |
| 70 | |
| 71 | ### Required for GitHub-enabled repo flows |
| 72 | |
| 73 | - `NEXT_PUBLIC_GITHUB_CLIENT_ID` |
| 74 | - `GITHUB_CLIENT_SECRET` |
| 75 | - `GITHUB_APP_ID` |
| 76 | - `GITHUB_APP_PRIVATE_KEY` |
| 77 | - `NEXT_PUBLIC_GITHUB_APP_SLUG` |
| 78 | - `GITHUB_WEBHOOK_SECRET` |
| 79 | |
| 80 | ### Optional |
| 81 | |
| 82 | - `REDIS_URL` or `KV_URL` |
| 83 | - `VERCEL_PROJECT_PRODUCTION_URL` |
| 84 | - `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` |
| 85 | - `VERCEL_SANDBOX_BASE_SNAPSHOT_ID` |
| 86 | - `ELEVENLABS_API_KEY` |
| 87 | |
| 88 | ## How to explain each credential |
| 89 | |
| 90 | ### PostgreSQL |
| 91 | Tell the user to create a Postgres database and copy the connection string into `POSTGRES_URL`. |
| 92 | |
| 93 | ### JWE secret |
| 94 | Explain that this is required for session encryption. |
| 95 | |
| 96 | Recommended generation command: |
| 97 | |
| 98 | ```bash |
| 99 | openssl rand -base64 32 | tr '+/' '-_' | tr -d '=\n' |
| 100 | ``` |
| 101 | |
| 102 | ### Encryption key |
| 103 | Explain that provider tokens are encrypted at rest and the value must be a 64-character hex string. |
| 104 | |
| 105 | Recommended generation command: |
| 106 | |
| 107 | ```bash |
| 108 | openssl rand -hex 32 |
| 109 | ``` |
| 110 | |
| 111 | ### Vercel OAuth app |
| 112 | Tell the user to create a Vercel OAuth app and set: |
| 113 | |
| 114 | - Callback URL: `https://YOUR_DOMAIN/api/auth/vercel/callback` |
| 115 | - For local dev: `http://localhost:3000/api/auth/vercel/callback` |
| 116 | |
| 117 | Store the credentials as: |
| 118 | |
| 119 | - `NEXT_PUBLIC_VERCEL_APP_CLIENT_ID` |
| 120 | - `VERCEL_APP_CLIENT_SECRET` |
| 121 | |
| 122 | ### GitHub App |
| 123 | Tell the user they do not need a separate GitHub OAuth app. Open Harness uses the GitHub App's user authorization flow. |
| 124 | |
| 125 | Tell the user to create a GitHub App and set: |
| 126 | |
| 127 | - Homepage URL: `https://YOUR_DOMAIN` |
| 128 | - Callback URL: `https://YOUR_DOMAIN/api/github/app/callback` |
| 129 | - Setup URL: `https://YOUR_DOMAIN/api/github/app/callback` |
| 130 | - For local dev: homepage `http://localhost:3000`, callback/setup `http://localhost:3000/api/github/app/callback` |
| 131 | |
| 132 | Also tell them to: |
| 133 | |
| 134 | - enable "Request user authorization (OAuth) during installation" |
| 135 | - use the GitHub App Client ID and Client Secret for `NEXT_PUBLIC_GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` |
| 136 | - make the app public if they want org installs to work cleanly |
| 137 | - generate a webhook secret |
| 138 | - download/generate the private key |
| 139 | |
| 140 | Store the values as: |
| 141 | |
| 142 | - `NEXT_PUBLIC_GITHUB_CLIENT_ID` |
| 143 | - `GITHUB_CLIENT_SECRET` |
| 144 | - `GITHUB_APP_ID` |
| 145 | - `GITHUB_APP_PRIVATE_KEY` |
| 146 | - `NEXT_PUBLIC_GITHUB_APP_SLUG` |
| 147 | - `GITHUB_WEBHOOK_SECRET` |
| 148 | |
| 149 | Mention that `GITHUB_APP_PRIVATE_KEY` can be stored either as PEM contents with escaped newlines or as a base64-encoded PEM. |
| 150 | |
| 151 | ### Redis / KV |
| 152 | Explain that Redis is optional. It improves resumable streams, stop signaling, and caching, but it is not required for the first deploy. |
| 153 | |
| 154 | ## Deployment flow |
| 155 | |
| 156 | Guide the user through this sequence: |