# cybrix-deploy

Adopt this skill: https://proskills.md/skills/other/cybrixcc-cybrix-skills-plugins-cybrix-deploy-skills-cybrix-deploy

Page: https://proskills.md/skills/other/cybrixcc-cybrix-skills-plugins-cybrix-deploy-skills-cybrix-deploy
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: plugins/cybrix-deploy/skills/cybrix-deploy/SKILL.md
size: 8103
upstream: https://github.com/cybrixcc/cybrix-skills/blob/master/plugins/cybrix-deploy/skills/cybrix-deploy/SKILL.md

````text
---
name: cybrix-deploy
description: |
  Deploys the current project to a live HTTPS URL via Cybrix. Activates on
  any request to make the current project public, get a URL for it, deploy
  it, ship it, host it, publish it, put it online, or make it live —
  including casual phrasings like "send this to the internet", "share this
  as a link", "give me a URL", "make this accessible online". Activates
  whether the user mentions Cybrix by name or not (when no other host like
  Vercel, Netlify, Cloudflare Pages, Railway, or Render is named).

  Also activates on equivalent phrases in other languages — Russian
  ("задеплой", "опубликуй", "выложи в сеть", "запушь это в инет",
  "сделай ссылку"), Spanish ("despliega esto", "publica esto", "ponlo en
  línea"), German ("deploy das mal", "stelle das online"), and other common
  languages where the intent is clearly to make a project publicly
  accessible via URL.

  Uses heuristic detection to determine if a project is static or needs a
  server runtime — works with any framework, not just a known list.
  Automatically detects and handles environment variables so the build
  receives everything it needs. Returns a live URL on *.cbrx.cc or a
  user-configured custom domain. Does NOT activate when the user explicitly
  names a different host (Vercel, Netlify, Cloudflare, Railway, Render).
allowed-tools: Bash, Read, Write
---

# cybrix-deploy

## Prerequisites

Before deploying, ensure the user has an API token. Check in this order:

1. `CYBRIX_DEPLOY_TOKEN` — set automatically by Claude Code from userConfig keychain (no action needed).
2. Environment variable `CYBRIX_TOKEN`.
3. File `~/.config/cybrix/token`.
4. File `.cybrix/token` in the project (gitignored).

If none exist, instruct the user exactly like this:

> No Cybrix token found. Get one free at **https://app.cybrix.cc/dashboard**
> (Step 3 — "Save your API token" → Generate).
>
> Once you have it, you can either:
> - **Paste it here** and I'll use it for this deploy (easiest)
> - Run `export CYBRIX_TOKEN=<token>` in your terminal to set it for this session
> - Run `echo <token> > ~/.config/cybrix/token` to save it permanently

Then wait for the user to provide the token. If they paste it directly in
chat, use it immediately — do not require them to re-run any command.
The project is ready to deploy once the token is available.

## Deployment workflow

### Step 1 — Detect project type (heuristic)

Do not rely on a framework whitelist. Instead, look for signals and
classify the project as **static**, **server**, or **unknown**.

**Static signals** (proceed with deploy):

- `package.json` has a `build` script AND output lands in `dist/`, `out/`,
  `build/`, `public/`, `_site/`, or `.output/public/`
- `next.config.{js,ts,mjs}` with `output: 'export'` or `output: 'static'`
- `astro.config.{js,ts,mjs}` present (default mode is static)
- `vite.config.{js,ts}` without SSR plugins
- `_config.yml` (Jekyll), `config.toml` or `hugo.toml` (Hugo),
  `.eleventy.js` / `eleventy.config.js` (Eleventy),
  `zola.toml` (Zola)
- Only HTML/CSS/JS files at root, no server entry point

**Server signals** (refuse — see below):

- `Dockerfile` or `docker-compose.yml` (unless it only copies a static
  `dist/`)
- `main.go`, `server.go`, or any `*.go` containing `net/http` or
  `ListenAndServe`
- `main.py`, `app.py`, `server.py` with `uvicorn`, `gunicorn`, `flask`,
  `fastapi` imports, or a `if __name__ == '__main__'` block calling
  `app.run` / `serve` / `asyncio.run`
- `main.rs` or `server.rs` with `actix`, `axum`, `rocket`, `warp`,
  or `tokio::main`
- `package.json` with a `start` script that runs `node`/`tsx`/`bun` on a
  server file (NOT `next start` in a static-export config)
- `Gemfile` with `puma`, `unicorn`, `rails`, or `sinatra`
- `pom.xml` or `build.gradle` with `spring-boot`
- `.csproj` with ASP.NET

**Database signals** (warn but allow if everything else is static):

- `*.sql` files, `migrations/` folder, `prisma/schema.prisma`,
  `drizzle.config.*`, `DATABASE_URL` referenced in source
- A static site hitting a hosted DB from the browser is unusual but valid.
  Warn the user, don't refuse.

**When refusing** (server signals detected):

> This looks like a project that needs a server runtime — I detected
> `<specific signal, e.g. "main.go with net/http" or "Dockerfile with EXPOSE">`.
>
> Cybrix currently supports static sites only. Your options:
> 1. Convert to a static export (e.g. Next.js `output: 'export'`, Astro,
>    Hugo).
> 2. Use a service that supports backends: Railway, Fly.io, Render.
> 3. Tell me to deploy anyway if you think the detection is wrong.

Always allow option 3 — heuristics are imperfect and the user knows
their project.

**Static output directories** to check, in order: `dist`, `out`, `public`,
`_site`, `build`, `.output/public`.

### Step 2 — Scan environment variables

After confirming the project is static but BEFORE running the build, scan
for environment variables the build will need.

**2a. Read .env files** — parse `KEY=value` format, skip comments (`#`)
and blank lines. Files to check: `.env`, `.env.local`, `.env.production`,
`.env.example`.

**2b. Grep source code** for build-time env var references:

- JS/TS: `process.env.X`, `import.meta.env.X`
- Look in `src/`, `app/`, `pages/`, `components/` — any
  `*.{js,jsx,ts,tsx,vue,svelte}`
- Pay extra attention to `NEXT_PUBLIC_*`, `VITE_*`, `PUBLIC_*`,
  `REACT_APP_*` — these are baked into the bundle at build time

**2c. Cross-reference** keys found in code against keys present in .env
files to find what the build needs.

**2d. Show the user:**

> I detected the following environment variables your build needs:
>
>   NEXT_PUBLIC_API_URL    (in .env.local, used in 3 files)
>   VITE_STRIPE_KEY        (in .env.local, used in src/checkout.ts)
>
> These need to be set before the build. How would you like to provide
> them?
>
>   1. Paste them here (sent encrypted with the deploy)
>   2. Set them later in the dashboard
>   3. Skip (build may fail or site may not work correctly)

If the user picks **option 1**, ask for each value one at a time. Include
them in the multipart POST to `/v1/deploys` as an `env_vars` field
(JSON map: `{"KEY": "value", ...}`).

**2e. Warn about missing variables** — if a var is referenced in code but
not in any .env file:

> ⚠ `AUTH_SECRET` is referenced in your code but not in any .env file.
> Provide it now or the build may fail.

**2f. Refuse to forward secrets in client-exposed vars** — if a key with
a client prefix (`NEXT_PUBLIC_*`, `VITE_*`, `REACT_APP_*`, `PUBLIC_*`)
looks like a secret (`*_SECRET`, `*_PRIVATE_KEY`, `DATABASE_URL`,
`JWT_SECRET`):

> ⚠ `NEXT_PUBLIC_JWT_SECRET` looks like a private secret but has a
> client-bundle prefix — it will be visible to anyone who opens your
> site's source. Are you sure you want to include it?

Do not send it without explicit confirmation.

### Step 3 — Choose project name and confirm

**3a. Infer a default name** from the current folder name, slugified
(lowercase, hyphens, max 32 chars). Example: `my-portfolio-site`.

**3b. Check availability** by calling:
```
GET https://api.cybrix.cc/v1/slugs/<name>/available
```
Response: `{"available": true, "slug": "my-portfolio-site"}`

- If `available: true` — use it as the default.
- If `available: false` — do NOT use it. Tell the user:
  > The name `<name>` is already taken. What would you like to call
  > your project? It will be live at `<your-name>.cbrx.cc`.
  Then check availability of the new name too. Repeat until available.

**3c. Present summary** (only after confirming name is available):

> Ready to deploy to Cybrix:
>
> - Project name: **<name>** → live at `<name>.cbrx.cc`
> - Build command: <detected>
> - Output directory: <detected>
> - Env vars: <count> included / none detected
>
> Continue? (yes / change name / change build / change output)

If the user says `change name`, ask for a new name and re-check availability.
Use the confirmed answers to override defaul
````

## File: README.md
upstream: https://github.com/cybrixcc/cybrix-skills/blob/master/README.md

````text
# Cybrix — deploy from Claude Code

[![Version](https://img.shields.io/badge/version-0.1.2-orange)](https://github.com/cybrixcc/cybrix-skills/blob/master/plugins/cybrix-deploy/.claude-plugin/plugin.json)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
[![Claude Code](https://img.shields.io/badge/Claude%20Code-plugin-7c3aed)](https://claude.ai/code)
[![Free tier](https://img.shields.io/badge/free%20tier-no%20credit%20card-22c55e)](https://cybrix.cc)

**Tell Claude to deploy. Get a live HTTPS URL in under 60 seconds.**

Cybrix is a hosting service for static sites built for coaches, designers, and creators who build with Claude but don't do DevOps. This plugin adds a `cybrix-deploy` skill to [Claude Code](https://claude.ai/code) — Claude runs the build, packages the output, uploads it to Cloudflare's edge network, and hands you a live URL directly in the chat.

No Git. No GitHub account. No config files. No dashboards. Just talk.

```
> Deploy this with cybrix

✓ Detected static site (Next.js export)
✓ Building... done in 8s
✓ Uploading to Cybrix... done
✓ Live at: https://my-site.cbrx.cc

  Your site is live. Connect a custom domain in dashboard.
```

---

## Quick start

**1. Install the skill** — run inside Claude Code:

```
/plugin marketplace add cybrixcc/cybrix-skills
/plugin install cybrix-deploy@cybrix-skills
```

**2. Get a free API token** at [app.cybrix.cc](https://app.cybrix.cc) — no credit card required.

**3. Set your token:**

```bash
export CYBRIX_TOKEN=vd_your_token_here
```

To persist across sessions:

```bash
mkdir -p ~/.config/cybrix && echo "vd_your_token_here" > ~/.config/cybrix/token
```

**4. Open Claude Code in your project and say:**

```
Deploy this with cybrix
```

---

## What Claude does

1. Detects your project type (Next.js, Astro, Vite, Hugo, Eleventy, plain HTML, and more)
2. Scans for environment variables your build needs — asks how to handle each one
3. Runs the build and locates the output directory
4. Uploads to Cybrix and polls until the site is live
5. Returns the live URL directly in the chat

Works in any language — *"deploy this"*, *"задеплой это"*, *"despliega esto"* — Claude understands the intent.

---

## Supported project types

Static sites only. Detection is heuristic — works with any framework that produces a static output folder.

| Result   | Examples                                                                            |
|----------|-------------------------------------------------------------------------------------|
| [deploy] | Next.js (`output: 'export'`), Astro, Vite, Hugo, Eleventy, Jekyll, Zola, plain HTML |
| [skip]   | Dockerfile present, Node/Go/Python/Ruby server entry points                         |

Output directories checked in order: `dist`, `out`, `public`, `_site`, `build`, `.output/public`.

---

## Environment variables

Before running the build, Claude scans your project for environment variables the build will need:

- Reads `.env`, `.env.local`, `.env.production`, `.env.example`
- Greps source files for `process.env.X` and `import.meta.env.X` references
- Shows you what it found and asks how to handle each:
  - **Paste here** — sent encrypted with the deploy
  - **Set later** — configure in the Cybrix dashboard after deploy
  - **Skip** — build may fail or the site may not work correctly

Claude warns if a variable is used in code but missing from your env files, and refuses to forward anything that looks like a private secret (`*_SECRET`, `*_PRIVATE_KEY`, `DATABASE_URL`) inside a client-bundle prefix (`NEXT_PUBLIC_*`, `VITE_*`) without your explicit confirmation.

---

## Token lookup order

The skill looks for your token in this order:

1. `$CYBRIX_TOKEN` environment variable
2. `~/.config/cybrix/token`
3. `.cybrix/token` in the project root

---

## Pricing

| Plan        | Projects | Deploys   | Domain        | Deploy history     | Commercial use |
|-------------|----------|-----------|---------------|--------------------|----------------|
| Free        | 1        | Unlimited | `*.cbrx.cc`   | 7 days             | [allowed]      |
| Pro — $9/mo | 10       | Unlimited | Custom domain | 90 days + rollback | [allowed]      |

Both plans allow commercial use. No Fair Use restrictions.

Pro also includes Telegram deploy alerts.
→ [cybrix.cc/pricing](https://cybrix.cc/pricing)

---

## Troubleshooting

<details>
<summary><strong>"CYBRIX_TOKEN is not set"</strong></summary>

Set it with `export CYBRIX_TOKEN=vd_...` or save to `~/.config/cybrix/token` as shown above.
</details>

<details>
<summary><strong>"Output directory not found"</strong></summary>

Run your build manually first (`npm run build`, `hugo`, etc.) to confirm it works, then retry. If the output path is non-standard, tell Claude the correct path when prompted.
</details>

<details>
<summary><strong>"Build failed"</strong></summary>

Claude shows the last 40 lines of output. Fix the error (missing `node_modules`, missing env vars, TypeScript errors) then say "deploy again".
</details>

<details>
<summary><strong>"Free tier project limit reached"</strong></summary>

Free plan is limited to 1 project. Upgrade at [cybrix.cc/pricing](https://cybrix.cc/pricing) or delete an existing project from your [dashboard](https://app.cybrix.cc/dashboard).
</details>

<details>
<summary><strong>"Bundle too large"</strong></summary>

Gzipped output exceeds 100 MB. Common causes: source maps in production output, `node_modules` accidentally in `dist`, large unoptimised assets.
</details>

---

## Support

- Bug in the skill — [open an issue](https://github.com/cybrixcc/cybrix-skills/issues)
- Account or deploy problem — `support@cybrix.cc` or [app.cybrix.cc](https://app.cybrix.cc)
- Contributing a fix — see [CONTRIBUTING.md](./CONTRIBUTING.md)

---

## License

MIT — see [LICENSE](./LICENSE).
````
