native-sdk — скилл для Claude Code: что делает и как установить
Скилл помогает ИИ-агенту создавать десктопные приложения через Native SDK на TypeScript и разметке .native. Нужен для настройки сборки, интерфейса и встроенной автоматизации.
npx skills add vercel-labs/native --skill native-sdk -a claude-codeЧто делает native-sdk
Скилл загружает контекст и правила для Native SDK. По умолчанию логика пишется на TypeScript в src/core.ts и компилируется сразу в машинный код без JS-рантайма или встроенного браузера. Интерфейс описывается декларативной разметкой в файлах .native. В качестве явной альтернативы SDK даёт шаблон ядра на Zig, а WebViews оставляет лишь опцией для веб-контента.
Внутри каждого приложения развёрнут детерминированный сервер автоматизации. Через него агент делает снимки экрана и считывает состояние окна. Для работы агенту понадобится глобально установленный CLI-пакет @native-sdk/cli, через который подтягиваются специализированные разделы документации вроде native-ui и ts-core.
Зрелой платформой для SDK пока остаётся macOS, тогда как сборки для Windows и Linux только тестируются в CI. Если проект использует классический стек с файловой системой или датами, логику придётся выносить в src/services/ за вызов Cmd.request.
Какие задачи решает
- инициализировать структуру нативного десктопного приложения
- связать разметку
.nativeс логикойsrc/core.ts - настроить манифест сборки
app.jsonилиapp.zon - автоматизировать тестирование запущенного окна через встроенный сервер
Примеры запросов агенту
- Инициализируй новое десктопное приложение на Native SDK с именем desktop_app
- Загрузи спецификацию native-ui и свяжи состояние Model с разметкой src/app.native
- Сделай снимок запущенного окна через automation сервер Native SDK
Как установить native-sdk
1Через Skills CLI (Vercel)
npx skills add vercel-labs/native --skill native-sdk -a claude-code2Вручную: положить файлы
~/.claude/skills/native-sdk/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/native-sdk/
1Через Skills CLI (Vercel)
npx skills add vercel-labs/native --skill native-sdk -a codex2Вручную: положить файлы
.agents/skills/native-sdk/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add vercel-labs/native --skill native-sdk -a cursor2Вручную: положить файлы
.cursor/skills/native-sdk/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install vercel-labs/native native-sdk2Вручную: положить файлы
.github/skills/native-sdk/SKILL.md1Через Skills CLI (Vercel)
npx skills add vercel-labs/native --skill native-sdk -a gemini-cli2Командой платформы
gemini skills install https://github.com/vercel-labs/native --path skills/native-sdkВручную: положить файлы
.devin/skills/native-sdk/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add vercel-labs/native --skill native-sdk -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Похожие
Вопросы о native-sdk
Как установить native-sdk в Claude Code?
Запустите команду npx skills add vercel-labs/native --skill native-sdk -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/native-sdk/SKILL.md.
Что делает native-sdk?
Скилл даёт агенту инструкции по разработке десктопных программ с компиляцией TypeScript в бинарный код. Он обучает модель синтаксису .native, структуре шаблона и командам CLI.
Включает ли скомпилированное приложение Node.js или WebView?
Нет, итоговый бинарник поставляется без JS-рантайма, интерпретатора и браузера. Оболочка WebView подключается только вручную, если в проект нужно встроить веб-страницу.
Исходный текст
SKILL.md · Apache-2.0
--- name: native-sdk description: Discovery skill for the Native SDK, the complete toolkit for building native desktop applications. Apps are authored in TypeScript + declarative Native markup (.native) by default and compiled to native code with no JS runtime in the binary; Zig cores are an explicit alternative, and WebViews are the optional web-content path. Use when the user asks what the Native SDK is, how to build a Native SDK app, author native UI, scaffold an app, configure app.json or legacy app.zon, add bridge commands, embed web content, package an app, test a running app, or automate a Native SDK app. allowed-tools: Bash(native:*), Bash(npx @native-sdk/cli:*) hidden: true --- # 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: ```bash 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 ```bash 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.
© vercel-labs · Apache-2.0 · vercel-labs/native