Permissions Rbac logo

Permissions Rbac

Organization
vstorm-co
permissions-rbac

Gate a route or a service on who may do it — add a permission, wire a role, decide between require() and resolve_access, share a resource with a grant, or debug "this user can see something they should not" and "a Viewer with an edit grant is being refused". Use for any authorization work, any new org-scoped route, and any review of one. There is no UserRole, RoleChecker or CurrentAdmin in this project.

Overview

Publishervstorm-co
Repositoryagenticos
Skill namepermissions-rbac
Stars
137
Forks
27
Bundled files
1
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by vstorm-co on GitHub. Read the source before you install it.

Installation

Install the Permissions Rbac 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/vstorm-co/agenticos/tree/main/.claude/skills/permissions-rbac
  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/vstorm-co/agenticos.git /tmp/agenticos
mkdir -p .claude/skills
cp -r /tmp/agenticos/.claude/skills/permissions-rbac .claude/skills/permissions-rbac
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Permissions Rbac 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 Permissions Rbac 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 Permissions Rbac 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.

Permissions — three layers, and one rule people get wrong

Read docs/permissions.md for the model and docs/reference/permissions.md for the generated catalog. .claude/rules/exceptions-security.md has the code shapes. This file is what to do and what not to.

Permissions are defined in code; roles are composed from them. Call sites check permissions, never role names, so adding or re-shaping a role never means editing an endpoint.

The rule that gets broken

require(...) gates belong on collection routes, not per-resource ones.

Route shapeGate
GET /agents, POST /agents, GET /agents/capabilitiesdependencies=[Depends(require(Perm.AGENTS_EDIT))]
GET/PATCH/DELETE /agents/{id}, POST /agents/{id}/publishNo route gate. The service calls resolve_access

A role gate cannot see the grants on a row. Put one on a per-resource route and it refuses a Viewer holding an explicit edit grant before resolve_access ever widens their access — which directly contradicts the platform's own promise that a grant widens what a role allows and never narrows it.

tests/api/test_platform_routes.py enforces both halves. If it fails after you added a gate, the gate is the bug.

The two calls

python
# Collection route — a permission, as a route dependency.
@router.post("", dependencies=[Depends(require(Perm.AGENTS_EDIT))])
async def create_agent(ctx: Auth, service: AgentSvc) -> Any: ...

# One row — in the service, never as a route gate.
if not await resolve_access(self.db, ctx, agent, Perm.AGENTS_EDIT, resource_type=AGENT):
    raise AuthorizationError(message="...")

Listings need the third call, or shared rows silently vanish:

python
extra = await visible_resource_ids(db, ctx, resource_type=AGENT, perm=Perm.AGENTS_VIEW)
# None means the role already reaches everything — skip the grant lookup.
# An empty list is NOT the same as None; a context with no subject gets [].

The three layers

  1. users.is_app_admin — the deployment superadmin. CurrentAppAdmin. uv run agenticos cmd create-app-admin <email> [--revoke].
  2. The organization role — owner, admin, builder, operator, member, viewer. Composed from permissions in app/core/permissions.py.
  3. Visibility and grants — a grant on one row, to a person or to a group (docs/directory.md#groups). effective = max(role scope, grant on this resource).

Capability scopes (knowledge:read, web:read, code:execute) are a separate axis, not a fourth layer: they are what an organization allows its agents to do, checked when an agent is assembled rather than per request. See the agent-capability skill.

Resource permissions carry a Scope: none, own, shared, all. It answers the question a role cannot — not "may this role touch agents?" but which agents.

What does not exist

UserRole, User.has_role(), RoleChecker, CurrentAdmin, CurrentSuperuser. The users.role column was dropped before the migration chain was squashed, so there is no revision to point at: 0001_baseline simply creates users without it. Do not reintroduce any of them, and do not add --role to a CLI command. Authority inside an organization is a membership row plus this catalog.

Only two user aliases exist: CurrentUser and CurrentAppAdmin. Anything org-scoped goes through Auth (AuthContext) plus a permission.

Adding a permission

  1. Add to Perm in app/core/permissions.py.
  2. Add it to every role in the matrix that should have it — with a Scope if it is a resource permission.
  3. Gate the collection routes; hand per-resource decisions to a service.
  4. Test the refusal, and test it cross-tenant. Most of this platform's value is in what it refuses.
  5. The frontend reads the effective permission set — check what it hides, and add an integration test that a button is actually gone (see the frontend-feature and e2e-tests skills).

Always test

  • Tenant isolation — unreachable from another organization including when the caller owns the row.
  • A grant widening, not promoting — a Viewer with an edit grant on one agent edits that agent and nothing else.
  • A context with no subject — API key, embed session, channel run. See docs/permissions.md#contexts-with-no-subject.

Depth

references/catalog.md — the permission list, the role matrix, and how resolve_access decides.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Permissions Rbac AI skill do?

Gate a route or a service on who may do it — add a permission, wire a role, decide between require() and resolve_access, share a resource with a grant, or debug "this user can see something they should not" and "a Viewer with an edit grant is being refused". Use for any authorization work, any new org-scoped route, and any review of one. There is no UserRole, RoleChecker or CurrentAdmin in this project.

Why use Permissions Rbac on TypingMind?

Because you install it once and use it with any model. Permissions Rbac 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 Permissions Rbac in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vstorm-co/agenticos/tree/main/.claude/skills/permissions-rbac. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Permissions Rbac?

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 Permissions Rbac?

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

Is the Permissions Rbac AI skill free?

Yes. It is published on GitHub by vstorm-co 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 👇