Skip to main content
An .aipkg file is a ZIP archive (deflate or store compression) with a structured directory layout. The format is mechanically identical to .nupkg — any ZIP tool can read it — but the contents and naming conventions differ. Files on disk follow the naming convention:
Example: my-mcp-server.1.2.0.aipkg

Archive Structure


Manifest File: {id}.aispec

The manifest is a JSON file stored at the root of the archive.
The manifest must be named exactly {id}.aispec where {id} matches the id field inside the manifest, be valid UTF-8 with no BOM, and conform to the schema defined in Metadata Schema (spec 08).
The .aispec extension was chosen to mirror NuGet’s .nuspec and the .csproj naming pattern — the filename is self-identifying in a repository or file listing. Inside the archive, globbing for *.aispec reliably locates the manifest.

Directory Conventions

lib/

The lib/ folder is the primary content container. It holds all AI content the runtime deploys to the target platform. The runtime reads the manifest and lib/ together — it does not simply unzip files, but interprets content declarations and installs assets to the correct platform locations.

lib/shared/

Files in lib/shared/ are the universal baseline — installed on all platforms unless overridden by a platform-specific directory. There are no mandatory subdirectory names, but the following are conventional:

lib/{moniker}/

Files in lib/{moniker}/ apply only to the named platform (and its children in the APM fallback hierarchy). The same subdirectory conventions from lib/shared/ apply. A file at lib/claude-code/skills/my-skill.md overrides lib/shared/skills/my-skill.md when installing for claude-code.
Valid moniker directory names are the canonical APM names defined in Platform Targeting (spec 06). Unknown monikers are silently ignored by the runtime.

tools/

The tools/ folder contains executable binaries (MCP server executables, helper tools, scripts). The runtime extracts and registers these based on the host OS and architecture. Subdirectory names follow .NET RID conventions: The runtime selects the most specific matching subdirectory for the current host. If no exact match is found, any/ is used as a fallback.

images/

The images/ folder holds visual assets used by the registry and package documentation. No subdirectory structure is required.

File Conflict Resolution

When the same relative path exists in multiple lib/ subdirectories, the most platform-specific file wins. Resolution order within lib/ (highest priority first):
  1. lib/{exact-moniker}/ — most specific platform match
  2. lib/{parent-moniker}/ — parent in fallback graph (e.g., lib/claude/ when installing for claude-code)
  3. lib/shared/ — universal baseline
If the same relative path appears at multiple specificity levels, only the highest-priority copy is installed.
For a claude-code install, lib/claude-code/skills/demo.md takes precedence over lib/claude/skills/demo.md, which takes precedence over lib/shared/skills/demo.md.

Compression

  • The .aispec manifest file must be stored uncompressed (deflate level 0 / store method) to allow streaming reads without full archive extraction.
  • All other files may use deflate compression (level 1–9). Level 6 is recommended.
  • ZIP64 is supported and required when any single file exceeds 4 GB or the total archive exceeds 4 GB.

Size Limits

Archives exceeding these limits are rejected during push with a 413 response.

Reserved Paths

The following paths inside the archive are reserved and must not be created by package authors:
  • _rels/ — Open Packaging Conventions relationships
  • [Content_Types].xml — OPC content types
  • package/ — Reserved for future use
  • .signature.p7s — Reserved for future package signing

Signing

See Code Signing (spec 05) for the normative signing specification. The .signature.p7s path is reserved in all archives; the signing algorithm, trust model, and verification procedure are defined in that document.

MIME Type

The registered MIME type for .aipkg files is:
Use this when serving packages over HTTP.

Creation and Extraction

The aipkg pack command reads an .aispec file from the current directory (or a specified path), validates it, collects referenced files, and produces a {id}.{version}.aipkg archive.See SDK Interface (spec 10) for full CLI details.

Relationship to NuGet .nupkg

.aipkg is intentionally isomorphic with .nupkg:
This similarity is deliberate: existing NuGet tooling infrastructure (CDN, storage, streaming readers) requires minimal adaptation to serve .aipkg files.