Explains how PermDock decides and routes to the right PermDock skill. Use first for any work with permdock, typed permissions, roles or access control in a TypeScript app, when a check is denied and the reason is unclear, when reading a Decision, denial reason or doctor code, when looking up current PermDock identifiers through the docs MCP, or when choosing between the permdock-wire, permdock-audit, permdock-agents, permdock-approvals, permdock-tenancy, permdock-data and permdock-credentials skills.
Ships in PermDock. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
PermDock is typed permissions for TypeScript apps, APIs, databases and AI agents. Permissions are defined once, decided in process, compiled to queries and RLS, and serialised to client snapshots (for AI agents). This skill holds the model every other PermDock skill assumes, and says which one to load.
permissions.ts, policy.ts and a createPermDock factory file. None means start with permdock-wire.permdock binary runs in the repo (pnpm exec permdock doctor).can() never throws. A Decision is only granted, denied or approval-required.deny wins.permissions.post.update; strings appear only as .key / .scope on the wire, in catalogs and in audit.subjectFrom* resolver or the server session, never from a request body, an unsigned header, a CLI flag or model output.policy.ts and createPermDock never reach a client entry (doctor PD001); clients read snapshots, and a client check is a hint the server repeats.where() and RLS all understand beat closures.Pick the skill. Install the one the task needs with npx skills add ScaleDockHQ/PermDock --skill <name> (or all of them with npx skills add ScaleDockHQ/PermDock, or pnpm exec permdock skills install to match the installed package version):
| Task | Skill |
|---|---|
| Add PermDock, first guard, limits, plans, CLI checks | permdock-wire |
| Review an app or a pull request | permdock-audit |
| Agent tool calls, actors, delegation, A2A, WebMCP | permdock-agents |
| Automations, workflow runs, chat bots and chat commands | permdock-agents |
| Human approval, approvers, quorum, resume, delegation, access reviews | permdock-approvals |
| Approval prompts and notices by email or chat (delivery) | permdock-approvals |
| Named scopes, memberships, ownership, custom roles | permdock-tenancy |
| ORM queries, generated RLS, relationship graphs, parity | permdock-data |
| Access tokens, API keys, service accounts, feed keys, share links | permdock-credentials |
✓ The skill for the task is loaded, and permdock-wire has run first if the app has no factory file.
Look identifiers up, never guess them. Read the owning page through the docs MCP (https://permdock.com/docs/mcp, tools search, list_pages and get_page), or append .md to any https://permdock.com/docs/... URL. Every public name follows the naming convention.
✓ Each identifier written into the app appears on a docs page or in node_modules/permdock.
Read a decision. decide() returns { outcome, denials: [{ reason, ... }], alternatives }. reason is one of the closed list on decisions; alternatives are permissions on the same resource the subject does hold. HTTP adapters answer RFC 9457 Problem Details (errors); for the format, defer to the problem-details spec skill (npx skills add ScaleDockHQ/scaledock-skills --skill problem-details).
For ids without loaded rows, await permdock.decideIds(permission, ids, { data }) loads them through data(ids) and decides each in its own tenant.
✓ Each denial the user asked about is named by its reason.
Explain an unexpected denial. Run permdock.explain(permission, data) in a test or a script. trace.denies[0] is the deny that won (give denies a name so it reads as a rule), trace.allows the allows it overrode, trace.skipped the grants passed over and why (explain). The trace never reaches the decision log. To preview a plan before acting, simulate([[permission, data], ...]) returns every decision.
✓ The cause is a named grant, condition or missing input, not a guess.
Check the project. Run pnpm exec permdock doctor. Each finding has a stable PD0xx code and a one-line fix (doctor); the topic skills name the codes for their area. When an agent runs it, every permdock command prints one JSON result on stdout with the report in data, or one error line on stderr. An error with userActionRequired: true (exit 2, reason input_required, auth_required or confirmation_required) needs input, a login or the person's confirmation: show the person message, and after they agree run the command next gives, with its --yes --effects-digest. Never add --effects-digest or --force on your own (agent mode).
✓ permdock doctor reports no error.
Upgrade across a rename release. After raising permdock to 0.5, run pnpm exec permdock codemod 0.5 --dry-run, then without --dry-run. It renames imported identifiers and lists each call site whose shape changed, and each option or method key to edit by hand, as file:line:column (codemod). Work through that list, then run tsc and the step 5 check.
✓ The codemod's second run reports no changes, and every follow-up it listed is edited.
policy.ts is imported only from server code.permdock-wire, permdock-audit, permdock-agents, permdock-approvals, permdock-tenancy, permdock-data, permdock-credentials, all from npx skills add ScaleDockHQ/PermDock --skill <name>.https://permdock.com/llms.txt.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/permdock:permdockfrom PermDock
npx claudepluginhub scaledockhq/permdock --plugin permdock8 skills in this plugin
/permdock-agentsGuards AI agent tool calls, automations and chat commands with PermDock operations, subjects, actors and delegation. Use when declaring defineOperations, wiring operations in permdock/agent, permdock/ai-sdk, permdock/claude-agent, permdock/openai, permdock/eve or permdock/mcp, gating models or filtering tool results, running published automations with permdock/workflow or permdock/workflow-sdk, protecting chat commands and approval buttons with permdock/chat or permdock/chat-sdk, separating the user (principal) from the agent (actor), declaring a delegation option or policy delegations, publishing an A2A Agent Card with permdock/a2a, registering WebMCP tools with permdock/webmcp, verifying Web Bot Auth signers as actors, or when agent calls are denied with no-delegation or not-delegated./permdock-approvalsRequires human approval on PermDock grants, notifies approvers and resumes the approved call. Use when adding approval to a destructive or money-moving action (delete, publish, pay, refund, transfer), choosing approvers with approval by, user(), relation(), manager(), mode confirm or authorize, quorum, ttl, escalation, staleOn or approvalFingerprint, ordering approvers with combine and stages, covering an approver with an ApprovalDelegation, loading approval rules as data with an ApprovalPolicySource, separating preparer and approver with exclusiveWith, labelling operations with risk and effects meta, mounting approvalsHandler with an ApprovalStore, sending approval emails (approvalEmail) or chat cards (approvalCard, approvalActions) from approvalPrompt, parking a background run on an ApprovalWaiter (pollingApprovalWaiter, workflowSdkWaiter), resuming with the PermDock-Approval header, mapping approval-required to an agent runtime, MCP elicitation or AG-UI interrupt, or fixing doctor PD017, PD018 or PD024./permdock-auditReviews an existing PermDock setup or a pull request that changes it. Use when auditing permissions, reviewing a PR that touches permissions.ts, policy.ts or an adapter guard, finding ungranted or unused leaves, missing human approvals on agent tools, closures that should be portable, validate never, untested grants, or mapping an app to OWASP ASI02 and ASI03. Use whenever the user asks to audit, review or harden PermDock./permdock-credentialsResolves PermDock subjects from access tokens, API keys and share links. Use when verifying OAuth or OIDC access tokens with subjectFromJwt or an introspection response with subjectFromIntrospection, issuing personal access tokens, API keys, service accounts or feed keys with decideCredential and resolving them with subjectFromApiKey, setting tenant key rules (maxTtl, kinds, allowNoExpiry) in a SettingsSource, minting guest or share links with signCapability and resolving them with subjectFromCapability, serving a link through RLS with exchangeCapability, or fixing doctor PD029 and on('auth') causes such as invalid-chain./permdock-dataEnforces PermDock permissions in database queries and Postgres row-level security. Use when listing rows with permdock.where() and filter(), compiling conditions with toWhere from permdock/drizzle, permdock/prisma or permdock/kysely, guarding Convex functions with permdock/convex, generating or verifying RLS with permdock rls generate, verify or migrate, modelling folders, sub-teams or reporting lines with parent and relation() through a RelationSource, prefetchRelations or whoCan, or proving query and database parity with testOrmParity and testRlsParity. Also for doctor PD027, PD028, PD031 and PD032./permdock-tenancyModels tenants, memberships, contacts and support sessions in PermDock. Use when declaring named scopes (organizations, workspaces, customers inside an organization), loading memberships through a MembershipSource, putting a role on one scope, keeping an owner per organization with min, max or transferOnly, controlling who hands out which role with assigns and for, checking a membership change with decideRoleChange, letting tenant admins define custom roles with customRoles and validateCustomRole, giving external customer contacts portal access as kind contact principals found through a PrincipalSource and principalByIdentity, letting support staff view the app as a customer with decideSupportSession, signSupportSession and subjectFromSupportSession, or fixing doctor PD023, PD025 or PD026 and denials such as tenant-mismatch, last-holder, not-assignable-by or reason-required.