Skip to content

chore: add all deco agent skills to .cursor/skills - #6

Merged
JonasJesus42 merged 3 commits into
mainfrom
JonasJesus42/cms-loader-resolve
Mar 11, 2026
Merged

JonasJesus42 merged 3 commits into
mainfrom
JonasJesus42/cms-loader-resolve

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add 35 deco agent skills covering architecture, migration, debugging, performance, deployment, and more
  • Improve deco-to-tanstack-migration skill with battle-tested patterns, codemod commands, and templates

Test plan

  • Skills are properly organized under .cursor/skills/
  • Verify skills load correctly in Cursor IDE

Generated with Claude Code


Summary by cubic

Adds 36 Deco engineering skills under .cursor/skills to speed up architecture, debugging, performance, and VTEX work in Cursor. Also updates the migration skill with expanded patterns, 45 gotchas, codemods, and starter templates for @decocms/start on TanStack Start.

  • New Features
    • Coverage: core/@decocms/start/apps architecture, async section rendering, CMS routes/caching, server functions/invoke, VTEX porting/review, API dedup/N+1 detection, performance audits, incident/memory debugging, and site deployment.
    • Tooling: E2E Playwright scaffold with a metrics collector (Server‑Timing, lazy section analysis); migration templates for vite.config.ts, setup.ts, worker entry, root route, router, and package.json; VTEX auth/cookie patterns and schema.org mapping.
    • Migration docs: merged key principles and architecture sections, 45 detailed gotchas, codemod commands, pre‑flight audit, post‑migration checks, and a Related Skills cross‑reference.

Written for commit 9c73671. Summary will update on new commits.

JonasJesus42 and others added 2 commits March 11, 2026 08:50
36 skills covering migration, architecture, debugging, VTEX porting,
async rendering, edge caching, hydration fixes, and more.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…terns

- Rewrite SKILL.md with 11 phases (0-10), entry/exit criteria, automation %
- Add 6 templates: vite.config.ts, setup.ts, worker-entry, __root.tsx, router, package.json
- Add codemod-commands.md with all sed/grep automation organized by phase
- Expand gotchas from 18 to 27 — includes critical discoveries:
  import "./setup" ordering, POST deferred sections, mergeSections sorting,
  case-sensitive imports, fn.toString() hydration, Vite stubs plugin, dedupe
- Add related skills cross-reference table (12 skills)
- Add pre-flight audit script for source site analysis
- Add post-migration verification checklist

All patterns battle-tested on espacosmart-storefront (100+ sections, VTEX,
async rendering, Cloudflare Workers).

Co-Authored-By: Claude Opus 4.6 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

40 issues found across 110 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".cursor/skills/deco-apps-architecture/app-pattern.md">

<violation number="1" location=".cursor/skills/deco-apps-architecture/app-pattern.md:184">
P1: Unhandled rejection in the queue can leave `loading` stuck and break subsequent enqueued mutations.</violation>

<violation number="2" location=".cursor/skills/deco-apps-architecture/app-pattern.md:186">
P2: The cart update uses `||`, which blocks valid `null` state updates and can leave stale cart data.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/templates/scripts/run-e2e.ts">

<violation number="1" location=".cursor/skills/deco-e2e-testing/templates/scripts/run-e2e.ts:130">
P1: Playwright CLI flags are passed to `npm` instead of the `test` script. Use `npm run test -- ...` so `--project` and `--headed` reach Playwright.</violation>
</file>

<file name=".cursor/skills/deco-site-deployment/SKILL.md">

<violation number="1" location=".cursor/skills/deco-site-deployment/SKILL.md:204">
P1: The base64 encoding command is unsafe for JSON patching because it can include newline/wrapped output; use a newline-free encoding pipeline.</violation>

<violation number="2" location=".cursor/skills/deco-site-deployment/SKILL.md:273">
P2: The env var upsert jq example crashes when `envVars` is absent; initialize from an empty array before checking/updating.</violation>

<violation number="3" location=".cursor/skills/deco-site-deployment/SKILL.md:286">
P2: The env var removal jq example is not null-safe and fails when `envVars` does not exist.</violation>
</file>

<file name=".cursor/skills/deco-site-memory-debugging/cdp-connection.md">

<violation number="1" location=".cursor/skills/deco-site-memory-debugging/cdp-connection.md:36">
P2: Use the forwarded local port in the `/json/list` request instead of hardcoding `9229`, otherwise the guide breaks when users follow the alternate-port instruction.</violation>

<violation number="2" location=".cursor/skills/deco-site-memory-debugging/cdp-connection.md:127">
P2: Guard `proto_r` before indexing into `proto_r["result"]`; `send_cmd` can return `None` on timeout and this example will crash.</violation>
</file>

<file name=".cursor/skills/deco-performance-audit/workflow.md">

<violation number="1" location=".cursor/skills/deco-performance-audit/workflow.md:136">
P2: This table requires per-path cache hit and latency, but the step only collects MONITOR_TOP_PATHS data, which is documented with requests/bandwidth fields only.</violation>

<violation number="2" location=".cursor/skills/deco-performance-audit/workflow.md:229">
P2: The error-path filter only matches HTTP 500 and misses other 5xx failures. Use a 5xx filter so gateway/origin errors are included.</violation>

<violation number="3" location=".cursor/skills/deco-performance-audit/workflow.md:330">
P2: The timeline table includes 5xx/429 columns that are not available from MONITOR_USAGE_TIMELINE, making the workflow internally inconsistent.</violation>
</file>

<file name=".cursor/skills/deco-full-analysis/checklists/asset-optimization.md">

<violation number="1" location=".cursor/skills/deco-full-analysis/checklists/asset-optimization.md:178">
P1: The CSP hardening example includes `'unsafe-inline'`, which weakens CSP protections and can allow inline-script XSS. Prefer nonce- or hash-based script policies instead.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/SKILL.md">

<violation number="1" location=".cursor/skills/deco-e2e-testing/SKILL.md:159">
P2: The warmup retry example never fails when liveness checks exhaust retries, so tests can continue against an unready server and record misleading metrics.</violation>
</file>

<file name=".cursor/skills/deco-core-architecture/blocks.md">

<violation number="1" location=".cursor/skills/deco-core-architecture/blocks.md:100">
P2: The proxy example does not use `config.url` as the target origin, so it does not actually proxy to the configured backend.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/scripts/scaffold.sh">

<violation number="1" location=".cursor/skills/deco-e2e-testing/scripts/scaffold.sh:34">
P2: Escape `SITE_NAME` before using it in `sed` replacements; special characters currently break or corrupt generated files.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/templates/utils/metrics-collector.ts">

<violation number="1" location=".cursor/skills/deco-e2e-testing/templates/utils/metrics-collector.ts:143">
P2: Response/request matching by URL can pair the wrong request when the same URL is fetched concurrently, corrupting collected network metrics.</violation>

<violation number="2" location=".cursor/skills/deco-e2e-testing/templates/utils/metrics-collector.ts:236">
P2: `s-maxage=0` is currently classified as cached; this misreports cache effectiveness in metrics output.</violation>
</file>

<file name=".cursor/skills/deco-incident-debugging/headless-mode.md">

<violation number="1" location=".cursor/skills/deco-incident-debugging/headless-mode.md:83">
P2: The workflow requires `started_at` even though it is documented as optional; add a fallback when computing timeframe.</violation>

<violation number="2" location=".cursor/skills/deco-incident-debugging/headless-mode.md:505">
P2: `fix_ineffective` uses duplicate `action` keys, so one of the actions may be lost when parsed.</violation>
</file>

<file name=".cursor/skills/deco-cms-layout-caching/SKILL.md">

<violation number="1" location=".cursor/skills/deco-cms-layout-caching/SKILL.md:133">
P2: `isRawSectionLayout` should return the top-level block key, not the final `resolveType`, to avoid cache-key collisions across different block references.</violation>

<violation number="2" location=".cursor/skills/deco-cms-layout-caching/SKILL.md:159">
P2: The snippet uses `section.Component`, but `ResolvedSection` uses `section.component`. This breaks keying/loader lookup in the documented implementation.</violation>

<violation number="3" location=".cursor/skills/deco-cms-layout-caching/SKILL.md:172">
P2: The documented layout path calls `runLoader` even when `loaderFn` may be undefined. Add a guard/fallback to avoid runtime errors for sections without loaders.</violation>
</file>

<file name=".cursor/skills/deco-site-patterns/client-patterns.md">

<violation number="1" location=".cursor/skills/deco-site-patterns/client-patterns.md:301">
P2: The `useCheckUser` example uses `await` inside a non-`async` function, which makes the snippet invalid TypeScript/JavaScript.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/discovery.md">

<violation number="1" location=".cursor/skills/deco-e2e-testing/discovery.md:255">
P2: The DevTools example uses `:has-text()`, which is a Playwright-only pseudo-class and will fail in `document.querySelectorAll(...)` in the browser.</violation>
</file>

<file name=".cursor/skills/deco-incident-debugging/learnings-index.md">

<violation number="1" location=".cursor/skills/deco-incident-debugging/learnings-index.md:13">
P2: Learning links use the wrong relative path and will not resolve to the workspace-root `learnings/` directory from this file.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/templates/scripts/baseline.ts">

<violation number="1" location=".cursor/skills/deco-e2e-testing/templates/scripts/baseline.ts:174">
P2: CLS is configured as a tracked metric but never compared, so CLS regressions are silently missed.</violation>
</file>

<file name=".cursor/skills/deco-apps-architecture/new-app-guide.md">

<violation number="1" location=".cursor/skills/deco-apps-architecture/new-app-guide.md:175">
P2: The commerce transform example omits `encodingFormat` in `ImageObject`, conflicting with the documented schema mapping requirements.</violation>

<violation number="2" location=".cursor/skills/deco-apps-architecture/new-app-guide.md:223">
P2: The required commerce loaders list is incomplete: it omits `wishlist.ts`, which is part of the documented commerce app pattern.</violation>
</file>

<file name=".cursor/skills/deco-full-analysis/checklists/hydration-fix.md">

<violation number="1" location=".cursor/skills/deco-full-analysis/checklists/hydration-fix.md:140">
P2: The JSX example is invalid because it returns sibling elements without a wrapping parent/fragment.</violation>
</file>

<file name=".cursor/skills/deco-core-architecture/engine.md">

<violation number="1" location=".cursor/skills/deco-core-architecture/engine.md:116">
P2: The documented `resolve` function type is invalid TypeScript because the parameter is missing a name.</violation>
</file>

<file name=".cursor/skills/deco-typescript-fixes/common-fixes.md">

<violation number="1" location=".cursor/skills/deco-typescript-fixes/common-fixes.md:218">
P2: The example marked "For React/Preact" uses a Preact-only event type, which is incorrect for React and can cause TS errors when copied into React code.</violation>
</file>

<file name=".cursor/skills/deco-e2e-testing/selectors.md">

<violation number="1" location=".cursor/skills/deco-e2e-testing/selectors.md:118">
P2: This DevTools visibility check also uses unsupported `:has-text()` in `querySelector`, causing a runtime selector error.</violation>
</file>

<file name=".cursor/skills/deco-incident-debugging/SKILL.md">

<violation number="1" location=".cursor/skills/deco-incident-debugging/SKILL.md:70">
P2: The learnings category table is inconsistent with the canonical learnings index, so responders may miss relevant known-issue matches during triage.</violation>
</file>

<file name=".cursor/skills/deco-server-functions-invoke/generator.md">

<violation number="1" location=".cursor/skills/deco-server-functions-invoke/generator.md:117">
P2: The build script example calls npm scripts as plain shell commands, which will fail in a standard npm setup. Prefix script calls with `npm run` so the documented pipeline is runnable.</violation>
</file>

<file name=".cursor/skills/deco-core-architecture/deco-vs-deco-start.md">

<violation number="1" location=".cursor/skills/deco-core-architecture/deco-vs-deco-start.md:179">
P2: The document references `@decocms/apps-start`, but the framework package in this repo is `@decocms/start`. Use the correct package name to avoid incorrect migration guidance.</violation>
</file>

<file name=".cursor/skills/deco-apps-architecture/scripts-codegen.md">

<violation number="1" location=".cursor/skills/deco-apps-architecture/scripts-codegen.md:145">
P2: GraphQL schema path is inconsistent with the documented codegen location pattern.</violation>
</file>

<file name=".cursor/skills/deco-server-functions-invoke/architecture.md">

<violation number="1" location=".cursor/skills/deco-server-functions-invoke/architecture.md:128">
P2: The docs claim the invoke call DX is the same across stacks, but earlier examples show different argument shapes (`props` vs `{ data: props }`).</violation>
</file>

<file name=".cursor/skills/deco-server-functions-invoke/troubleshooting.md">

<violation number="1" location=".cursor/skills/deco-server-functions-invoke/troubleshooting.md:65">
P2: The troubleshooting commands use `.../generate-invoke.ts`, which is not executable as written. Replace with the real script path so users can run the fix directly.</violation>
</file>

<file name=".cursor/skills/deco-apps-vtex-porting/adaptation-patterns.md">

<violation number="1" location=".cursor/skills/deco-apps-vtex-porting/adaptation-patterns.md:167">
P2: The Intelligent Search example forwards only `vtex_is_session`; it should include both `vtex_is_session` and `vtex_is_anonymous` to match VTEX cookie requirements documented elsewhere in this skill set.</violation>
</file>

<file name=".cursor/skills/deco-apps-architecture/website-app.md">

<violation number="1" location=".cursor/skills/deco-apps-architecture/website-app.md:91">
P2: Typo in the documented prop name (`whilelistURLs`) makes the API reference misleading; use an allowlist/whitelist spelling consistent with the rest of the docs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

abort();
loading.value = true;
const controller = new AbortController();
queue = queue.then(async () => {

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Unhandled rejection in the queue can leave loading stuck and break subsequent enqueued mutations.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-apps-architecture/app-pattern.md, line 184:

<comment>Unhandled rejection in the queue can leave `loading` stuck and break subsequent enqueued mutations.</comment>

<file context>
@@ -0,0 +1,288 @@
+  abort();
+  loading.value = true;
+  const controller = new AbortController();
+  queue = queue.then(async () => {
+    const result = await cb(controller.signal);
+    context.cart.value = result.cart || context.cart.value;
</file context>
Fix with Cubic

async function runTests(headed: boolean = false): Promise<boolean> {
console.log(`\n🧪 Running e2e tests${headed ? " (headed mode)" : ""}...\n`);

const args = ["test", "--project=desktop-chrome"];

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Playwright CLI flags are passed to npm instead of the test script. Use npm run test -- ... so --project and --headed reach Playwright.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-e2e-testing/templates/scripts/run-e2e.ts, line 130:

<comment>Playwright CLI flags are passed to `npm` instead of the `test` script. Use `npm run test -- ...` so `--project` and `--headed` reach Playwright.</comment>

<file context>
@@ -0,0 +1,194 @@
+async function runTests(headed: boolean = false): Promise<boolean> {
+  console.log(`\n🧪 Running e2e tests${headed ? " (headed mode)" : ""}...\n`);
+
+  const args = ["test", "--project=desktop-chrome"];
+  if (headed) {
+    args.push("--headed");
</file context>
Fix with Cubic

# ... see specific modification examples ...

# 3. Encode and patch
ENCODED=$(echo "$NEW_STATE" | base64)

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The base64 encoding command is unsafe for JSON patching because it can include newline/wrapped output; use a newline-free encoding pipeline.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-site-deployment/SKILL.md, line 204:

<comment>The base64 encoding command is unsafe for JSON patching because it can include newline/wrapped output; use a newline-free encoding pipeline.</comment>

<file context>
@@ -0,0 +1,396 @@
+# ... see specific modification examples ...
+
+# 3. Encode and patch
+ENCODED=$(echo "$NEW_STATE" | base64)
+kubectl patch secret state -n $NS --type='json' \
+  -p="[{\"op\":\"replace\",\"path\":\"/data/state\",\"value\":\"${ENCODED}\"}]"
</file context>
Suggested change
ENCODED=$(echo "$NEW_STATE" | base64)
ENCODED=$(printf '%s' "$NEW_STATE" | base64 | tr -d '\n')
Fix with Cubic

// In _middleware.ts
const cspHeader = [
"default-src 'self'",
"script-src 'self' 'unsafe-inline' https://www.googletagmanager.com",

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The CSP hardening example includes 'unsafe-inline', which weakens CSP protections and can allow inline-script XSS. Prefer nonce- or hash-based script policies instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-full-analysis/checklists/asset-optimization.md, line 178:

<comment>The CSP hardening example includes `'unsafe-inline'`, which weakens CSP protections and can allow inline-script XSS. Prefer nonce- or hash-based script policies instead.</comment>

<file context>
@@ -0,0 +1,251 @@
+// In _middleware.ts
+const cspHeader = [
+  "default-src 'self'",
+  "script-src 'self' 'unsafe-inline' https://www.googletagmanager.com",
+  "worker-src 'self'",
+  "frame-ancestors 'self'",
</file context>
Fix with Cubic

"expression": proto_expr,
"contextId": 1,
})
proto_id = proto_r["result"].get("result", {}).get("objectId")

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Guard proto_r before indexing into proto_r["result"]; send_cmd can return None on timeout and this example will crash.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-site-memory-debugging/cdp-connection.md, line 127:

<comment>Guard `proto_r` before indexing into `proto_r["result"]`; `send_cmd` can return `None` on timeout and this example will crash.</comment>

<file context>
@@ -0,0 +1,222 @@
+        "expression": proto_expr,
+        "contextId": 1,
+    })
+    proto_id = proto_r["result"].get("result", {}).get("objectId")
+    if not proto_id:
+        return None
</file context>
Fix with Cubic

1. **Commerce functions are pure** — same `addItemsToCart()` in both stacks
2. **Client never calls VTEX directly** — always goes through the server
3. **Credentials stay server-side** — `appKey`/`appToken` never reach the browser
4. **Same invoke DX** — `invoke.vtex.actions.addItemsToCart({ data: {...} })`

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The docs claim the invoke call DX is the same across stacks, but earlier examples show different argument shapes (props vs { data: props }).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-server-functions-invoke/architecture.md, line 128:

<comment>The docs claim the invoke call DX is the same across stacks, but earlier examples show different argument shapes (`props` vs `{ data: props }`).</comment>

<file context>
@@ -0,0 +1,166 @@
+1. **Commerce functions are pure** — same `addItemsToCart()` in both stacks
+2. **Client never calls VTEX directly** — always goes through the server
+3. **Credentials stay server-side** — `appKey`/`appToken` never reach the browser
+4. **Same invoke DX** — `invoke.vtex.actions.addItemsToCart({ data: {...} })`
+
+## Data Flow Diagram
</file context>
Fix with Cubic


**Fix**: Use `--apps-dir`:
```bash
npx tsx .../generate-invoke.ts --apps-dir ../apps-start

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The troubleshooting commands use .../generate-invoke.ts, which is not executable as written. Replace with the real script path so users can run the fix directly.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-server-functions-invoke/troubleshooting.md, line 65:

<comment>The troubleshooting commands use `.../generate-invoke.ts`, which is not executable as written. Replace with the real script path so users can run the fix directly.</comment>

<file context>
@@ -0,0 +1,110 @@
+
+**Fix**: Use `--apps-dir`:
+```bash
+npx tsx .../generate-invoke.ts --apps-dir ../apps-start
+# or
+npx tsx .../generate-invoke.ts --apps-dir node_modules/@decocms/apps
</file context>
Fix with Cubic

export default async function productList(props: Props) {
const config = getVtexConfig();
const data = await intelligentSearch<T>(path, params, {
cookieHeader: `vtex_is_session=${session}`,

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The Intelligent Search example forwards only vtex_is_session; it should include both vtex_is_session and vtex_is_anonymous to match VTEX cookie requirements documented elsewhere in this skill set.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-apps-vtex-porting/adaptation-patterns.md, line 167:

<comment>The Intelligent Search example forwards only `vtex_is_session`; it should include both `vtex_is_session` and `vtex_is_anonymous` to match VTEX cookie requirements documented elsewhere in this skill set.</comment>

<file context>
@@ -0,0 +1,335 @@
+export default async function productList(props: Props) {
+  const config = getVtexConfig();
+  const data = await intelligentSearch<T>(path, params, {
+    cookieHeader: `vtex_is_session=${session}`,
+  });
+}
</file context>
Fix with Cubic

image: raw.images.map(img => ({
"@type": "ImageObject" as const,
url: img.url,
alternateName: img.alt,

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The commerce transform example omits encodingFormat in ImageObject, conflicting with the documented schema mapping requirements.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-apps-architecture/new-app-guide.md, line 175:

<comment>The commerce transform example omits `encodingFormat` in `ImageObject`, conflicting with the documented schema mapping requirements.</comment>

<file context>
@@ -0,0 +1,268 @@
+  image: raw.images.map(img => ({
+    "@type": "ImageObject" as const,
+    url: img.url,
+    alternateName: img.alt,
+  })),
+  offers: {
</file context>
Fix with Cubic

seo?: Seo; // Default SEO meta
theme?: Section; // Theme section (CSS variables)
disableProxy?: boolean; // Disable image/asset proxy
whilelistURLs?: string[]; // Allowed proxy URL patterns

@cubic-dev-ai cubic-dev-ai Bot Mar 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Typo in the documented prop name (whilelistURLs) makes the API reference misleading; use an allowlist/whitelist spelling consistent with the rest of the docs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .cursor/skills/deco-apps-architecture/website-app.md, line 91:

<comment>Typo in the documented prop name (`whilelistURLs`) makes the API reference misleading; use an allowlist/whitelist spelling consistent with the rest of the docs.</comment>

<file context>
@@ -0,0 +1,169 @@
+  seo?: Seo;                 // Default SEO meta
+  theme?: Section;           // Theme section (CSS variables)
+  disableProxy?: boolean;    // Disable image/asset proxy
+  whilelistURLs?: string[];  // Allowed proxy URL patterns
+}
+```
</file context>
Fix with Cubic

Combine expanded key principles (12 items) and architecture sections
from main with template references and Related Skills table from PR.
Keep detailed gotchas (45 items) from main.

Made-with: Cursor
@JonasJesus42
JonasJesus42 merged commit e3f641d into main Mar 11, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

vibe-dex added a commit that referenced this pull request May 1, 2026
…checklist (#109)

Two stale areas in the deco-to-tanstack-migration skill, plus one
brand-new reference distilling battle-tested cleanup patterns.

## Changes

### `templates/vite-config.md` — drop ~80 lines of stub duplication

The old template inlined the entire `deco-server-only-stubs` plugin
(react-dom/server, node:async_hooks, node:stream, node:stream/web,
tanstack-head-scripts) — ~60 lines that exactly mirror what
`@decocms/start/vite`'s `decoVitePlugin()` already does.

The new template uses `decoVitePlugin()` and adds the production-grade
boilerplate that real sites actually need (and that the old version
omitted): VTEX dev proxy, CSP frame-ancestors header, build sourcemap,
PLUGIN_WARNING filter, react-compiler config, `pure: ["console.log"]`,
and the full `dedupe` list including `@decocms/start` + `@decocms/apps`.

### `references/vite-config/README.md` — fix "minimal" config that was broken

The "post-migration minimal config" was missing `decoVitePlugin()`
entirely. Without it, the client bundle crashes on transitively imported
server modules. Added the plugin + the minimum dedupe list, and
cross-referenced the full template.

### `references/post-migration-cleanup.md` — NEW

Dedicated reference distilling the cleanup work that surfaces on every
real migration:

1. Detect + delete unused `src/lib/*` shims (with a copy-paste detection
   script). Real-world data: baggagio-tanstack had 11 generated shims
   and 0 actual users; casaevideo had 11 generated and 1 used.
2. Drop the `site-manual-chunks` and `deco-stub-meta-gen` inline plugins
   that are now framework-provided in `@decocms/start >= 2.5.0`.
3. Drop the `runtime.ts` `invoke` shim — `@decocms/start/sdk` exports
   both `invoke` (singleton) and `createAppInvoke` (typed factory).
4. Drop site-local `withSiteGlobals` workaround — framework helper is
   now opt-in and tested.
5. Verify VTEX util imports point direct at `@decocms/apps/vtex/...`,
   not at dead `~/lib/vtex-*` shims (the migration script's stale
   `phase-cleanup.rewriteVtexUtilImports` was silently regressing
   them).
6. Search for orphan `TODO: move into framework` comments and either
   migrate, file an issue, or delete.

Plus a verification checklist.

## Why now

Validated in this session against three reference sites
(casaevideo-storefront, baggagio-tanstack, casaevideo). Each cleanup
step has a corresponding shipped or in-flight PR (#103/#106/#107/#108
on framework, #5/#6/#7 on baggagio-tanstack), so the checklist isn't
speculative.

## Scope discipline

This PR only edits skill content; no source/runtime changes. Both
`.agents/skills/` and `.cursor/skills/` copies stay in sync.

Made-with: Cursor
guitavano added a commit that referenced this pull request Nov 17, 2026
…anStack Start, esbuild) (#832)

Closes the open Dependabot alerts in one PR, with the lockfile. The
Dependabot PRs (#811, #828, #747) only touch `package.json`, so they all
fail `bun install --frozen-lockfile` in CI.

| Package | From | To | Alerts |
|---|---|---|---|
| `react-server-dom-webpack` (tanstack-rsc-smoke) | 19.2.7 | 19.2.9 |
#19, critical: RSC RCE, GHSA-xqc2-xf4c-x3h3 |
| `react` / `react-dom` (all pinned workspaces) | 19.2.7 | 19.2.9 | peer
floor of the above |
| `next` (nextjs, compat-v7, nextjs-binding-smoke) | 16.3.8 | 16.4.6 |
#10–12, #14, #15, #17, #18, #20–22 |
| `@tanstack/react-start` (tanstack, compat-v7, smokes) | 1.168.58 |
1.168.61 | #2–4, #7, #9 |
| `@tanstack/react-router` | 1.170.39 | 1.170.42 | the version
react-start 1.168.61 pins, so it stays a single copy |
| `esbuild` (blocks, tanstack, compat-v7) | ^0.27.3 | ^0.28.2 | #5, #6,
#8 (low) |

`bun.lock` was regenerated with bun 1.3.5 (the `packageManager`). React
dedupes to a single 19.2.9 at the root, with no nested copies. Vite
still has its own transitive `[email protected]` (its own range); that is
outside our manifests.

Supersedes #811, #828 and #747.

### Verified locally (bun 1.3.5, node 24)
- `bun install --frozen-lockfile` ✅
- `bun run typecheck` ✅ · `bun run lint` ✅
- `bun x vitest run`: 3388 passed, 0 failed ✅ (includes
`tests/release.test.ts`)
- `examples/tanstack-worker-smoke`: build + smoke ✅
- `examples/nextjs-binding-smoke`: build + smoke ✅
- `examples/tanstack-rsc-smoke`: build + typecheck ✅

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Bumps several dependencies to clear open Dependabot security alerts,
including a critical RCE in `react-server-dom-webpack`
(GHSA-xqc2-xf4c-x3h3). The lockfile was regenerated so `bun install
--frozen-lockfile` passes — React dedupes to a single 19.2.9 copy.

**Dependencies**
- `react`, `react-dom`, and `react-server-dom-webpack` 19.2.7 → 19.2.9
- `next` 16.3.8 → 16.4.6
- `@tanstack/react-start` 1.168.58 → 1.168.61, with
`@tanstack/react-router` 1.170.42
- `esbuild` ^0.27.3 → ^0.28.2; Vite's own transitive `[email protected]` is
untouched
- Typecheck, lint, the full test suite (3388 passed), and the Next.js
and TanStack smoke builds all pass

<sup>Written for commit 123acc8.
Summary will update on new commits.</sup>

<a href="https://cubic.dev/pr/decocms/blocks/pull/832?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/832?returnTo=https%3A%2F%2Fgithub.com%2Fdecocms%2Fblocks%2Fpull%2F832&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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant