ts-services
Skill by vercel-labs
Guides authors writing TypeScript services under src/services for Native SDK apps. It covers typed Cmd clients, vendored npm, streaming, deadlines, cancellation, devhost simulation, and carrier choice. Aimed at developers adding or changing service modules.
Install ts-services
Built from the published package, never by AI.
git clone --depth 1 https://github.com/vercel-labs/native /tmp/native && mkdir -p ~/.claude/skills && cp -r /tmp/native/skill-data/ts-services ~/.claude/skills/ts-servicesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/vercel-labs/native /tmp/native && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/native/skill-data/ts-services ~/.gemini/antigravity-cli/skills/ts-servicesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is an authoring guide for Native SDK TypeScript services in src/services. Service code uses ordinary TypeScript beyond the deterministic core subset, such as fs, path, process, fetch, regexes, JSON, Map, Date, and classes supported by the pinned scriptc static tier. Exported functions become typed operations, and the core calls them through generated typed Cmd clients. Shared record shapes live in a core-class file that both sides import.
The guide also explains hermetic npm vendoring with the native vend command, streaming with emit, deadlines and cancellation, and the dev loop with native dev --core. It describes the child subprocess and in-process thread pool carriers and their authority differences. It is for developers who add or modify src/services modules or move Node-style work out of a core.
Written from the project's SKILL.md and checked against it.
What it can do
- Typed operation surfaceExplains how exported functions in src/services become typed operations with annotated request and result types.
- Generated typed clientShows calling service operations from the core through generated Cmd constructors with ok and err routes.
- Hermetic npm vendoringDescribes vendoring exact npm packages with native vendor and verifying them with hashes at build time.
- Streaming resultsCovers emitting typed chunks on a channel while the operation still returns one terminal result.
- Cancellation and deadlinesExplains cooperative cancellation tokens, deadline options, and per-carrier hard-stop behavior.
- Devhost simulationDescribes running service modules in an isolated worker with native dev --core and recording or replaying sessions.
- Carrier selectionCovers choosing the in-process pool or child subprocess carrier through app.zon settings.
What you need
- Native SDK toolchain with the native command
- Pinned scriptc compiler version from packages/core/package.json
- Node.js for the isolated devhost worker
Try asking
- Add a src/services module that parses feed text with a regex
- Vendor escape-string-regexp@5.0.0 into my Native SDK app
- Add streaming with cancellation to a long-running service operation
Good to know
- Synchronous static-tier operations only; async services wait for a later compiler phase.
- No JavaScript engine and no dynamic npm fallback.
- Child executables are desktop-only.
- In-process services share the app process, so a stack overflow or process.exit() takes the app down.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skill-data/ts-services/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md11 KB -
references/service-surface.md93 KB
Alternatives to ts-services
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
ts-services: common questions
Where should service TypeScript files live in a Native SDK app?
Service modules go under src/services as .ts files, and core imports of service files are not allowed. The core imports generated command constructors from @native-sdk/services instead.
How are npm packages used in a service?
Packages are vendored with an explicit native vendor command, which copies them into src/services/vendor and records exact versions and hashes. Builds never run npm or use the network.
What happens when a service ignores cancellation?
On the child carrier the child is killed and the next request starts a clean host. On the in-process carrier the thread is abandoned, the failure is routed, and a fresh instance is added to the pool.
How do I install ts-services?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is ts-services free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is ts-services safe to use?
It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to ts-services?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
