runtime-debug

Debugging and validation workflow for runtime packages and module-resolution regressions. Intended for diagnosing unexpected module inclusion, package size regressions, or CI failures related to NEXT_SKIP_ISOLATE, nft.json tracing, and runtime package selection (module.compiled.js). Covers CI environment images, obtaining full stack traces via __NEXT_SHOW_IGNORE_LISTED, route-trace checks, and webpack stats diff analysis. Metadata: internal use: true

Last repository push
GitHub Stars
143,631
Forks
32,732
Issues / PRs
4,112

Screenshots

A demonstration from skillπ Lab

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "runtime-debug" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f36ebe50550372800d05c521a822abe8036d8b5db9eb40b65273c59c7281f2a4. Verify the upstream source and version against https://github.com/vercel/next.js before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Debugging and validation workflow for runtime packages and module-resolution regressions. Intended for diagnosing unexpected module inclusion, package size regressions, or CI failures related to NEXT_SKIP_ISOLATE, nft.json tracing, and runtime package selection (module.compiled.js). Covers CI environment images, obtaining full stack traces via __NEXT_SHOW_IGNORE_LISTED, route-trace checks, and webpack stats diff analysis. Metadata: internal use: true

0 Downloads

Introduction source: third_party · vercel · 1.0.0 Reference

SkillPi interpretation

Tasks
Use this skill when reproducing runtime-bundle, module-resolution, or user-bundle inclusion regressions.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: runtime-debug
description: >
  Debug and verification workflow for runtime-bundle and module-resolution
  regressions. Use when diagnosing unexpected module inclusions, bundle
  size regressions, or CI failures related to NEXT_SKIP_ISOLATE, nft.json
  traces, or runtime bundle selection (module.compiled.js). Covers CI env
  mirroring, full stack traces via __NEXT_SHOW_IGNORE_LISTED, route trace
  inspection, and webpack stats diffing.
metadata:
  internal: true

Runtime Debug

Use this skill when reproducing runtime-bundle, module-resolution, or user-bundle inclusion regressions.

Local Repro Discipline

  • Mirror CI env vars when reproducing CI failures.
  • Key variables: IS_WEBPACK_TEST=1 forces webpack (turbopack is default), NEXT_SKIP_ISOLATE=1 skips packing next.js.
  • For module-resolution validation, always rerun without NEXT_SKIP_ISOLATE=1.

Stack Trace Visibility

Set __NEXT_SHOW_IGNORE_LISTED=true to disable the ignore-list filtering in dev server error output. By default, Next.js collapses internal frames to at ignore-listed frames, which hides useful context when debugging framework internals. Defined in packages/next/src/server/patch-error-inspect.ts.

User-Bundle Regression Guardrail

When user next build starts bundling internal Node-only helpers unexpectedly:

  1. Inspect route trace artifacts (.next/server/.../page.js.nft.json).
  2. Inspect traced server chunks for forbidden internals (e.g. next/dist/server/stream-utils/node-stream-helpers.js, node:stream/promises).
  3. Add a test-start-webpack assertion that reads the route trace and traced server chunks, and fails on forbidden internals. This validates user-project bundling (not publish-time runtime bundling).

Bundle Tracing / Inclusion Proof

To prove what user bundling includes, emit webpack stats from the app's next.config.js:

// next.config.js
module.exports = {
  webpack(config) {
    config.profile = true
    return config
  },
}

Then use stats.toJson({ modules: true, chunks: true, reasons: true }) and diff webpack-stats-server.json between modes. This gives concrete inclusion reasons (e.g. which module required node:stream/promises) and is more reliable than analyzer HTML alone.

Related Skills

  • $flags - flag wiring (config/schema/define-env/runtime env)
  • $dce-edge - DCE-safe require patterns and edge constraints
  • $react-vendoring - entry-base boundaries and vendored React

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 针对 Next.js 运行时包和模块解析回归提供系统化的调试与验证工作流
  • 适用于诊断模块包含、包体积回归、CI 失败等明确技术痛点,能有效提升内部开发效率
Trigger Precision92/100

Highlights

  • 触发描述精准完整,覆盖多种变体(NEXT_SKIP_ISOLATE, nft.json, runtime bundle selection),边界清晰
Structure and Standards85/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档实质包含了使用场景说明,但未使用 'When to Use' 显式章节标题

    Recommendation: 建议添加 'When to Use' 显式章节标题以提升结构规范性

Highlights

  • 结构清晰,分章节详述本地复现、堆栈追踪、用户包回归防护、包追踪等关键步骤
  • 包含端到端 webpack 配置示例,frontmatter 完整
Execution Reliability82/100

Areas to improve

  • 部分操作缺乏风险提示和异常处理说明 Reported severity: Minor

    修改 next.config.js 等操作未说明潜在风险或回滚方式,未覆盖 stats 文件生成失败等边缘异常

    Recommendation: 建议补充关键操作的风险提示和常见异常处理建议

Highlights

  • 提供了具体的环境变量设置、文件路径、webpack 配置代码和 stats 分析方法
  • 工具来源(Next.js 内部机制)明确,参数正确,覆盖了主要异常场景
Evidence Verifiability (mean of the first four)84/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.