Users

From agent0ai/space-agent · View interactive version

Users is an AI agent skill from the GitHub repository agent0ai/space-agent. Create, update, remove, and explain user accounts, password verifiers, sessions, and user-root storage as an admin.

How to use this skill

Skill file

Use this skill for concrete user-account work.

First Check

Canonical User Tree

There is no separate user registry file. The watched user index is derived from files under L2/<username>/.

Path Rules

Create A User

Use a normalized username segment such as alice, ops_bot, or qa-team-1.

const username = "alice";
const fullName = "Alice Example";
const password = "replace-me";

const verifier = await space.api.call("password_generate", {
  method: "POST",
  body: { password }
});

return await space.api.fileWrite({
  files: [
    { path: `L2/${username}/` },
    { path: `L2/${username}/mod/` },
    {
      path: `L2/${username}/user.yaml`,
      content: space.utils.yaml.stringify({ full_name: fullName })
    },
    {
      path: `L2/${username}/meta/password.json`,
      content: `${JSON.stringify(verifier, null, 2)}\n`
    },
    {
      path: `L2/${username}/meta/logins.json`,
      content: "{}\n"
    }
  ]
});

Update User Metadata

Read user.yaml, parse it, mutate the fields you need, and write it back.

const path = "L2/alice/user.yaml";
const current = await space.api.fileRead(path);
const config = space.utils.yaml.parse(current.content || "");
config.full_name = "Alice Example";
return await space.api.fileWrite(path, space.utils.yaml.stringify(config));

Reset A Password

Generate a fresh sealed verifier first, then overwrite meta/password.json.

const verifier = await space.api.call("password_generate", {
  method: "POST",
  body: { password: "new-password" }
});

return await space.api.fileWrite(
  "L2/alice/meta/password.json",
  `${JSON.stringify(verifier, null, 2)}\n`
);

Revoke Sessions

Overwrite L2/<username>/meta/logins.json with {}.

return await space.api.fileWrite("L2/alice/meta/logins.json", "{}\n");

When resetting a password, prefer writing the new verifier and clearing logins.json in the same batch. Do not attempt to preserve or invent individual session entries.

Remove A User

Deleting L2/<username>/ removes the local account tree:

return await space.api.fileDelete("L2/alice/");

Deleting a user root does not rewrite L1/*/group.yaml automatically. If the user should disappear from memberships or manager lists too, load admin-user-management/groups and remove that username from the affected group configs.

Guest Accounts

CLI Reference

Backend equivalents exist for operators outside the browser:

From the overlay agent, prefer the browser APIs above.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.