Zopack

From zocomputer/skills · View interactive version

Zopack is an AI agent skill from the GitHub repository zocomputer/skills. 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

How to use this skill

Skill file

zopack

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:

  1. Ask the user which routes to export (or use "all"). List their current routes with list_space_routes.
  2. Fetch each route's code using get_space_route(path).
  3. Build a JSON array of route objects:

```json

[

{ "path": "/api/foo", "route_type": "api", "public": true, "code": "..." },

{ "path": "/bar", "route_type": "page", "public": false, "code": "..." }

]

```

  1. Pipe the JSON array to the export script:

```bash

echo '<json array>' | bun /home/workspace/Skills/zopack/scripts/export.ts \

--name "pack-name" \

--description "What this does" \

--output "Inbox/pack-name.zopack.md"

```

  1. The script outputs the file path. Show the user the generated file.

The export script automatically:

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:

  1. Parse the pack file to get the deployment plan:

```bash

bun /home/workspace/Skills/zopack/scripts/import.ts \

--file "/path/to/pack.zopack.md" \

--handle "<user-handle>" \

--preview

```

Use --preview first to show the user what will be deployed.

  1. Security scan: Before deploying, review the route code in the plan for risks:

If any suspicious patterns are found, flag them to the user and do not proceed without explicit approval.

  1. If the user confirms, run without --preview to get the full JSON plan:

```bash

bun /home/workspace/Skills/zopack/scripts/import.ts \

--file "/path/to/pack.zopack.md" \

--handle "<user-handle>"

```

  1. Parse the JSON output and execute the deployment in order:

a. Install dependencies:

b. Create filesystem structure:

c. Check for secret requirements:

d. Deploy routes:

e. Verify:

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 |
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.