nextjs-to-tauri
БесплатноБез исполняемых скриптовНе проверенUse when converting a Next.js 16 App Router static export into a Tauri 2 desktop app. Next.js 静态导出转 Tauri 2 / 打包 Next.js 为 Tauri 桌面应用. Covers native shell…
от rockbenben1 417 установок в других каталогахОб этом скилле
Next.js 16 → Tauri 2 Desktop App
Overview
Wrap a static-exportable Next.js 16 (App Router) app in a thin Tauri 2 native shell. Preserve web behavior while adding the export configuration and desktop integrations needed. Tauri serves the export from its embedded asset server. GitHub Actions can build the native shell when a local Rust toolchain is unavailable.
Core principle: Tauri loads the static export over its own asset protocol — which behaves differently from a real HTTP server. Most migration pain is path/routing resolution, not React.
When to use
- The app is (or can be) a static export (
output: "export") — diffing/formatting/calculator/viewer tools, no SSR-at-runtime needed. - You want a desktop/portable
.exe,.dmg,.AppImage, optionally with auto-update.
A live Node server, runtime API routes, SSR or server actions require a different packaging design, such as a separately assessed sidecar. This playbook covers Next.js static exports.
Keep Server Components and GET handlers that resolve fully at build time; verify their exported files rather than converting the whole app to "use client". Desktop hooks alone need the client boundary shown in the integration template. See static-export support.
Project changes
Adapt templates into the target project: Next config and package scripts, src-tauri/, selected desktop frontend code, icons, ignore rules and the build workflow. Preserve unrelated web behavior. Migration authorization covers these necessary local changes; do not add a separate approval before every file write. Signing-service configuration and publication follow the user's authorized scope.
Procedure
Adapt these steps to the repository. Supporting files contain the configuration and code templates.
Read-only assessment stops at findings and proposed checks. The bundled workflow verifies a draft before manual publication; desktop-app-standard has a separate direct-publication default. Preserve the requested release policy rather than mixing those workflows.
Package manager: the commands and desktop-build.yml assume Yarn Classic. In an npm or pnpm repo substitute the equivalent (npm ci / pnpm install --frozen-lockfile, npm exec --no -- tauri / pnpm tauri) and change the workflow's cache: and install line — cache: yarn fails outright when there is no yarn.lock.
Verify target-compatible stable versions (this playbook targets Tauri 2):
- npm: query the published 2.x versions of
@tauri-apps/cliand the plugins used, then confirm JS/Rust compatibility. An upstreamlatestin a higher major does not change this playbook's target. - crates: read and parse the package metadata as JSON, for example:
# Save metadata, then parse it as data. curl -sA x -o crates-tauri.json https://crates.io/api/v1/crates/tauri node -p "JSON.parse(require('fs').readFileSync('crates-tauri.json','utf8')).crate.max_stable_version"max_stable_versionis an upstream reference, not the install target when it is outside 2.x. Select published, non-yanked stable 2.x releases for core and each required plugin (tauri-plugin-opener,tauri-plugin-updater, …), and verify their compatibility. - actions:
gh api repos/actions/checkout/releases/latest --jq .tag_name(+actions/setup-node,Swatinem/rust-cache,actions/upload-artifact;tauri-apps/tauri-action@v1is the moving major tag — check its README, not the release list) - node: current Active LTS from the official schedule. Pin that major in
desktop-build.yml; do not uselts/*orlatest— CI would jump to a new line without a reviewed upgrade. engines.nodeis the code's real floor (take it from Next.js/Tauri CLI constraints), not a copy of the CI major;.nvmrcis optional.- optional: when
desktop-app-standardis available, its audit can supplement version and CI checks. The migration does not depend on installing another skill.
- npm: query the published 2.x versions of
Gate static export on Tauri in
next.config.*, using the explicitTAURI_BUILDflag shown below (gotcha #1). Existing reliable build gating can be retained. Merge into your existing config, keeping thenext-intlplugin wrapper:// The NextConfig annotation is load-bearing: spreading `{ output: "export" }` into an // un-annotated object literal widens output to `string`, and withNextIntl() then // rejects it — `yarn build:tauri` fails type-checking before it ever builds. import type { NextConfig } from "next"; import createNextIntlPlugin from "next-intl/plugin"; const withNextIntl = createNextIntlPlugin(); const isTauri = process.env.TAURI_BUILD === "1"; // set by `yarn build:tauri` const nextConfig: NextConfig = { // ...your existing config... ...(isTauri ? { output: "export", trailingSlash:
Установить nextjs-to-tauri в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл nextjs-to-tauri?
Use when converting a Next.js 16 App Router static export into a Tauri 2 desktop app. Next.js 静态导出转 Tauri 2 / 打包 Next.js 为 Tauri 桌面应用. Covers native shell, tray, optional updater and GitHub Actions. Existing Tauri maintenance uses desktop-app-standard.
Как установить скилл nextjs-to-tauri?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nextjs-to-tauri запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic