.aispec file is a UTF-8 JSON document stored at the root of an .aipkg archive. It describes the package’s identity, metadata, capabilities, targeting, dependencies, and embedded assets. It corresponds to NuGet’s .nuspec but uses JSON instead of XML and contains AI•Pkg-specific fields.
File naming:
{id}.aispec — the filename must match the id field inside the manifest.JSON Schema
Field Reference
Required Fields
| Field | Type | Notes |
|---|---|---|
schema | string | Must be "https://aipkg.org/schemas/aispec/1.0.0" |
id | string | Package ID. Must match filename. See Package Naming. |
version | string | SemVer 2.0.0. See Versioning. |
description | string | 1–500 chars |
authors | string[] | 1–10 authors |
capabilities | string[] | At least one capability |
Capability Values
| Value | Meaning |
|---|---|
skill | Provides one or more AI skills (.md skill files) |
command | Provides one or more slash commands |
agent | Provides one or more AI agent definitions |
prompt | Provides system prompts or prompt templates |
mcp-server | Bundles or configures an MCP server |
lsp-server | Bundles or configures a Language Server Protocol server |
config | Provides configuration files for a platform |
hook | Provides one or more lifecycle hooks (declared via hooks[]) |
theme | Provides UI theme or styling |
Permission Values
| Value | Meaning |
|---|---|
filesystem:read | Reads files from the local filesystem |
filesystem:write | Writes or modifies files |
network:outbound | Makes outbound network calls |
network:inbound | Listens for inbound connections |
process:exec | Executes subprocesses |
clipboard:read | Reads clipboard contents |
clipboard:write | Writes to clipboard |
env:read | Reads environment variables |
env:write | Modifies environment variables |
secrets:read | Reads secrets or credentials |
lspServers[] Fields
Each entry in lspServers configures one Language Server Protocol server the package installs.
| Field | Required | Type | Notes |
|---|---|---|---|
name | Yes | string | Unique identifier within the package. Lowercase alphanumeric and hyphens. |
command | Yes | string | Executable to launch. Use {install_path} to reference bundled files in lsp/. |
args | No | string[] | Command-line arguments passed to the executable. |
transport | No | string | Always "stdio" (LSP specification). Default: "stdio". |
languages | No | string[] | Language identifiers this server handles (e.g. "python", "typescript"). |
filetypes | No | string[] | File extensions this server handles (e.g. ".py", ".ts"). |
env | No | object | Environment variables set before launching the server. |
initializationOptions | No | object | Passed verbatim to the LSP initialize request. |
settings | No | object | Workspace settings forwarded via workspace/didChangeConfiguration. |
description | No | string | Human-readable description. Max 500 chars. |
targets | No | string[] | APM monikers this server applies to. Empty means all platforms. |
hooks[] Fields
Each entry in hooks declares one lifecycle hook the package installs. Requires the hook capability.
| Field | Required | Type | Notes |
|---|---|---|---|
event | Yes | string | Lifecycle event that triggers this hook. See event table below. |
path | Yes | string | Archive-relative path to the hook file (e.g. "shared/hooks/pre-tool-use.md"). |
type | No | string | "prompt" (sent to model) or "script" (executed as subprocess). Default: "prompt". |
matcher | No | string | Glob pattern matched against the tool name. Only valid for PreToolUse and PostToolUse. |
description | No | string | Human-readable description. Max 500 chars. |
targets | No | string[] | APM monikers this hook applies to. Empty means all platforms. |
| Event | Trigger |
|---|---|
PreToolUse | Before any tool call. Use matcher to filter by tool name. |
PostToolUse | After any tool call completes. Use matcher to filter by tool name. |
Stop | When the agent reaches a stopping point and returns control to the user. |
SubagentStop | When a subagent finishes and returns to its parent. |
SessionStart | At the beginning of a new conversation session. |
SessionEnd | At the end of a conversation session. |
UserPromptSubmit | After the user submits a prompt, before the model responds. |
PreCompact | Before the context window is compacted. |
Notification | When the platform surfaces a system notification. |
Examples
- Simple Skill Package
- MCP Server Package
- Multi-Capability with Dependencies
- LSP Server Package
- Hooks Package
Validation Rules
Beyond JSON Schema conformance, the registry enforces these additional rules:ID and version rules
ID and version rules
- ID uniqueness: The combination of
id+versionmust be unique on the registry. - ID immutability: Once published, a version’s
idcannot change. - Version uniqueness: Once a version is published, it cannot be republished (even after deletion).
- Filename match: The
.aispecfilename must match theidfield exactly.
Asset rules
Asset rules
- Icon format:
iconFilemust reference a valid square PNG (validated server-side). - MCP server names: All
mcpServers[].namevalues within a single package must be unique. - LSP server names: All
lspServers[].namevalues within a single package must be unique. - Hook matcher scope:
hooks[].matcheris only permitted wheneventisPreToolUseorPostToolUse. Setting it on any other event is a validation error. - Hook capability: Packages that declare entries in
hooks[]must include"hook"incapabilities. - LSP capability: Packages that declare entries in
lspServers[]must include"lsp-server"incapabilities.
Dependency rules
Dependency rules
- Dependency cycles: Circular dependencies are rejected at push time (server resolves the full graph).
License recommendation
License recommendation
- License: At least one of
licenseExpressionorlicenseFileis strongly recommended. A warning (not error) is emitted if both are absent.
Relationship to .nuspec
.nuspec Field | .aispec Equivalent | Notes |
|---|---|---|
<id> | id | Same |
<version> | version | Same format (SemVer) |
<authors> | authors[] | Array instead of comma-delimited string |
<description> | description | Same |
<packageType> | capabilities[] | Array of typed values instead of single type |
<dependencies targetFramework> | dependencies[].apms[] | APMs instead of TFMs |
<requireLicenseAcceptance> | (dropped) | Not supported |
<developmentDependency> | (dropped) | Not supported |
<semVerLevel> | (dropped) | Always SemVer 2.0.0 |
| (no equivalent) | capabilities[] | New |
| (no equivalent) | targets[] | New |
| (no equivalent) | permissions[] | New |
| (no equivalent) | mcpServers[] | New |
| (no equivalent) | lspServers[] | New |
| (no equivalent) | hooks[] | New |
| (no equivalent) | modelCompatibility | New |