End-to-end guided setup and deployment skill for Research Studio. Use when a user asks an AI agent (Claude Code, Codex, or Antigravity) to install Research Studio, configure .env, set up macOS launchd or Linux systemd persistence, expose HTTPS for iOS PWA native push (via Tailscale Serve, Cloudflare Tunnel, or Caddy reverse proxy), or onboard isolated teammate accounts.
3 stars
0 votes
0 copies
0 views
Added December 6, 2026
ai-agentsjavascriptjavabashnodeapisecurity
Works with
claude code
cli
api
Security analysis
D55/100
mediumUses curl or wget to download content
criticalModifies startup scripts or system services for persistence
criticalModifies startup scripts or system services for persistence
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Setup And Deploy?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jinghan-yu-setup-and-deploy)
---
name: setup-and-deploy
description: End-to-end guided setup and deployment skill for Research Studio. Use when a user asks an AI agent (Claude Code, Codex, or Antigravity) to install Research Studio, configure .env, set up macOS launchd or Linux systemd persistence, expose HTTPS for iOS PWA native push (via Tailscale Serve, Cloudflare Tunnel, or Caddy reverse proxy), or onboard isolated teammate accounts.
---
# Research Studio — Setup & Deployment Skill
Use this skill whenever the user wants you to install, configure, expose over HTTPS, or add teammates to **Research Studio** without manually editing config files.
## 1. Environment Discovery
Before writing configs, inspect the host:
```bash
uname -a
node -v
which agy codex claude tailscale cloudflared caddy 2>/dev/null || true
```
- **Node.js >= 22** is required.
- At least one of `agy`, `codex`, or `claude` CLI should be installed and authenticated (Research Studio auto-detects whichever engines exist; you do NOT need all three).
## 2. Build & Install Core Components
Run the repository installer (idempotent):
```bash
bash install.sh
```
This builds `web/` and `server/`, installs `rs-assistant` and `rs-patrol` into `~/.local/bin/`, and links all bundled skills into `~/.agents/skills/` and `~/.claude/skills/`.
## 3. Configure `server/.env`
Copy `server/.env.example` to `server/.env` (`chmod 600 server/.env`) and fill in:
- `PORT=8787`
- `ADMIN_USERNAME` / `ADMIN_PASSWORD` / `ADMIN_ROOTS` (comma-separated absolute workspace paths, e.g. `$HOME/research`)
- `PUBLIC_BASE_URL` (set to the final `https://...` URL so Web Push VAPID subject and notification deep-links work!)
- **macOS headless note**: If running `agy` or `claude` over non-GUI SSH / `launchd`, macOS may lock `login.keychain-db`. Either disable keychain auto-lock (`security set-keychain-settings ~/Library/Keychains/login.keychain-db`) or set `MACOS_KEYCHAIN_PASSWORD` in `server/.env`.
## 4. Choose an HTTPS Access Tier (Required for iPhone Home Screen PWA Push!)
Ask the user which tier fits their environment:
### Tier A — Zero-Cost Private HTTPS via Tailscale Serve (Recommended for Personal Use)
```bash
tailscale serve --bg http://127.0.0.1:8787
```
Grab the `https://<machine>.<tailnet>.ts.net` URL, write it into `PUBLIC_BASE_URL` in `server/.env`, and restart the server. Zero VPS cost, automatic TLS.
### Tier B — Zero-Cost Public HTTPS via Cloudflare Tunnel (No VPN Needed on Phone)
```bash
cloudflared tunnel --url http://127.0.0.1:8787
# Or configure a named Cloudflare Tunnel bound to studio.yourdomain.com
```
Set `PUBLIC_BASE_URL=https://studio.yourdomain.com` in `server/.env`.
### Tier C — Residential Host + Reverse Proxy VPS (Caddy + Tailscale)
For users hosting on a residential Mac mini / Linux workstation while accessing from restricted networks without VPN on mobile:
1. Join both the host and a small VPS to the same Tailscale tailnet (`100.x.y.z`).
2. Install Caddy on the VPS using `deploy/Caddyfile.example` (ensure `flush_interval -1` for SSE streaming!).
3. Point a domain (or `<vps-ip-dashes>.sslip.io`) to the VPS so Caddy provisions automatic Let's Encrypt HTTPS.
4. Set `PUBLIC_BASE_URL=https://<domain>` in `server/.env`.
## 5. Persistent Background Service
- **macOS (`launchd`)**: Customize `deploy/com.research-studio.plist.example`, copy to `~/Library/LaunchAgents/com.research-studio.plist`, and start:
```bash
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.research-studio.plist
```
- **Linux (`systemd`)**: Customize `deploy/research-studio.service.example`, copy to `/etc/systemd/system/research-studio.service`, and start:
```bash
sudo systemctl daemon-reload && sudo systemctl enable --now research-studio
```
## 6. Onboard Isolated Lab Teammates / Friends
To add isolated accounts (each gets their own sandboxed directory, private conversation history, private Personal Assistant table, and independent PWA push notifications):
1. Create their isolated workspace directory (e.g. `mkdir -p "$HOME/teammate_workspace"`).
2. Add them to `server/.env` via `FRIEND_USERNAME` / `FRIEND_PASSWORD` / `FRIEND_ROOTS` and/or `EXTRA_FRIENDS="alice:strongpass:/home/user/alice_ws;bob:strongpass:/home/user/bob_ws"`.
3. Restart the service and verify login + `/api/assistant/open-thread` for each account.
## 7. Verification Checklist
- `curl -fsS http://127.0.0.1:8787/api/health` returns `"ok": true` and lists detected engines.
- `curl -fsSI "$PUBLIC_BASE_URL/sw.js"` returns `HTTP/2 200` with `application/javascript`.
- Open `$PUBLIC_BASE_URL` on iPhone Safari → Share → **Add to Home Screen** → open from Home Screen → tap 🔔 → **Enable Native Push** → **Send Test Notification**.