Authorization logo

Authorization

Community
nahid-sparktales
authorization

Decide what an authenticated caller may do — pick the permission model, put the check at one enforcement point close to the data, and default to deny. Use when adding roles or permissions, scoping data per tenant or per owner, building an admin-only path, reviewing an endpoint that trusts a client-supplied id, or when someone reports seeing data that is not theirs. Not for establishing identity (that is authentication), and hiding a control in the UI is never the enforcement.

Overview

Publishernahid-sparktales
Repositoryagent-dispatcher
Skill nameauthorization
Stars
58
Forks
5
Bundled files
1
LicenseMIT
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 nahid-sparktales on GitHub. Read the source before you install it.

Installation

Install the Authorization 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/nahid-sparktales/agent-dispatcher/tree/main/skills/backend/authorization
  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/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/backend/authorization .claude/skills/authorization
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Authorization 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 Authorization 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 Authorization 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.

Authorization

Authentication says who is calling. Authorization says what that caller may do to this resource. Being logged in is not a permission, and a hidden button is not a check — the request still leaves the browser exactly the same way.

When this fires

A rule of the form "only X may do Y to Z" is being added, changed, or doubted. Roles, admin areas, per-owner or per-tenant data, sharing, feature gating that carries money or privacy. Also fires on any report that a caller reached a resource they should not have.

Procedure

  1. Write the rule as one sentence: who may do what action to which resource, under what condition. If it will not fit in a sentence, either the model is wrong or there are two rules. Do this before opening an editor — most authorization bugs are unwritten rules.
  2. Choose the smallest model the rules need. A handful of fixed roles → a role check. Rules that read the resource (owner, tenant, state, amount) → an attribute or ownership check. "A may see it because B shared it" → a relationship check. Do not stand up a policy engine for three roles; do not fake relationships with an ever-growing enum.
  3. Reuse the existing mechanism. Grep for the project's guard, policy, can/ability helper, route middleware, decorator, or database row-level security. A second authorization system beside the first is where the gap will be.
  4. Put the check as close to the data as it can go, once. Ownership and tenant scoping belong in the query itself — or in row-level security — not in a filter applied after the rows come back. A post-fetch filter has already loaded the row, often logged it, and will be skipped by the next query someone writes.
  5. Default deny. The check allows only on an explicit match. Unknown role, absent tenant, null owner, a new enum value, an endpoint added next month: all deny. If a new route is permitted by default, the model is inverted.
  6. Enumerate every entry point to the resource, not the one in the ticket. Routes, batch and bulk endpoints, GraphQL resolvers and nested fields, background jobs, webhooks, CSV export, admin scripts, internal service calls. The classic hole is an endpoint that takes an id list and checks only the first, or an "internal" service that trusts its caller.
  7. Never trust client-supplied identity or scope. A user id, tenant id, role or permission arriving in a body, query string, path or header is input, not fact. Derive them from the authenticated principal. Accepting ?userId= is not authorization, it is a parameter.
  8. Choose the refusal deliberately and apply it consistently. 403 when the resource's existence is not itself sensitive; 404 when it is. Mixing them across neighbouring endpoints leaks exactly the fact the 404 was meant to hide.
  9. Mirror the rule in the UI after the server enforces it, never instead. Hiding a control is usability, so users do not walk into refusals. It changes nothing an attacker can reach.
  10. Log the decision, not the payload: principal, action, resource id, allow or deny. Denials are what an investigation reads; bodies are what a breach report quotes.
  11. Write the negative tests — they are the deliverable. For each rule: the permitted caller succeeds, and each non-permitted caller is refused, including the neighbouring tenant and the anonymous caller. A rule tested only from the allowed side is untested.
  12. A change to an existing rule moves real people in or out. Widening access on a live system, or removing a role someone currently holds, stops and asks first, and the report names who gains or loses access. Silent widening is the failure this step exists to prevent.

Checklist

  • Each rule written as a sentence before implementation
  • Model chosen deliberately; no policy engine for three roles
  • Existing mechanism reused, or the absence of one confirmed
  • Enforcement is in the query or the closest layer to the data, not a post-fetch filter
  • Deny is the default for unknown roles, missing scope, and new routes
  • Every entry point to the resource enumerated, including jobs, exports and bulk endpoints
  • No identity, tenant or role taken from client-controlled input
  • 403 vs 404 chosen once and applied consistently
  • UI mirrors the rule; it does not implement it
  • Allow and deny decisions logged with principal, action and resource
  • Negative tests exist per rule, including the cross-tenant caller
  • Any widening of access on a live system was asked about before it shipped

Failure handling

  • A user saw data that is not theirs — treat it as a scoping defect, not a UI bug. Find every caller of the query, not only the screen in the report; the same unscoped query is usually reachable from three places. Fixing one leaves the others open.
  • The check is in the wrong layer and moving it is large — say so and size it rather than adding a second check at the new layer. Two enforcement points that can disagree are worse than one in an awkward place.
  • The rules contradict each other — do not invent a precedence. Name the conflict and the people or documents that can settle it, and leave the stricter behaviour in place meanwhile.
  • No way to test as another tenant or role — that is a finding. Report the rule as implemented but unverified and name exactly which caller could not be exercised. Never call an access rule verified because you read it.

Evidence to report

Each rule as a sentence, next to the file and function that enforces it; the model chosen and what it excludes; the list of entry points checked, including the ones found beyond the ticket; the negative tests and their output; who gains or loses access if the change is a rule change; and the callers or paths that could not be exercised.

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 Authorization AI skill do?

Decide what an authenticated caller may do — pick the permission model, put the check at one enforcement point close to the data, and default to deny. Use when adding roles or permissions, scoping data per tenant or per owner, building an admin-only path, reviewing an endpoint that trusts a client-supplied id, or when someone reports seeing data that is not theirs. Not for establishing identity (that is authentication), and hiding a control in the UI is never the enforcement.

Why use Authorization on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/backend/authorization. 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 Authorization?

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 Authorization?

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

Is the Authorization AI skill free?

Yes. It is published on GitHub by nahid-sparktales under the MIT 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 👇