Official agent skill

Next Rspack

by vercel in vercel/next.js

Maintain @next/rspack-core and @next/rspack-binding packages.

OfficialMITAuto-check passedDevOps & Cloud

Install Next Rspack

skills CLI
$ npx skills add vercel/next.js --skill next-rspack -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vercel/next.js next-rspack --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vercel/next.js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/next-rspack .claude/skills/next-rspack && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
next-rspack
GitHub stars
143k
Token cost
~2k tokens
SKILL.md length
367 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Maintain @next/rspack-core and @next/rspack-binding packages.

  • Works in 7 steps: Get Upstream Version Information → Update npm Dependencies → Update Cargo.toml → …
  • Editing rspack/package.json
  • SKILL.md covers When to Use, Architecture Overview, Upgrade Process and Key Files Checklist, plus 5 more sections
  • Calls pnpm and cargo

What it does

Next Rspack is an agent skill from vercel/next.js, published by the product's own GitHub organization. Maintain @next/rspack-core and @next/rspack-binding packages. Use when editing rspack/package.json, rspack/crates/binding/Cargo.toml, rspack/rust-toolchain.toml, or packages/next-rspack/package.json. Covers upgrading @rspack/core npm version, rspack crate versions, Rust toolchain version, building and linking for local testing, and NEXTRSPACK environment variable usage. Does NOT apply to root rust-toolchain.toml (that's for Turbopack).

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Secrets management. It works with Rust, npm, Turborepo and Next.js. The licence is MIT.

When your agent uses it

  • Editing rspack/package.json
  • Rspack/crates/binding/Cargo.toml
  • Rspack/rust-toolchain.toml
  • Packages/next-rspack/package.json

Example prompts

  • “/next-rspack”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Get Upstream Version Information
  2. Update npm Dependencies
  3. Update Cargo.toml
  4. Update Rust Toolchain
  5. Verify Build
  6. Link to packages/next-rspack
  7. Run Tests

What it can do on your machine

Read from SKILL.md and the folder at commit a32ddfd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • rspack.rs

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Next Rspack loads about 2k tokens when it runs. Until then it costs about 114 tokens; SKILL.md has 367 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~114
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vercel/next.js at commit a32ddfd, republished under its MIT licence (© vercel). 367 words, ~1,989 tokens.

Download SKILL.mdSave it as .claude/skills/next-rspack/SKILL.md (or your agent's skills folder).
name
next-rspack
description
Maintain @next/rspack-core and @next/rspack-binding packages. Use when editing rspack/package.json, rspack/crates/binding/Cargo.toml, rspack/rust-toolchain.toml, or packages/next-rspack/package.json. Covers upgrading @rspack/core npm version, rspack_* crate versions, Rust toolchain version, building and linking for local testing, and NEXT_RSPACK environment variable usage. Does NOT apply to root rust-toolchain.toml (that's for Turbopack).
metadata.internal
true

Next.js with Rspack

When to Use

Use this skill when you need to:

  • Upgrade @rspack/core npm package version
  • Upgrade rspack crate dependency versions
  • Upgrade Rust version in rspack/rust-toolchain.toml (rspack directory only)
  • Fix Rspack-related compilation issues
  • Develop Rspack-specific features in Next.js

⚠️ Scope Limitation: This skill only applies to code and configuration under the rspack/ directory. The rust-toolchain.toml in the repository root is for Turbopack and is outside the scope of this skill.

Architecture Overview

Package Structure
rspack/                          # Independent workspace (separate rust toolchain and npm releases)
├── Cargo.toml                   # Rust workspace configuration
├── rust-toolchain.toml          # Rust version configuration
├── package.json                 # @next/rspack-core package definition
├── lib/
│   ├── index.js                 # Exports @rspack/core + custom plugins
│   └── index.d.ts               # Type definitions
└── crates/
    └── binding/
        ├── Cargo.toml           # Rust crate dependencies (rspack_* crates)
        └── package.json         # @next/rspack-binding package definition

packages/
└── next-rspack/
    └── package.json             # References @next/rspack-core
Dependency Graph
packages/next-rspack
    └── @next/rspack-core (rspack/package.json)
            ├── @rspack/core (npm dependency)
            └── @next/rspack-binding (rspack/crates/binding)
                    └── rspack_* crates (Cargo.toml dependencies)
Version Mapping Rules
@rspack/core npm versionrspack crate versionNotes
2.0.0-rc.00.100.0-rc.0npm major.minor maps to crate 0.(major*50+minor)
1.3.x0.53.xe.g., 1.3 → 0.53
1.2.x0.52.xe.g., 1.2 → 0.52

Upgrade Process

Step 1: Get Upstream Version Information

Query https://github.com/web-infra-dev/rspack to obtain:

  • Target @rspack/core npm version
  • Corresponding rspack crate version
  • Rust channel version from rust-toolchain.toml
Step 2: Update npm Dependencies

Edit rspack/package.json:

json
{
  "dependencies": {
    "@rspack/core": "<new version>",
    "@next/rspack-binding": "workspace:*"
  }
}
Step 3: Update Cargo.toml

Edit rspack/crates/binding/Cargo.toml, update all rspack crate versions:

toml
[dependencies]
rspack_binding_builder        = { version = "=<new crate version>" }
rspack_binding_builder_macros = { version = "=<new crate version>" }
rspack_core                   = { version = "=<new crate version>" }
rspack_error                  = { version = "=<new crate version>" }
rspack_hook                   = { version = "=<new crate version>" }
rspack_plugin_externals       = { version = "=<new crate version>" }
rspack_regex                  = { version = "=<new crate version>" }
# rspack_sources version is managed separately, may not follow the main version

[target.'cfg(...)'.dependencies]
rspack_binding_builder = { version = "=<new crate version>", features = ["plugin"] }

[build-dependencies]
rspack_binding_build = { version = "=<new crate version>" }
Step 4: Update Rust Toolchain

Edit rspack/rust-toolchain.toml:

toml
[toolchain]
profile = "default"
components = ["rust-src"]
channel = "<nightly version matching upstream rspack>"
Step 5: Verify Build
bash
# Execute in rspack directory
cd rspack

# Check Rust code
cargo check

# Build binding (requires Rust installed)
pnpm build

rspack/ is an independent workspace not included in the root pnpm-workspace, manual linking is required:

bash
# Execute from repository root
cd packages/next-rspack

# Link locally built @next/rspack-core
pnpm link ../../rspack

Or modify packages/next-rspack/package.json to use local path (for local testing only, do not commit):

json
{
  "dependencies": {
    "@next/rspack-core": "link:../../rspack"
  }
}

Important: After linking, run pnpm install in the root directory to update dependency relationships.

Step 7: Run Tests
bash
# Execute from repository root
pnpm test-rspack
Show full SKILL.md (156 more words)Show less

Key Files Checklist

Files to check/modify during upgrade:

File PathModification
rspack/package.json@rspack/core version, package version
rspack/crates/binding/Cargo.tomlrspack_* crate versions
rspack/crates/binding/package.jsonbinding package version
rspack/rust-toolchain.tomlRust nightly version
packages/next-rspack/package.json@next/rspack-core version reference (update on release, use link for local testing)

Pre-requisites for Local Testing

Before running pnpm test-rspack, you must build and link @next/rspack-core:

bash
# 1. Build @next/rspack-core
cd rspack
pnpm install
pnpm build

# 2. Link to packages/next-rspack
cd ../packages/next-rspack
pnpm link ../../rspack

# 3. Return to root and update dependencies
cd ../..
pnpm install

# 4. Run tests
pnpm test-rspack

Note: After modifying Rust code under rspack/, you need to re-run pnpm build from step 1.

Test Commands

bash
# Full test suite (using Rspack compiler)
pnpm test-rspack

# Development mode tests
pnpm test-dev-rspack

# Production mode tests
pnpm test-start-rspack

# Run specific tests only
pnpm run with-rspack pnpm testonly -- <test-pattern>

All test commands set environment variables via with-rspack:

bash
cross-env NEXT_RSPACK=1 NEXT_TEST_USE_RSPACK=1

Development Notes

Environment Variable Differentiation

Use the NEXT_RSPACK environment variable to differentiate compilers in packages/next/ code:

typescript
// Check if using Rspack
const isRspack = Boolean(process.env.NEXT_RSPACK)

if (process.env.NEXT_RSPACK) {
  // Rspack-specific logic
} else {
  // Webpack logic
}
Common Code Locations
  • Compiler selection logic: packages/next/src/lib/bundler.ts
  • Webpack configuration: packages/next/src/build/webpack-config.ts
  • Loader adaptations: packages/next/src/build/webpack/loaders/
Custom Plugins

@next/rspack-core exports = @rspack/core + custom plugins:

  • NextExternalsPlugin - externals handling plugin implemented in Rust

Release Process

Release via GitHub Actions workflow:

  • Workflow: .github/workflows/release-next-rspack.yml
  • Supports dry-run mode
  • Supports multiple npm tags (latest, alpha, beta, canary)

References

© vercel, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/next-rspack of vercel/next.js.

Open the folder on GitHubat commit a32ddfd

Compare with similar skills

Next Rspack next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Next Rspack compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Next Rspack this skillvercel/next.js143k—~2kAutomated safety check: PassMIT
Thesvgglincker/thesvg2.8k—~1.5kAutomated safety check: PassMIT
CI Pipeline Synthesizerkajisho5/ffmpeg-skill1.9k1 repos~1.1kAutomated safety check: PassMIT
Convex Self Hostingwaynesutton/markdown-site628—~1.4kAutomated safety check: PassMIT
Finalizezifeo/lade133—~1kAutomated safety check: PassMPL-2.0
Network Proxydidi/mpx3.9k—~464Automated safety check: PassApache-2.0

Similar skills

  • Thesvg

    glincker/thesvg

    Fetch brand SVG logos and cloud architecture icons (AWS, Azure, GCP) from theSVG.

    2.8k GitHub stars~1.5k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • CI Pipeline Synthesizer

    kajisho5/ffmpeg-skill

    Generate GitHub Actions CI/CD pipeline configurations for automated building and testing of library and package projects.

    1.9k GitHub starsUsed in 1 repo~1.1k tokens
    DevOps & CloudAuto-check passed
  • Convex Self Hosting

    waynesutton/markdown-site

    Integrate Convex static self hosting into existing apps using the latest upstream instructions from get-convex/self-hosting every time.

    628 GitHub stars~1.4k tokensUpdated 4 mo ago
    DevOps & CloudAuto-check passed
  • Finalize

    zifeo/lade

    Finalize a merge request: rebase onto main, run bugs, simplify, and specs in parallel, apply, then refactor last.

    133 GitHub stars~1k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Helps when network-related commands (like curl, git, npm, pip, brew) are failing, timing out, or running slowly due to network issues.

    3.9k GitHub stars~464 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Tokf Run

    mpecan/tokf

    Compress verbose CLI output with tokf before returning results.

    199 GitHub stars~571 tokensUpdated today
    DevOps & CloudAuto-check passed

More from vercel/next.js

All 27 skills in this repo
  • Gh Stack

    vercel/next.js

    Official

    Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.

    143k GitHub starsUsed in 7 repos~2.3k tokens
    Auto-check passed
  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Next Dev Loop

    vercel/next.js

    Official

    Verify Next.js runtime behavior after editing app code. An agent skill from vercel/next.js.

    143k GitHub starsUsed in 9 repos~2.3k tokens
    Auto-check passed
  • Docs Diagrams

    vercel/next.js

    Official

    Draw diagrams for the Next.js docs in the style of the ones already published there: the light/dark PNGs an mdx references with <Image srcLight="/docs/light/<name.png" srcDark="/docs/dark/<name.png".

    143k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Official

    Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces.

    143k GitHub starsUsed in 6 repos~8.3k tokens
    Auto-check passed
  • React Sync

    vercel/next.js

    Official

    Build local React changes in the bundle variants consumed by Next.js, sync them into a local Next.js checkout, and test the resulting integration.

    143k GitHub stars~486 tokensUpdated today
    Auto-check passed

Categories

Questions about Next Rspack

What does Next Rspack do?

Maintain @next/rspack-core and @next/rspack-binding packages. js, published by the product's own GitHub organization. Maintain @next/rspack-core and @next/rspack-binding packages.

When should I use Next Rspack?

Next Rspack fits situations like: editing rspack/package.json; rspack/crates/binding/Cargo.toml; rspack/rust-toolchain.toml; packages/next-rspack/package.json.

How do I install Next Rspack in Claude Code?

Run `npx skills add vercel/next.js --skill next-rspack -a claude-code`. Or copy the skill folder (.agents/skills/next-rspack in vercel/next.js) into .claude/skills/next-rspack in your project. Claude Code loads it when a task matches its description.

How do I install Next Rspack in Codex?

Run `npx skills add vercel/next.js --skill next-rspack -a codex`. Or copy the skill folder (.agents/skills/next-rspack in vercel/next.js) into .agents/skills/next-rspack in your project. Codex loads it when a task matches its description.

Can I use Next Rspack in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vercel/next.js --skill next-rspack -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/next-rspack, .gemini/skills/next-rspack, .github/skills/next-rspack and .opencode/skills/next-rspack in your project.

What does Next Rspack need to run?

Going by SKILL.md and its folder, Next Rspack needs the command-line tools its instructions call (pnpm and cargo).

Does Next Rspack access the network?

SKILL.md names 2 domains. As links in the text: github.com and rspack.rs. This is read from the text; nothing was executed.

Is Next Rspack safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Next Rspack use?

Next Rspack is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Next Rspack use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Next Rspack?

Skills that share tags, products or a category with Next Rspack: Thesvg (glincker/thesvg, 2.8k stars), CI Pipeline Synthesizer (kajisho5/ffmpeg-skill, 1.9k stars), Convex Self Hosting (waynesutton/markdown-site, 628 stars) and Finalize (zifeo/lade, 133 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Next Rspack?

vercel (a GitHub organization, an official publisher) maintains it in vercel/next.js, which has 143,241 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 8, 2026.

Source: vercel/next.js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.