You can also perform all of these actions directly through the user-friendly px0 Web Console at http://localhost:8000. If you prefer configuring your skill infrastructure programmatically using our API, you can follow the detailed step-by-step instructions below.
Prerequisites
Before starting, ensure you have:- Started local services and created an account. See Run px0 Locally for details.
- Retrieved your organization and team IDs and generated a programmatic API key. See Get an Access Key for details.
1. Create a Project
Create a project under your team. A project is a named container for your prompts and skills. Run the following request to create a project:2. Create a Skill Container
Option A: Create an Empty Skill Container
This initializes the skill with version 1 as an empty draft. Run the following request to create an empty skill container:Option B: Create a Skill and Upload a ZIP Package
This creates the skill, initializes version 1, and automatically unzips and saves the contents of your ZIP file to the database. First, create a simple ZIP file locally:3. Upload a ZIP Archive as a New Version
If you want to upload a package of files as a new draft version, you can upload a ZIP archive directly. This creates a new draft version containing the files inside the uploaded ZIP archive. First, create a ZIP archive containing your files:4. Retrieve and Edit Individual Files
Since versioning is managed at the skill level, your draft version serves as an active workspace where you can inspect and modify individual files.1. List Files in a Version
This returns metadata for all files, including paths, sizes, and timestamps, but omits the raw byte payload:2. Retrieve Individual File Content
Query the raw file content of an individual file by specifying its path:3. Upsert or Edit an Individual File
You can add a new file or update an existing one in the draft version workspace. If the file contains template variables (using Go’s template syntax), px0 can dynamically render the template variables on the fly. You can pass the template variables as query parameters or in the request body. Create a new fileconfig.json containing template variables:
4. Delete an Individual File
Delete a specific file from your draft workspace:5. Versioning, Branching, and Lifecycles
When your skill files are ready, you can publish them or create a new draft to continue iterating.Option A: Branch or Duplicate a Version
This automatically increments the skill’s version (creating version 2 as a draft) and copies all files from the source version workspace to the new version workspace:Option B: Promote the Version and Manage the Lifecycle
Move your version along the standard lifecycle pipeline: draft to stable, and stable to live. Note that once a version is promoted beyond draft, its files become immutable and cannot be updated, uploaded, or deleted.Step 1: Promote to Stable
Step 2: Promote to Live
Once a version is stable, you can promote it to live (this automatically demotes any previous live version of this skill to stable):Step 3: Demote or Archive a Version
If you need to archive or roll back a live version, you can demote or archive it. Demote Version 1 from live to stable:6. Download a Skill as a ZIP Package
At any point in the lifecycle, you can fetch the entire file structure of a specific version as a self-contained ZIP archive. If your files contain template variables, px0 can dynamically render them during the packaging process using variables passed in query parameters, request body, or avariables JSON string parameter.
To download the ZIP archive and dynamically render all template files (such as config.json):
config.json:
Summary of REST Endpoints
| HTTP Method | Route | Description | Role Requirement |
|---|---|---|---|
POST | /v1/projects/:projectID/skills | Create a skill (accepts JSON or ZIP form-data) | Editor / Admin |
GET | /v1/projects/:projectID/skills | List skills in a project | Viewer / Editor / Admin |
GET | /v1/skills/:id | Get skill metadata (ID or slug) | Viewer / Editor / Admin |
PUT | /v1/skills/:id | Update skill metadata (ID or slug) | Editor / Admin |
DELETE | /v1/skills/:id | Delete skill and all versions/files | Editor / Admin |
GET | /v1/skills/:id/versions | List versions for a skill | Viewer / Editor / Admin |
POST | /v1/skills/:id/versions | Create an empty draft version | Editor / Admin |
PUT | /v1/skills/:id/versions | Upload ZIP as a new draft version | Editor / Admin |
GET | /v1/skills/:id/versions/:version | Get version details | Viewer / Editor / Admin |
DELETE | /v1/skills/:id/versions/:version | Delete draft version | Editor / Admin |
POST | /v1/skills/:id/versions/:version/promote | Promote version (draft to stable to live) | Editor / Admin |
POST | /v1/skills/:id/versions/:version/demote | Demote version (live to stable) | Editor / Admin |
POST | /v1/skills/:id/versions/:version/archive | Archive version | Editor / Admin |
POST | /v1/skills/:id/versions/:version/duplicate | Branch/duplicate version files to new draft | Editor / Admin |
GET | /v1/skills/:id/versions/:version/download | Download version files as ZIP | Viewer / Editor / Admin |
GET | /v1/skills/:id/versions/:version/files | List file structures (no content payload) | Viewer / Editor / Admin |
GET | /v1/skills/:id/versions/:version/files/content | Retrieve individual file content | Viewer / Editor / Admin |
POST | /v1/skills/:id/versions/:version/files | Create or update a file in draft | Editor / Admin |
PUT | /v1/skills/:id/versions/:version/files | Update an existing file in draft | Editor / Admin |
DELETE | /v1/skills/:id/versions/:version/files | Delete an individual file from draft | Editor / Admin |

