AGENT SKILL

meteor-debugging

Use when diagnosing an unexplained failure in a Meteor 3 application before the failing layer or fix is known. Triggers on server crashes, client-only errors, Errors prevented startup, Meteor App - Error, stuck subscriptions, DDP or WebSocket disconnects, Minimongo/server data mismatches, hanging or flaky tests, slow builds, --inspect, console.log, .only, Playwright traces, Instrumentation lifecycle events, or requests to debug a Meteor app. Use this skill when evidence must distinguish Meteor tool, server, client, data, test, browser, mobile, or production boundaries. For test setup and authoring use meteor-testing; after confirming a domain cause, hand the repair to the owning skill.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 11
Forks
3

01 前言 Front Matter

name
meteor-debugging
license
MIT
metadata
{ "area": "ops", "kind": "workflow", "author": "meteor", "bundle": [ "essentials", "fullstack", "ops" ], "meteor": ">=3.0", "tagline": "Diagnose Meteor 3 failures across builds, server/client runtime, DDP, Mongo, tests, browsers, mobile, and production.", "docs_synced_at": "2026-10-07" }
description
Use when diagnosing an unexplained failure in a Meteor 3 application before the failing layer or fix is known. Triggers on server crashes, client-only errors, Errors prevented startup, Meteor App - Error, stuck subscriptions, DDP or WebSocket disconnects, Minimongo/server data mismatches, hanging or flaky tests, slow builds, --inspect, console.log, .only, Playwright traces, Instrumentation lifecycle events, or requests to debug a Meteor app. Use this skill when evidence must distinguish Meteor tool, server, client, data, test, browser, mobile, or production boundaries. For test setup and authoring use meteor-testing; after confirming a domain cause, hand the repair to the owning skill.

02 资源文件 7

03 SKILL.md 正文

Debug Meteor applications

Find the first failing boundary before changing behavior. Produce a stable reproduction, evidence for one cause, and a verification target. Then use the skill that owns the repair.

Diagnosis loop

  1. Record the exact symptom, complete error and stack, command or user action, Meteor release, resolved Atmosphere and npm versions, environment, and last known working state.
  2. Reproduce with the narrowest stable command or action before editing.
  3. Classify the first uncertain boundary with the table below.
  4. Read existing evidence before adding instrumentation. Compare client and server output, recent changes, and passing versus failing environments.
  5. Add one targeted observation only when current evidence cannot answer the question. Do not combine a diagnostic change with a speculative fix.
  6. State one falsifiable hypothesis and the observation that would reject it.
  7. Change one variable, reproduce, and trace a bad value or event backward to its origin.
  8. Fix the confirmed cause through the owning skill. Add a regression at the lowest reliable layer when the failure can recur.
  9. Re-run the focused reproduction, then the affected suite or production-like check. Remove temporary diagnostics and artifacts.

If several evidence-backed hypotheses fail, revisit the boundary map and assumptions before stacking mitigations or widening the change.

Select the boundary

Symptom First evidence Read
Build stalls, compilation error, rebuild regression, Rspack or SWC failure Full build output, --verbose, exact release and build-package versions Build debugging
Server crashes before startup or fails in a method, publication, job, or hook Earliest server stack, startup order, request-correlated evidence Runtime and inspector
Client stack, stale render, reactive loop, or client/server disagreement Browser stack, rendered state, reactive invalidation, server comparison Runtime and inspector, then the React or Blaze skill
Missing documents, stuck subscription, reconnect, or proxy/WebSocket symptom Server query, publication output, DDP state, subscription readiness, Minimongo DDP and data
Current output cannot distinguish an entry, guard, branch, state change, or event order A small set of redacted boundary observations Logs and instrumentation
Meteor Mocha failure, suite-only failure, async flake, or browser E2E failure Full hook output, client/server test counts, existing report and trace Tests and browser
Cordova or HCP problem, device-only failure, or live incident Device logs and versions; deployment logs, health, metrics, release diff Mobile and production

A syntax error needs its stack, not browser tracing. A browser-only hydration race needs client evidence, not a server inspector. Use the smallest tool that can reject the current hypothesis.

Evidence rules

  • Label runtime side and operation in temporary logs. Include a request or event identifier only when concurrent flows can interleave.
  • Record selected, redacted fields. Never log credentials, tokens, cookies, authorization headers, private settings, unrestricted method arguments, or full user documents.
  • Treat console.log as temporary instrumentation. Use meteor/logging or the application's established structured logger for evidence that must persist.
  • For server lifecycle evidence on Meteor 3.6, use the optional instrumentation package through Logs and instrumentation. Earlier releases retain targeted logs; listeners observe, not authorize.
  • Use .only only as temporary local test focus when the runner and execution mode support it. Remove it and run the broader suite before handoff.
  • Prefer observable readiness over sleeps: subscription ready, settled method, expected document, visible UI, or a specific browser event.
  • Inspect existing Playwright reports and traces before starting an interactive browser. For a playwright-cli request, first check whether the executable is available. If it is unavailable, obtain authority before installation or browser downloads. Explicitly report that availability result and request the authority rather than only asking for the application URL. Use it only for a real browser boundary.
  • For an authorized ad hoc playwright-cli reproduction: MUST run snapshot, console, and requests, start tracing before the failing action, stop tracing immediately after it, and close the browser session. Do not substitute source inspection for this browser evidence or omit the trace because the console or network already suggests a cause.
  • Use only an application path or URL the user placed in scope. If the current workspace has no app and the prompt gives no URL, ask for one. Do not scan unrelated directories, processes, or ports to discover an application.
  • Read through meteor shell and meteor mongo before mutating. Never use meteor reset --db as a diagnostic shortcut.
  • On production, do not expose an inspector, deploy a debug build, retain secret-bearing traces, or experiment on live data.

Handoffs

Confirmed cause Continue with
Test setup, design, driver, fixture, or new regression structure meteor-testing
SWC, Rspack, watcher, cache, build graph, or generated handoff meteor-modern-build-stack or migrate-to-rspack
Confirmed Cordova platform, native plugin/configuration, device networking, signing, or native HCP compatibility meteor-native
Method, publication, Mongo/Minimongo, React, Blaze, accounts, or security Matching domain skill
Galaxy, container, proxy, environment, health check, or rollout meteor-deployment
Documented community package behavior meteor-community-packages, then the upstream repository
Pure Node.js, browser, database, or runner failure with no Meteor boundary General debugging guidance

Cleanup

Before handoff:

  1. Remove only the logs, debugger statements, .only markers, pauses, temporary routes, and debug settings added for this investigation.
  2. Delete or protect screenshots, traces, profiles, saved browser state, and dumps according to their data sensitivity.
  3. Re-run the original reproduction and the affected suite.
  4. Report the confirmed cause, evidence, fix, verification, and any remaining uncertainty.

Anti-patterns

  • Edit the assertion before checking setup, async completion, and skipped client coverage.
  • Add logs across the application without a hypothesis.
  • Serialize every runtime object indiscriminately. Circular values, reactive wrappers, getters, binary data, and large documents need selected snapshots.
  • Treat a focused passing test as success when the suite still fails.
  • Add arbitrary sleeps, broad selectors, retries, or heap increases until the symptom disappears.
  • Install browser tooling or scaffold tests for a server, build, or database failure.

References

04 同仓库更多 Skills

meteor
meteor/agent-skills

migrate-to-rspack

Use when migrating an existing Meteor app to Rspack (Meteor 3.4+), or upgrading Rspack 1 to 2 on Meteor 3.6. Triggers on nested imports, mainModule entry points, server-only apps, replacing fourseven:scss / meteor/less / coffeescript / jorgenvatle:vite / zodern:melte with loaders, Svelte/TypeScript preprocessing or Lingui SWC plugin failures after upgrade, CommonJS default-import interop, module.exports in client graphs, Node built-ins in browser code, _build / build-assets / build-chunks, .meteorignore hiding handoff files, dynamic chunks under ROOT_URL, meteor.modules for CSS/HTML, resolve.symlinks or resolve.alias migration, automatic dependency updates and immutable CI/Docker builds. Use this skill when the user asks about migration compatibility or a build plugin's Rspack replacement. For new-app setup and rspack.config.js helpers, use meteor-modern-build-stack instead.

★ 11
meteor
meteor/agent-skills

migrate-to-meteor-3

Use when migrating a Meteor 2.x application to Meteor 3.x. Triggers on callAsync, *Async Mongo, removed Fibers, implicit-global ReferenceError, lost Blaze reactivity, a publish function returning a Promise, a scheduler dropping a Promise, a read API receiving update modifiers, async allow/deny, an Iron Router controller not running, "Method stub took too long", Atmosphere resolution, Express 5 WebApp handlers, lost async context, rawCollection callbacks, TypeScript declaration failures during upgrades, useTracker, and useSubscribe. Use this skill when the user asks about upgrading Meteor, async caller propagation, iterators with await, or replacing and forking packages. Standalone declarations and type-checking belong to meteor-typescript.

★ 11
meteor
meteor/agent-skills

meteor-typescript

Use when setting up or repairing Meteor application declarations, TypeScript configuration, JavaScript IntelliSense, or local and CI type-checking. Triggers on meteor types, meteor/* imports resolving to any, missing declarations, duplicate Meteor identifiers, zodern:types, @types/meteor, .meteor/types, tsconfig.json, jsconfig.json, and tsc --noEmit in a Meteor app. Use this skill when choosing or migrating declaration providers without changing the app's runtime or bundler. For a Meteor 2-to-3 runtime migration use migrate-to-meteor-3 first; for SWC/Rspack compilation use meteor-modern-build-stack or migrate-to-rspack. General TypeScript language questions and Atmosphere declaration publishing are outside this app scope.

★ 11
meteor
meteor/agent-skills

meteor-testing

Use when setting up, designing, writing, or repairing tests and test harnesses in a Meteor 3 app. Triggers on meteortesting:mocha, --driver-package, TEST_WATCH, TEST_BROWSER_DRIVER, MOCHA_GREP, meteor.testModule, focused tests, .only, Meteor.server.method_handlers, Meteor.server.publish_handlers, DDP.connect, --full-app integration mode, sinon, async test signatures, Playwright/Cypress E2E. Use this skill when the user asks about test runners, asks about testing publications, or asks about Jest vs Mocha in Meteor. For a failing, hanging, or flaky test whose failing layer or root cause is unknown, use meteor-debugging before changing the test or app.

★ 11
meteor
meteor/agent-skills

meteor-security

Use when auditing or hardening a Meteor 3 application. Triggers on missing check() on method arguments, missing this.userId guards on publications, browser-policy CSP, DDPRateLimiter rules, oauth-encryption via Accounts.config oauthSecretKey, audit-argument-checks, allow/deny legacy patterns, BrowserPolicy.content.disallowInlineScripts, BrowserPolicy.framing.disallow. Use this skill when the user asks about hardening, asks about a security review, or asks about CSP for a third-party script (Stripe, Google Maps, fonts).

★ 11
meteor
meteor/agent-skills

meteor-react

Use when building or debugging React interfaces in Meteor 3: meteor create --react, createRoot, JSX or TSX entry points, Rspack React detection, Fast Refresh, react-meteor-data, useTracker, useSubscribe, useFind, withTracker, Suspense, and Tracker.withComputation. Triggers on isLoading being treated as a boolean, useFind receiving fetch(), stale closure inputs, duplicate tracker side effects, unstable Suspense keys, lost reactivity after await, state reset after refresh, or React tests leaking computations. Use this skill when the user asks about a React skeleton, React Compiler, React-specific rspack.config rules, reactive data hooks, or classic versus Suspense integration. Route general bundler configuration to meteor-modern-build-stack and Meteor 2 upgrades to migrate-to-meteor-3.

★ 11