Skip to content

Publish your first package

By the end of this guide you will have a published skill package on the APKG registry. The whole process takes about five minutes.

  • APKG CLI installed — see Installation if you haven’t set it up yet.
  • An APKG registry account — sign up at apkg.ai if you don’t have one.

Authenticate so the CLI can publish on your behalf:

Terminal window
apkg login

You will be prompted for your username, password, and — if enabled — a multi-factor authentication code.

Verify you are logged in:

Terminal window
apkg whoami

You should see Logged in as <your-username>. See apkg login for details on credential storage and private registries.

Create a new directory and initialize it:

Terminal window
mkdir my-skill && cd my-skill
apkg init

The interactive wizard walks you through each field:

PromptWhat to enterDefault
Package name@<username>/my-skill@<username>/<directory>
Version0.1.00.1.0
Package typeskillskill
DescriptionA short summary of what the skill does(empty)
LicenseMITMIT
KeywordsComma-separated tags(empty)

The name must be scoped — @username/name or @org/name. If you are logged in, the wizard defaults to your username as the scope.

After answering the prompts, apkg init writes an apkg.json like this:

{
"name": "@alice/my-skill",
"version": "0.1.0",
"type": "skill",
"description": "A useful skill that reviews code",
"license": "MIT",
"keywords": ["code-review"]
}

A skill package needs at least one .md definition file (besides README.md) so that AI coding tools know what the skill does. Create a file — for example code-reviewer.md:

---
name: code-reviewer
description: Reviews code for bugs and quality issues
tools: Read, Grep, Glob
---
You are a code reviewer. When asked to review code, analyze it for:
- Bugs and logic errors
- Security vulnerabilities
- Performance issues
- Readability improvements
Provide clear, actionable feedback.

The YAML frontmatter declares the skill’s name, description, and which tools it needs. The body is the prompt that the AI assistant will use.

You can also add a README.md with a longer description for humans — apkg init automatically sets the readme field if the file exists.

Run the publish command from your package directory:

Terminal window
apkg publish

On success you will see the published package name, version, size, and integrity hash. The CLI checks that your package scope matches your logged-in username — if it doesn’t (for example, you’re publishing under an organization), a warning is shown, but publishing still succeeds if you are a member of that organization.

Confirm your package is live on the registry:

Terminal window
apkg info @alice/my-skill

You can also search for it:

Terminal window
apkg search my-skill
  • Package Types — The workflow is the same for agent, command, and rule packages — only the manifest type and content files differ.
  • apkg publish — Full reference for publish options and metadata.
  • dist-tag — Tag versions as latest, beta, or any custom label.
  • key — Sign packages with Ed25519 keys for provenance verification.
  • token — Create API tokens for CI/CD pipelines so you can publish without interactive login.
  • CLI Reference — Complete reference for all commands.