scaledock-http-api
Skill1 starsChanged 31 days agoMITView on GitHub
Build or review a ScaleDock HTTP API that follows OpenAPI 3.2, OpenAPI Overlay, RFC 9457 Problem Details, the RateLimit header fields and Standard Schema, with PermDock guarding every procedure and writing the OpenAPI security. Use when adding or changing the api surface, publishing an OpenAPI document, adding security schemes or scopes to it, standardising API errors or 429 responses, or reviewing an API against these specs.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are 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.
4
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: Read the installed oRPC, Hono and PermDock docs before you configure anything.
- Very specific: line 34
The spec skills win on format details: Document structure follows openapi.
- Very specific: line 35
Contract first, one schema library: Every procedure lives in packages/contract with Valibot schemas, which are Standard Schema.
- Very specific: line 43
Set the inputs and read the docs: Read scaledock-repo-standard references/api.md, the installed oRPC OpenAPI docs, and the PermDock orpc …
- Very specific: line 54
Test and audit: Add a policy matrix with permdock/testing, a contract test per error type, 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 HTTP API
An API whose contract, document, errors and limits all follow open specs, with PermDock as the one place that decides access and writes the security part of the OpenAPI document. The spec skills carry the rules of each standard; this skill says how they fit the ScaleDock stack.
Follow the workflow below step by step. Read the installed oRPC, Hono and PermDock docs before you configure anything.
Inputs (fill in, or ask before starting)
- Repo: an existing ScaleDock repo with an
apisurface, or a new one (then runscaledock-repo-standardfirst). - Authorization server: Supabase Auth's OAuth 2.1 server (default), or another issuer the user names.
- Quotas: which procedures have rate or usage limits, if any.
- Event-driven APIs or design-first specs: whether the repo also publishes AsyncAPI documents or authors in TypeSpec.
Skills to install
npx skills add ScaleDockHQ/scaledock-skills --skill openapi --skill openapi-overlay --skill problem-details --skill ratelimit-headers --skill standard-schema
npx skills add ScaleDockHQ/PermDockOptional companions: openapi-arazzo (multi-step workflows), asyncapi (event-driven APIs), typespec (design-first authoring). scaledock-repo-standard (its references/api.md and references/architecture.md) owns the app layout: Hono shell, oRPC contract in packages/contract, Scalar, the committed OpenAPI snapshot.
Invariants
- The spec skills win on format details. Document structure follows
openapi; Overlay shape followsopenapi-overlay; error bodies followproblem-details; 429 responses followratelimit-headers. - Contract first, one schema library. Every procedure lives in
packages/contractwith Valibot schemas, which are Standard Schema; the OpenAPI document is generated from the contract, never written by hand. - PermDock guards every procedure. oRPC procedures use
protectfrompermdock/orpc; plain Hono routes usepermdock/hono. A denial is a 403 Problem Details object; an anonymous call is a 401 withWWW-Authenticate. - PermDock owns
security.permdock openapi emitwrites the security schemes, scopes and per-operationsecurityfrom the permission catalog. No other tool writessecurityon the same operations. - Quotas spend through
decideorassert. Alimitgrant needs aLimitStore; an exhausted limit becomes a 429 withRetry-Afterand the RateLimit fields. - The document is a checked artifact. The committed snapshot validates against the official OpenAPI schema, and CI fails on drift in the document or in
permdock openapi emit --check.
Workflow
- Set the inputs and read the docs. Read
scaledock-repo-standardreferences/api.md, the installed oRPC OpenAPI docs, and the PermDockorpcandopenapipages through the PermDock docs MCP (https://permdock.dev/mcp). ✓ You know which OpenAPI version the installed oRPC emits. - Contract and validation. Define inputs and outputs with Valibot in
packages/contract, followingstandard-schemafor anything that consumes a schema generically. ✓ Every procedure has typed input and output, and invalid input is a 400 Problem Details object. - Permissions. Define permissions and grants with
wire-permdock, then guard each procedure withprotect. ->references/stack.md(adapter and CLI mapping) ✓ A call without a grant returns 403 Problem Details, andpermdock collect --checkpasses. - Errors and limits. Route every error through the Hono
onErrorthat builds Problem Details asproblem-detailsdescribes. For limits, configure theLimitStoreand emit the headersratelimit-headersdescribes. ✓ Every error response isapplication/problem+json; a 429 carriesRetry-After. - Document. Generate the document, then run
permdock openapi emit(in place, or--format overlaywhen the generator's output must stay untouched). Validate the result asopenapiandopenapi-overlaydescribe. ✓ The snapshot validates andpermdock openapi emit --checkexits 0. - Test and audit. Add a policy matrix with
permdock/testing, a contract test per error type, then runaudit-permissionsfromScaleDockHQ/PermDock. ✓ Tests pass and the audit has no blocker.
Verify before done
- Every item in the
openapiandproblem-detailsVerify lists passes. - Every procedure has a PermDock guard and appears in
permdock usage. - The OpenAPI
securitycomes only frompermdock openapi emit. - Every limited procedure returns 429 with
Retry-Afterwhen exhausted. - The committed OpenAPI snapshot matches the generated document, and
pnpm verifypasses.
Reference index
references/stack.md: each spec requirement mapped to the ScaleDock stack and PermDock.
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-agent-permissionsSkill
- scaledock-enterprise-identitySkill
- 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.

