Export and import zo.space route setups as shareable .zopack.md files. Use when the user wants to package their zo.space routes for sharing, or when they receive a .zopack.md file to deploy. Triggers on "export my zo.space", "create a zopack", "import this zopack", or any mention of .zopack.md files.
Resources
7Install
npx skillscat add ethanthatonekid/zopack-cli Install via the SkillsCat registry.
Zopack
Based on the original community skill specification.
Package zo.space routes into a single shareable .zopack.md file that anyone can give to their Zo to deploy instantly.
Export
To export routes from the user's zo.space into a .zopack.md:
- Ask the user which routes to export (or use "all"). List their current routes with
list_space_routes. - Fetch each route's code using
get_space_route(path). - Build a JSON array of route objects:
[ { "path": "/api/foo", "route_type": "api", "public": true, "code": "..." }, { "path": "/bar", "route_type": "page", "public": false, "code": "..." } ] - Pipe the JSON array to the export script:
echo '<json array>' | bun /home/workspace/Skills/zopack/src/index.ts export \ --name "pack-name" \ --description "What this does" \ --output "Inbox/pack-name.zopack.md" - The script outputs the file path. Show the user the generated file.
The export script automatically:
- Detects the user's handle and replaces it with
{{HANDLE}} - Identifies npm dependencies not in the base zo.space install
- Detects shadcn/AnimateUI component imports and maps to registry URLs
- Finds filesystem paths referenced in code (directories, JSON files)
- Identifies required environment variable secrets
Import
Warning: Always use --preview before importing packs from untrusted sources. A zopack can specify arbitrary npm packages, shadcn registry URLs, and route code that will run on your Zo.
To import a .zopack.md file and deploy its routes:
Parse the pack file to get the deployment plan:
bun /home/workspace/Skills/zopack/src/index.ts import \ --file "/path/to/pack.zopack.md" \ --handle "<user-handle>" \ --previewUse
--previewfirst to show the user what will be deployed.Security scan: Before deploying, review the route code in the plan for risks:
fetch()orhttp/httpscalls to external URLs (data exfiltration)process.envaccess beyond expected secrets (credential harvesting)eval(),Function(), or dynamicimport()(arbitrary code execution)- Encoded/obfuscated strings (
atob,Buffer.from) hiding malicious payloads - Filesystem access outside
/home/workspace/(path traversal)
If any suspicious patterns are found, flag them to the user and do not proceed without explicit approval.
If the user confirms, run without
--previewto get the full JSON plan:bun /home/workspace/Skills/zopack/src/index.ts import \ --file "/path/to/pack.zopack.md" \ --handle "<user-handle>"Parse the JSON output and execute the deployment in order:
a. Install dependencies:
- npm packages:
cd /__substrate/space && bun add <package>for each - shadcn components:
cd /__substrate/space && npx shadcn@latest add <url> --yesfor each - For
shadcn:<name>entries, use:npx shadcn@latest add <name> --yes
b. Create filesystem structure:
- Directories:
mkdir -p /home/workspace/<dir>for each - Files: write each file with the specified initial content
c. Check for secret requirements:
- If secrets are listed, warn the user to configure them in Settings > Advanced before the routes will work
d. Deploy routes:
- Use
update_space_route(path, route_type, code, public)for each route in the plan - Deploy API routes before page routes (pages may depend on APIs)
e. Verify:
- Run
get_space_errors()to check for build/runtime errors - Report success or any issues
- npm packages:
Format reference
The .zopack.md format:
---
format: zopack
version: "1.0"
name: pack-name
description: "What this does"
author: handle.zo.computer
routes: 3
exported: 2026-02-21
---
# pack-name
Description text.
## Routes
### `/path` (api|page, public|private)
\```typescript|tsx
// route code here
\```
## Dependencies
**npm packages** (not in default zo.space):
- `package-name`
**Components** (install via shadcn CLI):
- `https://animate-ui.com/r/component-name.json`
- `shadcn:component-name`
## Setup
**Directories to create:**
- `Data/my-dir`
**Files to initialize:**
- `Data/state.json` with content: `[]`
**Secrets required** (configure in Settings > Advanced):
- `API_KEY_NAME`
## Variables
| Placeholder | Description |
|---|---|
| `{{HANDLE}}` | Your zo.space handle |