scaffold-monorepo
Skill3 starsChanged 3 months agoMITView on GitHub
Scaffolds a pnpm TypeScript monorepo with verify gates, knip, pre-commit hooks, pinned CI, and Renovate using current toolchain versions at scaffold time. Use when creating a new monorepo, bootstrapping apps/packages layout, or aligning a greenfield repo with progressive-pragmatic craftsmanship golden paths for GitHub Actions or Gitea Actions.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-designSkill
- backend-craftSkill
- meilisearchSkill
- design-coreSkill
- design-datavizSkill
- design-flowsSkill
- design-formsSkill
- design-product-uiSkill
- design-researchSkill
- design-reviewSkill
- design-slidesSkill
- design-systemsSkill
- design-webSkill
- agent-syncSkill
- build-autonomous-agentsSkill
- coding-disciplineSkill
- completion-gateSkill
- deliver-dependency-upgradesSkill
- documentation-and-adrsSkill
- grill-harness-with-docsSkill
- learn-agentic-engineeringSkill
- pnpmSkill
- scaffold-harnessSkill
- shift-left-securitySkill
- start-gateSkill
- update-harnessSkill
- write-a-skillSkill
- frontend-craftSkill
- ansible-automationSkill
- gitea-actionsSkill
- gitea-teaSkill
- manage-infrastructure-as-codeSkill
- multi-stage-dockerfileSkill
- secure-linux-web-hostingSkill
- integrate-product-complianceSkill
- plain-numbersSkill
- product-craftSkill
- run-product-engineeringSkill
- playwright-best-practicesSkill
- testing-strategiesSkill
- writing-coreSkill
- writing-editorialSkill
- writing-engineeringSkill
- writing-marketingSkill
- writing-productSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
If the repo already has agent docs, update them in place.
- Distinctive: line 26
Ask only when a consequential choice or the authority for structural change remains unresolved.
- Very specific: line 33
Run scripts/print-toolchain-hints.sh and follow the Version resolution section in REFERENCE.md:
- Distinctive: line 37
If the next major is an announced future LTS candidate, decide whether a separate non-production preview lane buys useful compatibility …
- Distinctive: line 112
Use completion-gate before first commit.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Scaffold Monorepo
Golden-path bootstrap for pnpm workspaces + Node Active LTS + verify CI + Renovate. Versions are resolved at scaffold time, not copied from memory.
Pair with scaffold-harness after the toolchain exists, or adapt to the repo's existing agent docs.
Project Fit Check
Before scaffolding:
- Confirm this is greenfield, an explicit re-scaffold, or a repo where the user accepted structural changes.
- Scan for existing package manager, workspace layout, CI host, Renovate config, hooks, formatter, linter, and agent docs.
- Preserve existing choices unless the user asks to replace them or they block the requested scaffold.
- If the repo already has agent docs, update them in place. If not, offer scaffold-harness or create only the minimal documented bridge.
- Resolve routine choices from repository evidence and the defaults below. Ask only when a consequential choice or the authority for structural change remains unresolved.
Before writing files
1. Resolve current versions (required)
Run scripts/print-toolchain-hints.sh and follow the Version resolution section in REFERENCE.md:
- Node Active LTS major ->
engines,.node-version,.nvmrc, CInode -eguard - If the next major is an announced future LTS candidate, decide whether a separate non-production preview lane buys useful compatibility evidence. Do not make it the package, build, deployment, or production default before upstream marks it LTS.
- Latest pnpm ->
packageManager,corepack prepare, Renovate regex manager - Latest knip, prettier, typescript, lint-staged, simple-git-hooks
- Pin container digests for
node:*, Playwright image (if E2E),renovatebot/renovate,actions/checkout,actions/upload-artifact - Replace both
__ACTIONS_CHECKOUT_SHA__and__ACTIONS_CHECKOUT_VERSION__from the same current stable release after the configured cooldown; do not leave a stale version comment beside a new digest. @types/nodemajor must match Node LTS (not npm's latest major)
2. Resolve once
| Question | Default |
| CI host | gitea -> .gitea/workflows/; github -> .github/workflows/ |
| Layout | apps/*, packages/* |
| E2E in CI | yes if Playwright app exists |
| Framework groups in Renovate | add only stacks present (Astro, React, Tailwind, etc.); Astro -> defer vite major until framework adopts it |
Root package.json name | for renovate.json ignoreDeps |
3. Plan output
Record the file list and resolved versions. Write without another confirmation when the requested scaffold and repository evidence provide authority. Stop for the human only when the plan would replace an owned choice, widen scope, or cross another consequential boundary.
Scaffold checklist
Copy templates from templates/, substitute placeholders (__NODE_MAJOR__, __PNPM_VERSION__, __CI_DIR__, __RENOVATE_PLATFORM__, digests, repo name).
Root toolchain
package.json- scripts from templates/package.root.jsonpnpm-workspace.yaml-allowBuilds.simple-git-hooks: true(+ native deps as needed).node-version,.nvmrc- Active LTS major only.prettierrc.json,.prettierignoreknip.jsonc- start minimal; tune per workspace (see templates/knip.jsonc)scripts/pre-commit.sh- lint-staged thenpnpm verifysimple-git-hooks+lint-stagedin rootpackage.jsonpnpm installat root
CI (__CI_DIR__/ci.yml)
preflight- skip stale main pushesverify-pnpm verify+pnpm buildcompatibility-preview- optional non-blocking verification on the announced future LTS candidate; pin its image digest and report failures without weakening the LTS gatee2e- optional; Playwright image pinned- Path filters include
__CI_DIR__/, lockfile, workspaces
Renovate
renovate.json- supply-chain cooldowns, groups for your stack, pnpm regex forpackage.json+__CI_DIR__/*.yml__CI_DIR__/renovate.yml- platform env (giteavsgithub),RENOVATE_ALLOWED_COMMANDS(Gitea self-hosted), token validation- Gitea only: create repo labels
dependencies,major,security(Renovate config references them) - Document secrets in
AGENTS.md(see templates/agents-ci.snippet.md)
Agent docs
- Run scaffold-harness or update the existing agent docs - wire
pnpm verify,pnpm precommit, CI/Renovate notes into the local source of truth
Verify before done
pnpm verify
pnpm build
# if E2E: pnpm test:e2e
pnpm precommit # dry-run hook pathUse completion-gate before first commit.
Templates
| File | Purpose |
| templates/package.root.json | Root scripts, engines, hooks |
| templates/pre-commit.sh | Hook entrypoint |
| templates/ci.yml | Preflight + verify + e2e |
| templates/renovate.yml | Scheduled Renovate job |
| templates/renovate.json | Base Renovate policy |
| templates/knip.jsonc | Minimal knip baseline |
| templates/pnpm-workspace.yaml | Workspace + allowBuilds |
| templates/agents-ci.snippet.md | Paste into AGENTS.md |
Details: REFERENCE.md - GitHub vs Gitea matrix, secrets, digest pinning, framework-specific Renovate groups.
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.

