native-sdk
此技能为构建原生桌面应用提供完整指引:基于 TypeScript 与声明式 Native 标记编写应用,编译为无 JS 运行时的原生二进制;支持 Zig 核心与 WebView 嵌入,内置自动化服务器,可完成脚手架、UI 编写、桥接命令、打包与自动化测试全流程,显著降低桌面应用开发门槛。
npx skills add https://github.com/vercel-labs/native --skill native-sdkBefore / After 效果对比
1 组在没有这个技能之前,开发者需要手动查阅文档、配置构建系统、编写原生 UI 样板代码,还要处理跨平台编译问题,往往要花数小时才能跑通一个最小可运行的原生桌面应用,且容易在环境配置上出错。
此技能提供完整的 Native SDK 指引,用户通过几条命令即可初始化项目、获取核心技能内容,自动生成 TypeScript + Native 标记的初始三文件结构,并利用内置自动化服务器快速验证,将搭建时间从数小时缩短到几分钟。
Native SDK
The Native SDK is the complete toolkit for building native desktop applications. The primary authoring path is TypeScript app logic in src/core.ts plus declarative Native markup in .native files. The TypeScript core is checked and compiled ahead of time to native code, so the shipped binary contains no browser, WebView, JS runtime, or interpreter. Zig is how the toolkit itself works and is a first-class, explicitly chosen app-core alternative (--template zig-core); it is not the default inferred from the SDK's implementation. Every app embeds a deterministic automation server, so agents can snapshot, drive, and screenshot the running window. Desktop is the mature surface (macOS deepest, Linux and Windows exercised in CI); mobile embedding is experimental. WebView surfaces coexist as the optional path for embedding web content or hosting an existing web frontend.
Start here
This file is a discovery stub for agents that installed the Native SDK once with a skills installer such as npx skills add native-sdk. Before implementing or explaining Native SDK app work, use the installed CLI to discover and load the current skill content:
native skills list
native skills get core
native skills get native-ui
native skills get ts-core
Use native skills get core for initial orientation. For the default app-authoring path, load both native-ui (views, bindings, the app loop) and ts-core (the TypeScript subset, effects, subscriptions, and modules) before implementing. Load ts-services too when the tree has src/services/ or ordinary TypeScript needs filesystem/process/JSON/regex/Map/Date/class work behind Cmd.request. Use native skills get core --full when work reaches lower-level runtime wiring, WebViews, bridge/security, native capabilities, packaging, or debugging. Use native skills get automation when testing a running app, taking snapshots, requesting reloads, or using the built-in automation server. Use native skills get zig only for an existing Zig core, a toolkit extension, SDK implementation work, or a Zig 0.16 compile error.
Quick orientation
npm install -g @native-sdk/cli
native init my_app
cd my_app
native dev
native init my_app generates the primary three-file app: app.json, src/app.native (the markup view), and src/core.ts (Model, Msg, update). Existing app.zon manifests remain supported. Inspect the tree before editing an existing app and preserve the core language it already uses. src/main.zig means the app explicitly uses the Zig-core template; web-frontend shells additionally carry frontend/ and usually owned build/runtime wiring.
用户评价 (0)
发表评价
暂无评价
统计数据
用户评分
为此 Skill 评分