User Group Administration logo

User Group Administration

Organization
serac-labs
user-group-administration

Manage the principals ACLs apply to — sys_user, sys_user_group, sys_user_grmember and sys_user_has_role. Group before membership, inherited versus direct roles, why removing a role does not always remove the access, and deactivate rather than delete.

Overview

Publisherserac-labs
Repositoryserac
Skill nameuser-group-administration
Stars
77
Forks
28
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by serac-labs on GitHub. Read the source before you install it.

Installation

Install the User Group Administration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/serac-labs/serac/tree/main/packages/skills/user-group-administration
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serac-labs/serac.git /tmp/serac
mkdir -p .claude/skills
cp -r /tmp/serac/packages/skills/user-group-administration .claude/skills/user-group-administration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable User Group Administration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads User Group Administration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so User Group Administration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Users, Groups and Roles

acl-security teaches the rules. This teaches the things the rules apply to. Without it an agent asked to "add Sam to the change team" writes a background script against sys_user_grmember, which works right up until it silently creates a second membership row.

Four tables

TableHolds
sys_userpeople
sys_user_groupgroups
sys_user_grmemberone row per (user, group) membership
sys_user_has_roleone row per (user, role) grant — direct and inherited

There is no list of members on the group and no list of roles on the user. Both are join tables, and both are where the work happens.

Order of operations

Group before membership, role before grant. Every one of these is a reference field with no auto-create behind it:

javascript
// 1. the group
const grp = await snow_role_group_manage({ action: "create_group", name: "Database — Change",
                                           manager: managerSysId, description: "Owns DB change approvals" })

// 2. then people into it — takes sys_id, username OR email, so no lookup step
await snow_manage_group_membership({ action: "add", group_identifier: "Database — Change",
                                     user_identifier: "sam.patel@example.com" })

// 3. and a role onto the group, so membership grants it
await snow_role_group_manage({ action: "assign_role", role: roleSysId, group: grp.sys_id })

snow_manage_group_membership checks for an existing membership before inserting, which a hand-written GlideRecord.insert() does not. Duplicate sys_user_grmember rows do not break access — they break removal, because the remove path deletes one row and the user is still a member.

Inherited versus direct: the part that bites

A role reaches a user two ways, and sys_user_has_role holds both:

  • Direct — a row with inherited = false, created when someone grants the role to the person.
  • Inherited — a row with inherited = true, created by the platform when the user joins a group that has the role, or when a role the user holds contains another role.

snow_get_user_roles returns every row on sys_user_has_role for the user, with display values. Read the inherited flag on each one before concluding anything:

javascript
const roles = await snow_get_user_roles({ user_id: userSysId })
const direct = roles.roles.filter((r) => r.inherited === "false")

This is why removing a role does not always remove the access. Revoke the direct grant and the user still holds the role, because a group they are in also grants it — the inherited row is untouched and was never yours to delete. Two rules follow:

  1. Before revoking, look at all the rows for that role. If any is inherited=true, the fix is group membership, not the grant.
  2. Never delete an inherited=true row by hand. The platform maintains those; it will recreate them, and in the meantime access does not change.

Role containment compounds this: itil_admin contains itil, so granting the first produces an inherited itil row as well. Someone who "only has itil_admin" has both.

One caution on assign_role with a group

snow_role_group_manage({ action: "assign_role", group }) writes its row to sys_user_has_role. On a stock instance the group→role join is sys_group_has_role, so verify what landed before you rely on it:

javascript
await snow_query_table({ table: "sys_group_has_role", query: "group=" + grp.sys_id, fields: "role,inherited" })

If that comes back empty after the call, grant the role to the group in the UI (Group → Roles related list) instead and use the tool only for user grants.

Deactivate, never delete

snow_user_manage({ action: "deactivate", user_id }) sets active = false. That is the only removal the tool offers, deliberately.

A sys_user record is referenced from every task the person ever touched — opened_by, assigned_to, sys_created_by, every journal entry, every approval. Deleting it leaves those references dangling and the history unreadable. Deactivating it blocks login, drops the user out of assignment lookups, and keeps every reference intact.

Deactivation does not remove group memberships or roles. Those rows stay, which is correct — if the person returns, or if an audit asks what access they had in March, the answer is still there. If access must be provably gone as well, remove the memberships explicitly:

javascript
const groups = await snow_query_table({ table: "sys_user_grmember", query: "user=" + userSysId,
                                        fields: "group" })
for (const row of groups.records) {
  await snow_manage_group_membership({ action: "remove", user_identifier: userSysId,
                                       group_identifier: row.group.value })
}
await snow_user_manage({ action: "deactivate", user_id: userSysId })

Same for groups: a group with history should be deactivated (active = false), not deleted. Deleting one orphans every sys_user_grmember row pointing at it and every assignment that used it.

Reading before writing

Two queries answer most "who can do X" questions without changing anything:

javascript
// everyone in a group, with details
await snow_manage_group_membership({ action: "list", group_identifier: "Database — Change" })

// every group a user is in
await snow_query_table({ table: "sys_user_grmember", query: "user=" + userSysId, fields: "group" })

Related

  • acl-security — what the roles are checked against.
  • instance-security — instance-level hardening; a different subject from who holds what.
  • domain-separation — on a domain-separated instance, a group and its members live in a domain, and a membership across domains does not do what it looks like.

Frequently asked questions

What does the User Group Administration AI skill do?

Manage the principals ACLs apply to — sys_user, sys_user_group, sys_user_grmember and sys_user_has_role. Group before membership, inherited versus direct roles, why removing a role does not always remove the access, and deactivate rather than delete.

Why use User Group Administration on TypingMind?

Because you install it once and use it with any model. User Group Administration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install User Group Administration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/serac-labs/serac/tree/main/packages/skills/user-group-administration. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use User Group Administration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with User Group Administration?

As many as you like. As long as a model supports skills, you can use User Group Administration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the User Group Administration AI skill free?

Yes. It is published on GitHub by serac-labs under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇