scaledock-agent-permissions
Skill1 starsChanged 31 days agoMITView on GitHub
Give AI agents least-privilege, auditable access in a ScaleDock product using A2A, WebMCP, AG-UI, AP2, Web Bot Auth and the OWASP Top 10 for Agentic Applications, with PermDock deciding every tool call, delegation and human approval, and OpenTelemetry GenAI, OCSF and EU AI Act record-keeping for the audit trail. Use when an agent calls your tools, when you publish an Agent Card, register WebMCP tools, stream approvals to a UI, let agents pay, verify bot traffic, or review agent security.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Follow the workflow below step by step: Only wire the surfaces the product has.
- Very specific: line 56
Test and audit: Add scenario tests for delegation, denial and approval with permdock/testing, then run audit-permissions from …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ScaleDock agent permissions
Agents act for users, so every agent surface needs to know who the user is, which agent is acting, what the user delegated, and when a human must confirm. This skill wires the agent protocols into a ScaleDock product with PermDock deciding each step, and keeps an audit trail that answers "who did what, on whose behalf". The spec skills carry the rules of each protocol.
Follow the workflow below step by step. Only wire the surfaces the product has; each step names the input that switches it on.
Inputs (fill in, or ask before starting)
- Agent runtimes: AI SDK, Claude Agent SDK, OpenAI Agents SDK, Eve, MCP (then also
scaledock-mcp-server). - Agent-facing surfaces: A2A agent (yes or no), WebMCP tools in the web app (yes or no), AG-UI chat UI (yes or no), agent payments with AP2 (yes or no), bot traffic over plain HTTP (Web Bot Auth, yes or no).
- Delegation: what the user hands the agent (scopes,
authorization_details) and for how long. - Approval store and approvers: who may confirm destructive or money-moving actions.
- Audit: where decision events go (OpenTelemetry, a SIEM in OCSF, both), and whether the EU AI Act applies.
Skills to install
npx skills add ScaleDockHQ/scaledock-skills --skill owasp-agentic --skill opentelemetry-genai
npx skills add ScaleDockHQ/scaledock-skills --skill a2a --skill webmcp --skill ag-ui --skill ap2 --skill web-bot-auth # the surfaces you selected
npx skills add ScaleDockHQ/scaledock-skills --skill ocsf --skill eu-ai-act --skill openfeature --skill cedar # when they apply
npx skills add ScaleDockHQ/PermDockInvariants
- The spec skills win on protocol details. Agent Cards follow
a2a; page tools followwebmcp; UI events followag-ui; mandates followap2; request signatures followweb-bot-auth; span names followopentelemetry-genai. - Principal and actor are separate. The user is the principal, the agent is the actor. Both come from verified transport auth or the host session, never from a task body, tool argument or model output.
- Delegation is explicit. An agent gets only what the user delegated, intersected with what the user may do. An actor with no delegation is denied everything.
- Destructive and money-moving actions wait for a human. Grants on delete, publish, pay, approve, refund and access changes carry
approval, the requester cannot approve their own request, and AP2 mandates never replace that approval. - Every decision is recorded. Each tool call produces a decision event with principal, actor, permission, outcome and reason, nested under the GenAI
execute_toolspan. - Flags select, they never grant. OpenFeature may pick which declared role or plan applies; a flag never turns a denial into a grant.
- One policy language in the app. PermDock policies are the source of truth. Cedar sits next to them only where an external gateway already evaluates Cedar; both use deny-overrides-permit, so keep the two in step rather than translating one into the other.
Workflow
- Set the inputs and threat-model. Walk the
owasp-agenticchecklist for each selected surface, focusing on tool misuse and identity and privilege abuse. ✓ Every surface has a named principal source, actor source and delegation. - Tool calls. For each runtime, use the matching PermDock adapter (
permdock/ai-sdk,permdock/claude-agent,permdock/openai,permdock/eve,permdock/mcp) withsubject,actor,delegationand one permission per tool. Followwire-permdock. ->references/stack.md✓ A tool the user has not delegated is denied, and a destructive tool returnsapproval-required. - Agent-facing surfaces. A2A: generate the Agent Card and extended card with
permdock/a2aand protect each skill. WebMCP: register only snapshot-allowed tools withpermdock/webmcp. AG-UI: surfaceapproval-requiredas the protocol's human-in-the-loop events. AP2: treat mandates as evidence attached to an approval, not as the approval. Web Bot Auth: enablewebBotAuthon the HTTP adapter so a verified signer becomes the actor. ✓ Each selected surface passes its spec skill's Verify list. - Approvals. Mount
approvalsHandlerfrompermdock/approvalswith a durable store, pass the store to every adapter, and resume with thePermDock-Approvalheader. ✓ An approval resumes only the exact call it was issued for, by a distinct approver. - Audit trail. Instrument with
instrumentfrompermdock/otelso decisions nest underexecute_toolspans; export decision events as OCSF when a SIEM needs them. If the EU AI Act applies, map the logging and human-oversight obligations ineu-ai-actto these events. ✓ For any tool call you can answer who asked, which agent acted, what was decided and who approved. - Test and audit. Add scenario tests for delegation, denial and approval with
permdock/testing, then runaudit-permissionsfromScaleDockHQ/PermDock(it reports OWASP ASI02 and ASI03 per adapter). ✓ Tests pass and the audit has no blocker.
Verify before done
- No agent surface reads a subject, tenant or actor from model-controlled input.
- Every agent adapter sets
delegation, and it lists scopes, not the principal's whole role. - Every destructive or money-moving tool returns
approval-required, and self-approval is refused. - Every selected spec skill's Verify list passes.
- Decision events carry principal, actor, permission, outcome and reason, and
pnpm verifypasses.
Reference index
references/stack.md: each spec mapped to the PermDock adapter and the audit trail.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- a2aSkill
- ag-uiSkill
- ap2Skill
- asyncapiSkill
- authzenSkill
- cedarSkill
- cloudeventsSkill
- eu-ai-actSkill
- fapiSkill
- gnapSkill
- jwtSkill
- mcp-authorizationSkill
- oauthSkill
- ocsfSkill
- openapi-arazzoSkill
- openapi-overlaySkill
- openapiSkill
- openfeatureSkill
- openid4vcSkill
- openid-connectSkill
- openid-federationSkill
- openidSkill
- opentelemetry-genaiSkill
- owasp-agenticSkill
- problem-detailsSkill
- ratelimit-headersSkill
- scaledock-enterprise-identitySkill
- scaledock-http-apiSkill
- scaledock-mcp-serverSkill
- scaledock-repo-standardSkill
- scimSkill
- shared-signalsSkill
- spiffeSkill
- standard-schemaSkill
- typespecSkill
- web-bot-authSkill
- webmcpSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

