Agent Skills

Workspace Admin Skill

Use when creating or administering AgentClash organizations and workspaces, inviting members, updating roles, or binding default workspace context beyond basic CLI login.

Canonical source: web/content/agent-skills/agentclash-workspace-admin/SKILL.md

Markdown export: /docs-md/agent-skills/agentclash-workspace-admin

Use This Skill When

Use when creating or administering AgentClash organizations and workspaces, inviting members, updating roles, or binding default workspace context beyond basic CLI login.

Full SKILL.md

markdown
1---
2name: agentclash-workspace-admin
3description: Use when creating or administering AgentClash organizations and workspaces, inviting members, updating roles, or binding default workspace context beyond basic CLI login.
4metadata:
5  agentclash.role: admin
6  agentclash.version: "1"
7  agentclash.requires_cli: "true"
8---
9
10# AgentClash Workspace Admin
11
12## Purpose
13Administer tenancy: organizations, workspaces, memberships, and default workspace binding for teams operating multiple eval environments.
14
15## Use When
16- Creating a new workspace for a team or environment (staging vs prod eval).
17- Listing orgs/workspaces after login to pick the right target.
18- Inviting teammates or changing workspace/org membership roles.
19- Enabling `public_packs` on a workspace or archiving inactive workspaces.
20- Setting default workspace context after auth (when `agentclash link` is not enough).
21- Stopping the spend of a workspace fast: cancel every active eval set with `agentclash workspace emergency-stop`.
22- To create, approve, or revoke workspace connectors.
23
24## Do Not Use When
25- First-time CLI install and device login — use `agentclash-cli-setup` and `agentclash link`.
26- Running evals in an already-selected workspace — use `agentclash-eval-runner`.
27- Managing provider secrets, deployments, or runtime resources — use `agentclash-runtime-resources-setup`.
28
29## Inputs Needed
30- Authenticated CLI session (`agentclash auth login --device` or `AGENTCLASH_TOKEN`).
31- Organization ID for workspace create/list (from `agentclash org list` or saved config).
32- Workspace ID for member admin commands (from `agentclash workspace list` or `agentclash link`).
33- Email addresses and roles for invites.
34
35## Environment
36```bash
37export AGENTCLASH_API_URL="https://api.agentclash.dev"
38agentclash auth login --device
39agentclash org list
40agentclash workspace list --org <organization-id>
41export AGENTCLASH_WORKSPACE="<workspace-id>"
42```
43
44Role values:
45- Org: `org_admin`, `org_member`
46- Workspace: `workspace_admin`, `workspace_member`, `workspace_viewer`
47
48## Procedure
491. Verify auth with `agentclash auth status`.
502. List organizations; create one if needed.
513. List or create workspaces under the org.
524. Set default workspace with `workspace use` or guided `link`.
535. Optionally bind project config with `agentclash init --workspace-id ... --org-id ...`.
546. Invite members and adjust roles/status as the team grows.
557. Run `agentclash doctor` in the target workspace to confirm eval readiness.
56
57## Commands
58
59### Organizations
60```bash
61agentclash org list
62agentclash org get <org-id>
63agentclash org create --name "Acme Eval" --slug acme-eval
64agentclash org update <org-id> --name "Acme Eval Platform"
65agentclash org members list <org-id>
66agentclash org members invite <org-id> --email user@example.com --role org_member
67agentclash org members update <membership-id> --role org_admin
68```
69
70Alias: `agentclash organization` = `agentclash org`.
71
72### Workspaces
73```bash
74agentclash workspace list --org <org-id>
75agentclash workspace get <workspace-id>
76agentclash workspace create --org <org-id> --name "Staging" --slug staging
77agentclash workspace update <workspace-id> --name "Staging Eval" --public-packs
78agentclash workspace update <workspace-id> --status archived
79agentclash workspace use <workspace-id>
80agentclash link
81```
82
83Alias: `agentclash ws` = `agentclash workspace`.
84
85`workspace use` validates access and saves `default_workspace` (and `default_org` when present) to user config.
86
87Project-local binding:
88```bash
89agentclash init --workspace-id <workspace-id> --org-id <organization-id>
90```
91
92### Workspace members
93```bash
94agentclash workspace members list
95agentclash workspace members invite --email user@example.com --role workspace_member
96agentclash workspace members update <membership-id> --role workspace_admin
97agentclash workspace members update <membership-id> --status suspended
98```
99
100Member commands require a resolved workspace (`--workspace`, `AGENTCLASH_WORKSPACE`, saved config, or project `.agentclash.yaml`).
101
102### Emergency stop
103Cancel every active eval set in the workspace. You must be a workspace admin.
104
105```bash
106agentclash workspace emergency-stop -w <workspace-id> --json
107agentclash workspace emergency-stop -w <workspace-id> --yes --json
108```
109
110- The command cancels eval sets and their runs only. Standalone runs and agent tryouts continue: check them with `agentclash run list`.
111- You cannot undo the cancellation.
112- Without `--yes`, the command asks for confirmation on a terminal. In non-interactive mode (`--non-interactive`, `AGENTCLASH_NONINTERACTIVE`, `CI=true` or no TTY) it exits 64 with `error.code` `interactive_input_required` and cancels nothing.
113- Never add `--yes` on your own decision. Tell the user the workspace ID and the effect, and add `--yes` only after the user approves the stop in this conversation.
114- Exit codes: 0 stopped (`cancelled_sets` can be 0), 64 `interactive_input_required` or `aborted` (nothing cancelled), 77 not a workspace admin, 75 network failure or server error (run `agentclash evalset list` before a retry).
115
116### Connectors
117
118```bash
119agentclash connector list --json
120agentclash connector create --name "Support app" --config-file connector.yaml --json
121agentclash connector approve <snapshot-id>
122agentclash connector revoke <snapshot-id>
123```
124
125- Create the workspace secret first. Put its key in the JSON or YAML file.
126- After approval, connector requests send the workspace secret to the external origin.
127- Check the origin, request URL, and secret key name before approval. A hosted connector sends its requests to the endpoint path plus `/agentclash/runs`.
128- Revocation blocks new runs that use the snapshot. The worker checks the approval immediately before it sends each connector request, so later requests stop. A request that passed its check before the revocation can still go out and finish.
129- After secret rotation, create and approve a new snapshot.
130- Never pass `--yes` without approval from the user. Show the user the snapshot ID and effect before you ask.
131- For approval, also show the origin, endpoint, and secret key name.
132
133## Expected Output
134- `workspace create` prints workspace ID and name.
135- `workspace use` / `link` saves defaults and confirms the selected workspace.
136- `members invite` confirms email and role.
137- `--json` on any command returns structured API payloads.
138
139## Failure Modes
140- `organization ID required` on `workspace list` → pass `--org` or set default org via `link` / config.
141- `no workspace specified` on member commands → run `workspace use` or export `AGENTCLASH_WORKSPACE`.
142- `Workspace <id> is not accessible` → token lacks membership; re-auth or pick another workspace.
143- `no fields to update` on update commands → pass at least one changed flag.
144
145## Safety Notes
146- Confirm workspace ID before invites or archival — operations affect the whole team.
147- Never pass `--yes` to `workspace emergency-stop` without the approval of the user. The stop cancels the eval sets of the whole team.
148- Prefer `workspace_viewer` for read-only stakeholders; escalate to `workspace_admin` deliberately.
149- Do not share `AGENTCLASH_TOKEN` in tickets or chat; use per-user device login when possible.
150
151## Report Back Format
152```text
153Org: <id> (<name>)
154Workspace: <id> (<name>, <status>)
155Default workspace: <saved id or none>
156Members: <count or n/a>
157Public packs: <enabled/disabled>
158Doctor ready: <yes/no>
159Next: agentclash quickstart OR agentclash eval start
160```
161
162## Related Skills
163- `agentclash-hub`
164- `agentclash-cli-setup`
165- `agentclash-quickstart`
166- `agentclash-runtime-resources-setup`
167- `agentclash-eval-runner`
168
169## Related Docs
170- `/docs-md/getting-started/quickstart`
171- `/docs-md/reference/cli`
172- `/docs-md/reference/config`