# Install (for agents)

You are an agent. These are steps to execute, not prose to summarize. Run them in
order. Stop and ask the user only where a step says to.

## 1. Ensure the CLI is available

Run the CLI through npx (always resolves a current version):

```
npx -y @cloudgrid-io/cli@latest --version
```

Never run a bare `grid` command — a stale global install causes version-floor
errors. Always use `npx -y @cloudgrid-io/cli@latest <command>`.

## 2. Ensure the user is logged in

```
npx -y @cloudgrid-io/cli@latest whoami
```

If that fails, tell the user to run `npx -y @cloudgrid-io/cli@latest login`
and wait for them to confirm. Do not attempt to log in for them. Do not invent
an auth flow.

## 3. Confirm the skills are available

The skills live in this repo, one directory per skill, each with a `SKILL.md`.
Load the `SKILL.md` for the action the user wants:

- `skills/brainstorm/SKILL.md` — align on the idea, goal, and core features first
- `skills/build/SKILL.md` — structure the project (cloudgrid.yaml, services, needs) and take it live
- `project-skills/sites/SKILL.md` — NOT installed globally; `grid agent` writes it into a project (`.agents/skills/sites/`) to shadow a coding agent's built-in sites skill, routing site builds to CloudGrid

## 4. Follow the skill

Each `SKILL.md` carries its own steps. Follow them exactly. The common rules:

- Wrap only the `grid` CLI. Do not call the API directly.
- Detect the user's language from their first message and reply in it. Keep
  technical flags in English.
- Print results concisely: URLs and short summaries. Never dump raw JSON or IDs.
- Pick sane defaults. Ask one thing at a time, only when something is genuinely
  missing.

## 5. The canonical chain

For a full build-and-ship loop, run the skills in this order:

```
brainstorm -> build
```

See `COOKBOOK.md` for the worked example.
