Repository navigation
Conversation
Wiring a Next.js App Router site to @decocms/nextjs 8: setup and the block map, the proxy and draft previews, rendering resolved pages in Server Components, metadata from the seo block, ISR on the assignments route, and the Studio bridge. Written from packages/nextjs and examples/nextjs-binding-smoke. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- react-dom is not a peer of @decocms/nextjs; only next and react are. - createCMS shares one instance per site (or content module), not per set of options. - decideVisitor withholds the cookie only when a draft or old release renders, not on every preview signal. - bindDraft binds the forwarded visitor and assignments on the release only when it saves an experiments or campaigns block. - The unavailable-draft case shows a separate notice, not the badge. - contentClient does not read the request itself; bindDraft does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tlgimenes
added a commit
that referenced
this pull request
Nov 9, 2026
## What this adds This brings the agent skills for building sites on `@decocms/blocks` 8 into `.agents/skills/`. They come from decocms/skills, decocms/storefront-skills, decocms/migrations and the 7.x branch, and each was rewritten against the v8 code in `packages/`. It also adds `deco skills install`, which ships the skills with the package. It replaces #786–#799 (the one-PR-per-skill versions) with the same commits, cherry-picked onto main, plus a regenerated skills table. | Skill | Covers | |---|---| | `deco-site-workflow` | the `deco` CLI end to end: schema and schema push on deploy, pull, push, drafts, publish, check, delivery, previewing in Studio | | `deco-tanstack-site` / `deco-nextjs-site` | wiring each binding | | `deco-site-authoring` | sections, pages, loaders, lazy blocks, SEO | | `deco-cms-schema` | Props → Studio form | | `deco-make-editable` | hardcoded site or Figma design → editable blocks | | `deco-variants` | multivariate blocks, matchers, draft preview | | `deco-images-media` | image providers, components, LCP, video | | `deco-storefront-caching` | worker page cache, cache keys, egress | | `deco-storefront-performance` | N+1, payload trim, hydration, worker memory | | `deco-go-live` | cutover and QA | | `deco-apps` | the thin `@decocms/apps-*` clients | | `deco-v7-to-v8-migration` | `reference/` → `references/`, split to fit the size budgets, claims corrected | **`deco skills install`** copies the skills that ship with the installed `@decocms/blocks` into the site's `.claude/skills`, or another folder with `--dir`. It works offline. Blocks' build copies `.agents/skills` into `packages/blocks/skills/` (git-ignored, listed in `files`). Studio's banners will tell the agent to run it, then load `deco-site-workflow`. Every API, flag and path was checked twice against `packages/`: once by the writer and once by an independent review. What only existed in v7 or Fresh was dropped, not ported. Customer names are anonymized. `deco serve` was removed in 8.10, and `deco-site-workflow` says so. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds agent skills for building sites on `@decocms/blocks` 8 to `.agents/skills/`, rewritten against the v8 code in `packages/`, plus `deco skills install` to ship them with the package. **New Features** - Thirteen skills cover the `deco` CLI workflow, the TanStack and Next.js bindings, authoring, schema forms, making sites editable, variants, images/media, caching, performance, go-live, the `@decocms/apps-*` clients, and v7→v8 migration. - `deco skills install` copies the bundled skills into the site's `.claude/skills` (or `--dir`), works offline, and replaces only the folders it ships. - Content that existed only in v7 or Fresh was dropped, and every API, flag and path was verified twice against the code in `packages/`. <sup>Written for commit fd2dfcd. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/decocms/blocks/pull/800?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/decocms/blocks/800?returnTo=https%3A%2F%2Fgithub.com%2Fdecocms%2Fblocks%2Fpull%2F800&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Superseded by #800, which merged these commits together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A new agent skill,
deco-nextjs-site, for building a Next.js App Router site on@decocms/nextjs8 and@decocms/blocks8. It covers the block map and the twocreateCMShandles,withDeco, the proxy (draft, visitor and assignment decisions, plus the/_draftand/_assignmentsrewrites ordraftProxy), rendering resolved pages in Server Components (bindDraft,contentClient,assignedClient,matchRoute, redirects), page metadata from theseoblock, ISR on the assignments route, the Studio bridge and CSP, the next/image loader and the request metric.SKILL.mdis an index. The references are:references/setup.md: packages, files, block map, CMS handles,withDeco, scripts, image loader, request metricreferences/proxy-and-drafts.md:proxy.ts, the draft route,bindDraft, preview hosts, debugging draftsreferences/rendering.md: the page function, results and errors, sections, the two routes, routes the app ownsreferences/metadata-seo.md:generateMetadatafrompage.seo, noindex on draftsreferences/caching.md: the assignments route,revalidate, what makes a page dynamic, CDN keys, stale contentreferences/studio-bridge.md:StudioBridge,StudioPage,withStudioCsp,DECO_STUDIO_ORIGINSources
decocms/migrations:target/faststore-deco-file. Only its@decocms/nextjsbinding section, which was rewritten for v8. The FastStore playbook stays in that repo.packages/nextjs/src,packages/blocks/src/v8andexamples/nextjs-binding-smoke.Dropped because it is v7 or Fresh only
createNextSetup,createDecoRouteHandlers,createDecoPreviewPage, the/setupand/routeHandlerssubpaths, andwithDecoadding rewrites ortranspilePackages. The skill says these are gone and points todeco-v7-to-v8-migration.src/sections/*shims used as block keys, andgenerate:decowriting.deco/*.gen.*. In v8 these are the block map in.deco/index.tsx,deco schemaanddeco content.@decocms/blocksindependencies.Fact-check
A second pass checked every export, option, header, CLI command and behavior against the code. Fixes in the second commit:
react-domis not a peer of@decocms/nextjs. Onlynextandreactare.createCMSkeeps one instance persite(or per content module), not one per set of options.decideVisitorholds back the cookie only when the request renders a draft or an old release.bindDraftbinds the visitor and assignments on the current release only when that release saves anexperimentsorcampaignsblock.contentClientdoes not read the request.bindDraftdoes.Not verified, or open
packages/nextjs/README.mdcallsdecideDraftwith 3 arguments, and documents acreateCMS({ dev })option that does not exist.examples/content-module.mjssays there is nodeco contentcommand, but there is one. The skill follows the code. The README and the comment can be fixed in a separate PR.src/app/blog/page.tsxcallscontentClientwithout callingbindDraftfirst, so it ignores the proxy's forwarded version and assignments. The skill tells sites to callbindDraftfirst.siteset previews local.deco/blocksedits in development. The skill sends readers todeco-site-workflowfor that.AnalyticsScriptusage in a Next root layout was not verified, so it is left out.deco-site-workflow,deco-site-authoring,deco-cms-schema,deco-variants,deco-images-media,deco-storefront-cachinganddeco-tanstack-site. They are named in plain text, not linked.Note for sibling skill PRs
This PR regenerates the skills table in
.agents/skills/README.md. Other skill PRs that also touch that table will conflict with it. After rebasing onto main, runbun run skills:readmeand commit the result.bun run skills:checkpasses.🤖 Generated with Claude Code
Summary by cubic
Adds the
deco-nextjs-siteagent skill: a documentation set for wiring a Next.js App Router site to@decocms/nextjs8 (with@decocms/blocks8, Next 16, React 19). It ships an index plus six references covering setup, the proxy and draft previews, page rendering,seometadata, ISR caching, and the Studio bridge.The content is checked against
packages/nextjs/src,packages/blocks/src/v8, andexamples/nextjs-binding-smoke; a second pass corrected behaviors like peer dependencies,createCMSinstance sharing, andbindDraftscope. v7 and Fresh-only material is dropped and pointed todeco-v7-to-v8-migration.Notes
.agents/skills/README.md; other skill PRs touching that table will conflict — rebase onto main and runbun run skills:readme.packages/nextjs/README.mdand the example disagree with it; those can be fixed separately.Written for commit f36ebe4. Summary will update on new commits.