sag-setuplisted
Install: claude install-skill vuongdam2k01/sag-agents-plugin
# sag-setup — first-run setup (manual trigger only)
This skill **does not load itself**. It runs when the user types `/sag-setup` or gives a
direct order to set the plugin up. It logs in, can create a SAG source, and writes config
files — do not infer permission for any of that from an unrelated request.
## Ask for these, in this order
Stop and ask. Do not guess a URL, invent a source name, or pick include globs by reading
the repo without confirmation.
| # | Ask | Needed when | Example |
|---|---|---|---|
| 1 | **SAG URL** | always | `http://sag.home` |
| 2 | **Login name** | always | `vuong` |
| 3 | **Is there already a scope to join?** | always | see below |
| 4 | **`source_id`** | JOIN only | `a3f1…` or the name to look up |
| 5 | **Source name** | BOOTSTRAP only | `project-a-knowledge` |
| 6 | **State service URL + token** | only if agents run on >1 machine | `http://state.home:9000` |
Question 3 decides everything after it. Phrase it concretely: *"Has any other agent or
machine already published knowledge for this project into SAG — do you have a
`source_id`?"*
- **They have a `source_id`** → JOIN. Nothing is created. The scope already has documents,
a manifest, and possibly a shared state service.
- **They do not** → BOOTSTRAP. This machine provisions the scope.
Everything else is derived — never ask for it:
- `key_format` comes from probing the instance (below), not from a preference.
- `source_id` in JOIN mode comes from the user; in BOOTSTRAP from `source