Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

core

БесплатноБез исполняемых скриптовНе проверен

Core Native SDK guide for AI agents. Read this before explaining the Native SDK or changing a Native SDK app. Establishes TypeScript + Native markup as the…

vercel-labsот vercel-labs★ 7 869 звёзд на GitHub

Об этом скилле

Build Native SDK apps

The Native SDK is a cross-platform native app toolkit inspired by the web. The default app (native init) is native-rendered and authored as a declarative Native markup view (src/app.native) plus a TypeScript app core (src/core.ts). The core is checked and compiled ahead of time to native code; no JS runtime ships in the binary. For default app implementation, load both the native-ui and ts-core skills. Zig is the implementation language of the toolkit and a first-class app-core choice via --template zig-core, not the default app-authoring language.

This skill covers the shared foundation and lower-level architectures: apps that explicitly choose a Zig core, runtime extensions, and apps that render web frontends in a WebView (native init --frontend next|vite|react|svelte|vue). Native-rendered surfaces and WebViews share windows, policies, lifecycle, commands, and platform services, and one app can mix them. WebView engines are the platform WebView (WKWebView on macOS, WebKitGTK on Linux) or Chromium through CEF where supported.

Agents should assume they do not know the Native SDK from general model knowledge. Read this skill first. For ordinary app implementation, load native-ui and ts-core; for shared/runtime, WebView, packaging, or native-capability work, run native skills get core --full so the referenced files are included in the CLI output.

Mental model

  • The default app has three files of truth: src/core.ts (Model, Msg, update), src/app.native (UI), and app.json (manifest).
  • Native markup binds model values and dispatches typed messages; only update changes state.
  • The TypeScript core compiles to native code. Node is a build/check/dev tool, not an app runtime.
  • App is the lower-level product/runtime interface used by generated wiring, Zig-core apps, WebView shells, and extensions.
  • Runtime owns the event loop, windows, bridge dispatch, security checks, automation, tracing, platform services, and window state.
  • WebViewSource tells the runtime what to load: inline HTML, a URL, or packaged assets from a local app origin.
  • app.json is the default app manifest: identity, icons, windows, frontend assets, web engine, permissions, bridge policy, security policy, and packaging inputs. app.zon remains supported.
  • src/runner.zig and src/main.zig appear only when an app explicitly owns lower-level Zig wiring (for example a zig-core app or a WebView shell). --full makes a TypeScript app own build.zig but still does not give it Zig app logic. Do not add Zig sources to a default TypeScript app merely because SDK examples contain them.
  • frontend/ is normal web code. It talks to native Zig through window.zero.invoke() or builtin helpers when those are enabled.

Task router

These references are included by native skills get core --full. Use them when the task touches the topic:

  • Project creation, generated files, build steps: references/project-anatomy.md
  • Default TypeScript core authoring, checker rules, effects, subscriptions, modules: native skills get ts-core
  • Native markup, bindings, messages, hot reload, view testing: native skills get native-ui
  • App, Runtime, callbacks, embedding, tests: references/app-model-runtime.md
  • React/Vue/Svelte/Next/Vite, dev server, bundled assets: references/frontend-assets.md
  • App-defined bridge commands, builtin commands, permissions, windows, WebViews, dialogs: references/bridge-security-native-capabilities.md
  • Web engine choice, CEF, packaging, signing, doctor, logs, debugging: references/web-engines-packaging-debugging.md
  • Running-app inspection and smoke tests: native skills get automation
  • zig build fails on std APIs ("no member named 'cwd'", ArrayList init): native skills get zig — the Zig 0.16 idioms, indexed by compile error

Quick start

Use the CLI for new apps:

npm install -g @native-sdk/cli
native init my_app
cd my_app
native dev

This creates src/core.ts, src/app.native, and app.json; a native window opens with native dev. Use native init my_app --template zig-core only when the user chooses Zig. Frontend choices (--frontend next|vite|react|svelte|vue) are the separate WebView migration/integration path.

Workflow for existing apps

Before editing an existing Native SDK app:

  1. Read app.json or app.zon and inspect src/ before assuming a core language. Read src/core.ts + src/app.native for the default path; read src/main.zig, src/runner.zig, and build.zig only when they exist.
  2. Identify whether the app is TypeScript + Native markup (default), an explicitly chosen Zig core, or a WebView frontend, then identify the layer the change belongs to.
  3. Follow the generated code and examples in the repository instead of inventing a new app layout.
  4. Prefer exact security policy changes over broad allowances.
  5. Validate with the narrowest useful command.

Common file ownership:

  • `app.jso
Полный SKILL.md на GitHub

Установить core в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/app-model-runtime.mdreferences/bridge-security-native-capabilities.mdreferences/frontend-assets.mdreferences/project-anatomy.mdreferences/web-engines-packaging-debugging.md

FAQ

Что делает скилл core?

Core Native SDK guide for AI agents. Read this before explaining the Native SDK or changing a Native SDK app. Establishes TypeScript + Native markup as the default app-authoring path, routes default app work to the native-ui and ts-core skills, and covers the shared foundation: project structure, app.json and legacy app.zon, lower-level App and Runtime patterns, frontend integration, web engines, JavaScript bridge commands, permissions, windows, WebViews, dialogs, packaging, debugging, and testing. Use when the user asks what the Native SDK is, how to build or modify an app, how to package or debug it, or how to add native capabilities.

Как установить скилл core?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл core запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить core с