Agent skill

Authorization Model

by PlamenTSV in PlamenTSV/plamen

Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-state-trace, depth-external

MITAuto-check passedBackend & APIs

Install Authorization Model

skills CLI
$ npx skills add PlamenTSV/plamen --skill authorization-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PlamenTSV/plamen authorization-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/daml/authorization-model .claude/skills/authorization-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
authorization-model
GitHub stars
303
Token cost
~1.8k tokens
SKILL.md length
705 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-state-trace, depth-external

  • Works in 5 steps: Choice-Authority Inventory → Controller-Source Trace (privilege… → In-Body Validation Enumeration → …
  • Pattern Always required for DAML audits - Inject Into Breadth agents
  • SKILL.md covers 1. Choice-Authority Inventory, 2. Controller-Source Trace…, 3. In-Body Validation… and 4. Guard / Whitelist / Flag…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Authorization Model is an agent skill from PlamenTSV/plamen. Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-state-trace, depth-external

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Authorization and RBAC. The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.

When your agent uses it

  • Pattern Always required for DAML audits - Inject Into Breadth agents
  • Depth-state-trace

Example prompts

  • “/authorization-model”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Choice-Authority Inventory
  2. Controller-Source Trace (privilege injection)
  3. In-Body Validation Enumeration
  4. Guard / Whitelist / Flag Bypass
  5. Fetch-Based Auth Bypass

What it can do on your machine

Read from SKILL.md and the folder at commit 795962b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Authorization Model loads about 1.8k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 705 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 705 words, ~1,760 tokens.

Download SKILL.mdSave it as .claude/skills/authorization-model/SKILL.md (or your agent's skills folder).
name
authorization-model
description
Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-state-trace, depth-external

AUTHORIZATION_MODEL Skill (DAML)

Trigger Pattern: Always required for DAML audits Inject Into: Breadth agents, depth-state-trace, depth-external Finding prefix: [DML-AM-N] Rules referenced: R4, R6, R12, R13

DAML's authorization model has no msg.sender. Authority flows through the transaction tree: the required authorizers of every node MUST be a subset of the parties who authorized the submission. A create requires the new contract's signatory parties; an exercise/fetch requires the choice's controller parties; an archive requires the signatories. Signatory authority propagates exactly ONE hop into a choice's consequences. The most common critical bug class is a choice whose controller is derived from a choice argument (privilege injection), or a choice that performs a privileged action with only one authorizer where joint authorization is required.

1. Choice-Authority Inventory

For EVERY choice in each template, record who must authorize it and what it does:

Template.ChoiceConsume-ModeController ExprController SourcePrivileged Action?Co-Auth Required?
{T.C}consuming/nonconsuming/pre/postconsuming{controller expr}FIXED-SIGNATORY / ARG-DERIVED / FETCHEDYES/NOYES/NO

Critical patterns to flag:

  • A choice that moves value, changes ownership, or updates config but lists only ONE controller where the action affects multiple parties (single-where-joint → [ELEVATE:MISSING_COAUTH]).
  • A controller expression that reads a field of the choice argument rather than a template signatory/fixed party (privilege injection → [ELEVATE:PARAM_CONTROLLER], ALWAYS flag).

DAML note: controller p makes p the required authorizer AND an automatic observer. A controller derived from arg.someParty lets the caller name themselves as the authorizer — there is no msg.sender to constrain it.

2. Controller-Source Trace (privilege injection)

For each choice whose controller is NOT a fixed template signatory, trace where the controlling party comes from:

Template.ChoiceController Party OriginBound to Template Signatory?Attacker Can Set It?Finding?
{T.C}arg.X / this.field / fetch(...).fieldYES/NOYES/NO[DML-AM-N] if attacker-settable

Attack: If controller resolves from a value the caller supplies (choice argument, or a field of a contract the caller created), the caller authorizes their own privileged action. Compare against the intended authority from the AUTHORIZATION MATRIX in attack_surface.md.

ARG-DERIVED controller is ALWAYS a finding candidate — it must be proven safe (the arg is itself constrained by a prior signatory check) before it is dismissed.

3. In-Body Validation Enumeration

A correct controller does NOT replace in-body checks. Enumerate the validation each choice performs against its controller:

Template.ChoiceControllerIn-Body Check Present?Check ExprSufficient?
{T.C}{party}YES/NOassertMsg "..." (owner == ctl) / NONEYES/NO

Check for:

  • A choice that lets ANY party be the controller but then acts on this.owner without asserting owner == controllingParty (missing owner == party).
  • A choice that updates a per-party balance/position but does not bind the controller to the affected party.
  • Reliance on the controller alone where the choice consequences touch parties the controller should not be able to affect.
Show full SKILL.md (260 more words)Show less

4. Guard / Whitelist / Flag Bypass

Enumerate every conditional that gates a privileged path:

Template.ChoiceGuard ExprGuard SourceBypassable?Finding?
{T.C}when (paused == False) / elem p whitelisttemplate field / arg / fetchedYES/NO[DML-AM-N] if bypass

Patterns:

  • A flag (paused, frozen, active) read from a contract the caller can re-create with a forged value.
  • A whitelist membership test against a list supplied as a choice argument rather than a signed template field.
  • A guard short-circuited by an alternative choice on the same template that reaches the same consequence without the guard.

5. Fetch-Based Auth Bypass

A fetch/fetchByKey returns a contract that the choice may branch on for an authorization decision. If the fetched contract is not bound to a trusted signatory, the caller can forge it.

Template.ChoiceFetched TemplateAuth Decision On Fetched Field?Fetched Contract Signed By Trusted Party?Finding?
{T.C}{T2}YES/NOYES/NO[DML-AM-N] if unbound

Attack: A choice fetches a Config/Role/Approval contract and grants access based on a field, but the caller can create that contract themselves (they are a signatory of it). The auth decision rests on attacker-controlled state. Verify the fetched contract's signatories include the party whose authority the decision relies on ([ELEVATE:FETCH_AUTH]).

Finding Template

markdown
**ID**: [DML-AM-N]
**Severity**: [Critical if value/ownership, High if config/co-auth, Medium if view-privileged]
**Step Execution**: ✓1,2,3,4,5 | ✗(reasons) | ?(uncertain)
**Rules Applied**: [R4:✓/✗, R6:✓/✗, R12:✓/✗, R13:✓/✗]
**Location**: {Module}.daml:LineN (template X, choice Y)
**Title**: {Choice} controller derived from argument / missing co-authorization allows unauthorized {action}
**Description**: [Specific authority gap with the controller expr, what the tx tree requires, and why the caller can satisfy it alone]
**Impact**: [What the unauthorized party achieves: takes a contract, moves value, becomes admin, bypasses a guard]
**PoC steer**: `submit attacker (exerciseCmd cid Choice with ...)` SUCCEEDS + harm assertion; a passing `submitMustFail` instead proves SAFETY (refutes).

Step Execution Checklist (MANDATORY)

SectionRequiredCompleted?Notes
1. Choice-Authority InventoryYES✓/✗/?Every choice in every template
2. Controller-Source TraceYES✓/✗/?Every ARG-DERIVED / fetched controller
3. In-Body Validation EnumerationYES✓/✗/?owner==party and per-party binding
4. Guard / Whitelist / Flag BypassIF guards present✓/✗(N/A)/?Every privileged conditional
5. Fetch-Based Auth BypassIF auth decision on fetched contract✓/✗(N/A)/?Verify fetched signatory binding

© PlamenTSV, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agents/skills/daml/authorization-model of PlamenTSV/plamen.

Open the folder on GitHubat commit 795962b

Compare with similar skills

Authorization Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Authorization Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Authorization Model this skillPlamenTSV/plamen303—~1.8kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
K8s Security PoliciesCybereason-Public/owLSM28011 repos~2kAutomated safety check: PassGPL-2.0
Payloadpayloadcms/payload45k5 repos~6.2kAutomated safety check: PassMIT
Convex Setup Authspokvulcan/poker-planning1148 repos~1.8kAutomated safety check: PassMIT
UI Auditbagofwords1/bagofwords458—~2.9kAutomated safety check: PassCustom licence

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • K8s Security Policies

    Cybereason-Public/owLSM

    Comprehensive guide for implementing NetworkPolicy, PodSecurityPolicy, RBAC, and Pod Security Standards in Kubernetes.

    280 GitHub starsUsed in 11 repos~2k tokens
    Backend & APIsAuto-check passed
  • Payload

    payloadcms/payload

    A skill your agent uses when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API).

    45k GitHub starsUsed in 5 repos~6.2k tokens
    Backend & APIsAuto-check passed
  • Convex Setup Auth

    spokvulcan/poker-planning

    Sets up Convex auth, identity mapping, and access control. An agent skill from spokvulcan/poker-planning.

    114 GitHub starsUsed in 8 repos~1.8k tokens
    Backend & APIsAuto-check passed
  • UI Audit

    bagofwords1/bagofwords

    Exhaustively audit the UI control by control and role by role — enumerate every button, link, and input on a set of pages, write down what each is supposed to do (derived from the handler code and…

    458 GitHub stars~2.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Ccb Diagnose

    SeemSeam/claude_codex_bridge

    Diagnose a named CCB agent by combining authoritative runtime and job lineage with deep read-only pane inspection, apply bounded recovery when evidence supports it, verify the result, and request…

    3.5k GitHub stars~2.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from PlamenTSV/plamen

All 87 skills in this repo
  • Audit Prep

    PlamenTSV/plamen

    Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…

    303 GitHub stars~3.7k tokensUpdated 11 days ago
    Auto-check passed
  • Verification Protocol

    PlamenTSV/plamen

    Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)

    303 GitHub stars~3.5k tokensUpdated 11 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.3k tokensUpdated 11 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.2k tokensUpdated 11 days ago
    Auto-check passed
  • Account Lifecycle

    PlamenTSV/plamen

    Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.2k tokensUpdated 11 days ago
    Auto-check passed
  • Account Validation

    PlamenTSV/plamen

    Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.7k tokensUpdated 11 days ago
    Auto-check passed

Categories

Questions about Authorization Model

What does Authorization Model do?

Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-state-trace, depth-external. Authorization Model is an agent skill from PlamenTSV/plamen.

When should I use Authorization Model?

Authorization Model fits situations like: pattern Always required for DAML audits - Inject Into Breadth agents; depth-state-trace.

How do I install Authorization Model in Claude Code?

Run `npx skills add PlamenTSV/plamen --skill authorization-model -a claude-code`. Or copy the skill folder (agents/skills/daml/authorization-model in PlamenTSV/plamen) into .claude/skills/authorization-model in your project. Claude Code loads it when a task matches its description.

How do I install Authorization Model in Codex?

Run `npx skills add PlamenTSV/plamen --skill authorization-model -a codex`. Or copy the skill folder (agents/skills/daml/authorization-model in PlamenTSV/plamen) into .agents/skills/authorization-model in your project. Codex loads it when a task matches its description.

Can I use Authorization Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PlamenTSV/plamen --skill authorization-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/authorization-model, .gemini/skills/authorization-model, .github/skills/authorization-model and .opencode/skills/authorization-model in your project.

What does Authorization Model need to run?

SKILL.md names no scripts, command-line tools or credentials: Authorization Model is instructions for the agent only.

Does Authorization Model access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Authorization Model safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Authorization Model use?

Authorization Model is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Authorization Model use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Authorization Model?

Skills that share tags, products or a category with Authorization Model: Configuring Horizon (coollabsio/coolify, 63k stars), K8s Security Policies (Cybereason-Public/owLSM, 280 stars), Payload (payloadcms/payload, 45k stars) and Convex Setup Auth (spokvulcan/poker-planning, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Authorization Model?

PlamenTSV (a GitHub user) maintains it in PlamenTSV/plamen, which has 303 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 26, 2026.

Source: PlamenTSV/plamen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.