Skip to content

apkg.json Schema Reference

The apkg.json file is the package manifest for every APKG package. It describes the package identity, type, dependencies, and type-specific metadata. You can create one interactively with apkg init.

Only three fields are strictly required:

{
"name": "@scope/my-package",
"version": "0.1.0",
"type": "skill"
}

These fields are shared by all package types.

FieldTypeRequiredDefaultDescription
namestringYesScoped package identifier
versionstringYesPackage version (semver)
typestringYesPackage type
descriptionstringNoHuman-readable summary of the package
licensestringNo"MIT"License identifier
keywordsstring[]No[]Tags for search and discovery
readmestringNoPath to a README file (auto-added by apkg init if README.md exists)

The package name must follow these rules:

  • Start with a scope: @username/name or @org/name
  • Use only lowercase letters, numbers, hyphens (-), dots (.), and underscores (_)
  • Start and end with a letter or number (after the scope prefix)
  • Be 214 characters or fewer

If you are logged in, apkg init defaults the scope to your username (e.g. @alice/my-tool).

Must be a valid semver string (e.g. 0.1.0, 1.0.0, 2.3.1). Each call to apkg publish must use a version that has not been published before.

Determines how the package is installed, what metadata fields are available, and whether automatic tool setup runs after installation. Valid values:

ValueDescriptionTool setupDocs
skillA reusable AI capabilityYesSkill
agentAn autonomous agent with tool bindingsYesAgent
commandA slash command for AI coding assistantsNoCommand
ruleA guideline or constraint for AI assistantsNoRule
mcp-serverA Model Context Protocol server
promptA prompt template
configA configuration package
libraryA shared library
compositeA bundle of multiple package types

Dependencies map scoped package names to semver ranges. They are managed with apkg add and apkg remove.

FieldTypeDescription
dependenciesobjectPackages required at runtime
devDependenciesobjectPackages needed only during development
peerDependenciesobjectPackages expected to be provided by the consumer

Add to each category with the corresponding flag:

Terminal window
apkg add @acme/utils # → dependencies
apkg add @acme/lint -D # → devDependencies
apkg add @acme/runtime -P # → peerDependencies

Example in apkg.json:

{
"dependencies": {
"@acme/utils": "^1.0.0"
},
"devDependencies": {
"@acme/lint": "^0.3.0"
},
"peerDependencies": {
"@acme/runtime": ">=2.0.0"
}
}

Skill packages ("type": "skill") can include an optional skill object.

FieldTypeDescription
skill.capabilitiesstring[]List of capabilities the skill provides
{
"name": "@acme/code-reviewer",
"version": "1.2.0",
"type": "skill",
"description": "AI-powered code review",
"license": "MIT",
"skill": {
"capabilities": ["code-review", "bug-detection"]
}
}

See Skill for tool setup details.

Agent packages ("type": "agent") can include an optional agent object.

FieldTypeDescription
agent.toolsobject[]Tools the agent depends on
agent.systemPromptstringInline system prompt text, or a path to a prompt file
agent.modelPreferencestring[]Ordered list of preferred model IDs

Each entry in agent.tools has the following shape:

FieldTypeDefaultDescription
namestringDisplay name for the tool
packagestringScoped package name
requiredbooleantrueWhether the tool is required

The systemPrompt field can be:

  • Inline text"You are a research assistant." — used as-is.
  • A file path"prompts/system.md" — the file is read from the package directory at setup time.
{
"name": "@acme/research-agent",
"version": "0.8.0",
"type": "agent",
"description": "Autonomous research agent",
"license": "MIT",
"agent": {
"tools": [
{ "name": "web-search", "package": "@acme/web-search", "required": true },
{ "name": "formatter", "package": "@acme/fmt", "required": false }
],
"systemPrompt": "prompts/system.md",
"modelPreference": ["claude-sonnet-4-6"]
}
}

See Agent for tool setup details.

Command ("type": "command") and rule ("type": "rule") packages use only the base fields. They have no type-specific metadata.

See Command and Rule for usage details.

A full manifest for an agent package using every available field:

{
"name": "@acme/research-agent",
"version": "0.8.0",
"type": "agent",
"description": "Autonomous research agent that searches the web and synthesizes findings",
"license": "MIT",
"readme": "README.md",
"keywords": ["research", "web-search", "agent"],
"dependencies": {
"@acme/web-search": "^1.0.0",
"@acme/fmt": "^0.5.0"
},
"devDependencies": {
"@acme/test-harness": "^2.0.0"
},
"agent": {
"tools": [
{ "name": "web-search", "package": "@acme/web-search", "required": true },
{ "name": "formatter", "package": "@acme/fmt", "required": false }
],
"systemPrompt": "prompts/system.md",
"modelPreference": ["claude-sonnet-4-6"]
}
}
PageDescription
apkg initCreate a manifest interactively
apkg publishPack and upload to the registry
apkg addAdd dependencies to the manifest
Package TypesHow the type field determines package behavior