scaledock-repo-standard
Skill1 starsChanged 2 months agoMITView on GitHub
Create a new repo or bring an existing one up to the ScaleDock standard (latest Node supported by Vercel, latest pnpm and TypeScript, Next.js or Expo, Supabase with better-supabase, PermDock, oRPC, MCP, CLI, Fumadocs, Vercel). Use when scaffolding a new monorepo, product, library or tooling repo, adding an iOS and Android app with Expo, auditing a repo against the ScaleDock standard into a gap table, upgrading this repo to the standard, or aligning several repos.
- Reads credentials
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-http-apiSkill
- scaledock-mcp-serverSkill
- scimSkill
- shared-signalsSkill
- spiffeSkill
- standard-schemaSkill
- typespecSkill
- web-bot-authSkill
- webmcpSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Never discard uncommitted work.
- Distinctive: line 41
New majors first: When a newer major is in alpha, beta or rc, adopt it now, absorb its migration guide, and note the API changes in the …
- Very specific: line 47
One branch and one PR for this whole run: Follow the agent workflow in references/git-workflow.md.
- Distinctive: line 51
Run these steps in order. Each step names the references to load and the check it must pass.
- Distinctive: line 76
Repo hygiene: Write the AI files, repo files, VS Code settings, CI, Dependabot and tests.
- Very specific: line 79
Verify and finish: Run pnpm install, pnpm format and pnpm verify.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Repo standard
A workflow for creating, upgrading or aligning repos so every ScaleDock repo has the same toolchain, layout, surfaces, guardrails and delivery pipeline.
Follow the workflow below step by step. Load a reference when its step names it, and only for the repo kind and surfaces the inputs select.
Inputs (fill in, or ask the user before starting)
- Mode:
new,upgrade(this repo) oralign(several repos). - Repo kind:
product(default; apps and surfaces),library(publishes npm packages) ortooling(toolchain, hooks, CI and repo files only).references/audit.mdlists which references apply to each kind. - Product in one sentence: {{PRODUCT_ONE_LINER}}
- Surfaces:
app,api,mcp,docs,marketing,mobile,cli. The default for a product isapp,api,mcpanddocs.mobileadds a native-only Expo app beside a Next.jsapp. - Framework for
app:next(default) orexpo(one universal Expo app for iOS, Android and web).docsandmarketingalways use Next.js. Use another framework only when the user names it, with an ADR. - Offline: yes or no, only with Expo (yes means PowerSync on native).
- CLI kind:
none(default),product(end users call the API),library(ships with an npm package) ortooling(private repo scripts). - Database: yes or no (yes means Supabase with better-supabase).
- Roles and permissions: yes or no (yes means PermDock).
- Multi-tenant: yes (default) or no.
- Publishes npm packages: yes or no (always yes for a library).
- npm scope
@{{SCOPE}}, GitHub owner{{GITHUB_OWNER}}, Vercel team{{VERCEL_TEAM}}, issue prefix{{ISSUE_PREFIX}}(optional).
Resolve the placeholders listed in references/audit.md from these inputs before you write any file.
Ground rules
- Upgrade and align modes audit first.
- Fill the gap table from
references/audit.md, then apply the changes as small conventional commits on one branch (rule 5). - Never discard uncommitted work. For unshipped code, prefer one breaking cutover over shims.
- A deliberate deviation is an ADR in
docs/decisions/(assets/adr-template.md) plus a line in the AGENTS.md "Deviations" list. Never change a deviation silently, and never add one without asking.
- Fill the gap table from
- Always the latest, including new majors in pre-release.
- This skill names no versions. Look up the latest release of every runtime, package, SDK, action, skill and spec when you run (
pnpm view <pkg> dist-tags, GitHub releases, vendor docs), never from memory or another repo. - New majors first. When a newer major is in alpha, beta or rc, adopt it now, absorb its migration guide, and note the API changes in the commit. Otherwise use the latest stable; never a pre-release of a minor or patch.
- Exceptions. Stay on the current major only when the pre-release fails
minimumReleaseAgeor breaks a peer with no compatible release. Record the blocker in the gap table. - Tracking. List every pre-release pin under "Pre-release pins" in AGENTS.md (package, version, why), and move it to stable when the major ships.
- Pin exactly in the catalog. Never bypass
minimumReleaseAge; use the newest release that passes, and add a commented exclude only when a fix needs it.
- This skill names no versions. Look up the latest release of every runtime, package, SDK, action, skill and spec when you run (
- Read installed docs before configuring. For Next.js, ask the running dev server's
/_next/mcpfirst, then read the bundlednode_modules/next/dist/docs. Readnode_modules/turbo/docs, the Expo, oxlint, oxfmt, Fumadocs, AI SDK and MCP SDK docs, and the matching skill. Flag and option names in the references drift; check each against the installed version. - Done means
pnpm verifypasses. Report withassets/report.md. - One branch and one PR for this whole run. Follow the agent workflow in
references/git-workflow.md.
Workflow
Run these steps in order. Each step names the references to load and the check it must pass. Skip a reference when the repo kind or inputs exclude it.
- Start the run. Settle the mode and every input; ask for anything missing. Resolve the placeholders. Check the working tree, then create or reuse the branch.
->
references/audit.md(placeholders),references/git-workflow.md(agent workflow). ✓ All inputs are known, the tree is clean or yours, and you are on a<type>/<short-topic>branch. - Audit or sketch.
- New: sketch the tree from the selected surfaces and packages.
- Upgrade: walk the
audit.mdchecklist row by row, opening a row's reference only to judge that row. - Align: audit each repo the same way, one column per repo.
->
references/audit.md,references/architecture.mdfor the target tree, and the Baselines section ofreferences/performance.mdwhen the repo ships code. ✓ Every row has anaudit.mdstatus, every dependency behind latest is listed, and the starting baselines are recorded.
- Foundation. Install the skills, set up the toolchain, workspace, TypeScript, Knip, lint and format, and lay out the folders and boundaries.
->
references/skills.md,references/toolchain.md,references/lint-format.md,references/architecture.md. ✓pnpm installpasses under the strict workspace settings, every workspace has a boundary tag, andpnpm checkruns. - Platform. Configure Vercel, Turborepo, Remote Cache, local dev with Portless, and env and secrets.
->
references/vercel.md,references/local-dev-env.md. ✓ Each need maps to the Vercel-first table or an ADR,turbo.jsonuses strict env mode, and every web app has adev:portlessscript. - Surfaces. Build or upgrade only the selected ones.
- Web (Next.js):
references/nextjs.md,references/i18n.md,references/ui.md,references/app-shell.md. - Expo (
mobile, orappon Expo):references/expo.md,references/i18n.md, andreferences/offline-sync.mdwhen Offline is yes. - Data and identity:
references/data-permissions.md,references/data-conventions.md,references/auth.md. - Programmatic:
references/api.md,references/mcp.md,references/cli.md. - Docs and AI:
references/docs-site.md,references/ai.md. - Performance, for every kind that ships code:
references/performance.md. ✓ Apps stay thin adapters overservices, every procedure is contract first, every surface acts as the signed-in user, and names follow the naming rules.
- Web (Next.js):
- Repo hygiene. Write the AI files, repo files, VS Code settings, CI, Dependabot and tests.
->
references/agent-files.md,references/repo-files.md,references/ci.md,references/tests.md. ✓ AGENTS.md is at most 12 KB and lists the deviations and pre-release pins, and CI runs the same gates aspnpm verify. - Verify and finish. Run
pnpm install,pnpm formatandpnpm verify; fix code, not tests. Add a changeset, push, mark the one PR ready, and put the report in its body. ->assets/report.md,references/git-workflow.md(Changesets, PR), the Baselines section ofreferences/performance.md, the checklist below. ✓pnpm verifypasses, the final baselines are recorded, and the report is complete.
Verify before done
The tag in brackets names the input that switches an item on; untagged items always apply.
pnpm verifypasses locally (rule 4).- [Turbo]
verifyis one cached, parallelturbo runof tasks withinputs, and no check runs twice. - Coverage
autoUpdateis off in CI, and thresholds come from the test set CI runs. - The naming rules hold, and the
docs:driftnaming check passes. - The baselines from before and after the run are in the report.
- Every dependency is
catalog:orworkspace:*at the latest release that passesminimumReleaseAge; every override, exclude,allowBuildsentry and patch has a comment. - Every pre-release pin is in AGENTS.md (rule 2).
pnpm-workspace.yamlhas no key the installed pnpm rejects, and TypeScript is the stable native compiler with no preview package.- Every deviation has an ADR in
docs/decisions/and a line in the AGENTS.md "Deviations" list. - [workspaces] Every workspace has a Turbo boundary tag, apps never import each other, and
pnpm boundariespasses. - No Zod in our code, no
@radix-ui/*or vaul, and each concern uses its one library. - Dates use
Temporalthrough the onetemporal.tsmodule; no other date library is installed. - Every tsgolint type-aware rule is on, or listed as off with a reason.
- The managed AGENTS.md blocks (Next.js, Turborepo) are committed as the tools wrote them.
- Installed skills and
skills-lock.jsonare committed, and the lock tracks every skill in.agents/skills; in a repo that publishes skills,pnpm dlx skills add . --listoffers only its own. - [apps] Each app has one
env.ts, the only file that readsprocess.env; every env key is in t3-env,turbo.json,.env.exampleand all three Vercel environments. - [docs, web] Agent routes send
Cache-Control, noproxy.tslacks amatcher, and no experimental flag or twoslash is installed without a use. - [api] Every procedure lives in
packages/contractwithopenapi()meta, and the committed OpenAPI snapshot matches. - [api, mcp, cli] Errors are RFC 9457 Problem Details on every surface.
- [Database] Every table has RLS and pgTAP tests; every domain table has the audit trigger.
- [Database] Timestamps are
timestamptz, money is integer minor units plus a currency, and public IDs are UUIDs (v7 when the Postgres major provides it). - [Database] Every foreign key is indexed and has an explicit
on delete. - [Database] The only keys in use are
sb_publishable_andsb_secret_, andsb_secret_appears only increateAdminContext(). - [Expo]
expo-doctorpasses,ios/andandroid/are gitignored, and eachAPP_VARIANThas its own name, bundle ID and scheme. - [Offline] Every synced table is in the PowerSync publication and a sync stream, and web never opens a PowerSync database.
- The whole run is on one branch and one PR, with conventional commits (and a changeset when Changesets apply).
- The report follows
assets/report.md, including its manual steps.
Reference index
- Run:
audit.md(placeholders, repo kinds, gap checklist),report.md(final report, manual steps),adr-template.md. - Foundation:
skills.md(agent skills),toolchain.md(Node, pnpm, TypeScript, workspace, Knip, root scripts),architecture.md(tree, boundaries, contract, errors, one library per concern, env, naming and layout),performance.md(baselines, agent-route caching, client bundle, library runtime, generated code),lint-format.md(oxlint, anti-slop, oxfmt). - Platform:
vercel.md(Vercel first, Services,turbo.json, Remote Cache),local-dev-env.md(Portless, native toolchain, env and secrets). - Web:
nextjs.md,i18n.md(next-intl, and i18next for Expo),ui.md(shadcn, ReUI Pro),app-shell.md(auth pages, shell, page templates, screens). - Expo:
expo.md(shapes, app config, EAS, dev client, native UI, Uniwind, push, universal web),offline-sync.md(PowerSync). - Data and identity:
data-permissions.md(tenancy, Supabase, better-supabase, audit log, PermDock),data-conventions.md(UTC timestamps and Temporal, money, IDs, naming, pagination, deletion),auth.md(OAuth 2.1 server, sign-in per surface). - Programmatic:
api.md(Hono, oRPC, Scalar),mcp.md(MCP SDK, tools from the contract, docs MCP),cli.md(CLI kinds, OAuth login). - Docs and AI:
docs-site.md(Fumadocs for people and agents),ai.md(AI SDK through AI Gateway). - Delivery:
git-workflow.md(branches, agent workflow, commitlint, lefthook, Changesets),ci.md(Actions, EAS builds, Dependabot),tests.md,agent-files.md(AGENTS.md, rules, "also update" table),repo-files.md(README, standard files, VS Code).
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.

