.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:
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)..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 multiplelib/ subdirectories, the most platform-specific file wins.
Resolution order within lib/ (highest priority first):
lib/{exact-moniker}/— most specific platform matchlib/{parent-moniker}/— parent in fallback graph (e.g.,lib/claude/when installing forclaude-code)lib/shared/— universal baseline
Compression
- The
.aispecmanifest 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
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 typespackage/— 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:
Creation and Extraction
- aipkg pack
- aipkg install
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.