Skip to main content
The .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

{
  "$schema": "https://aipkg.org/schemas/aispec/1.0.0",
  "type": "object",
  "required": ["schema", "id", "version", "description", "authors", "capabilities"],
  "additionalProperties": false,
  "properties": {

    "schema": {
      "type": "string",
      "description": "Schema version URI. Must be 'https://aipkg.org/schemas/aispec/1.0.0'.",
      "const": "https://aipkg.org/schemas/aispec/1.0.0"
    },

    "id": {
      "type": "string",
      "description": "Package identifier. Lowercase, alphanumeric, hyphens and dots only. Must match the filename ({id}.aispec).",
      "pattern": "^[a-z][a-z0-9\\-\\.]{0,127}$",
      "maxLength": 128
    },

    "version": {
      "type": "string",
      "description": "Semantic version string. SemVer 2.0.0 format. Pre-release and build metadata supported.",
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
    },

    "description": {
      "type": "string",
      "description": "Short description shown in search results. Plain text only. Max 500 characters.",
      "minLength": 1,
      "maxLength": 500
    },

    "authors": {
      "type": "array",
      "description": "One or more author names.",
      "minItems": 1,
      "maxItems": 10,
      "items": { "type": "string", "minLength": 1, "maxLength": 200 }
    },

    "capabilities": {
      "type": "array",
      "description": "What this package provides. At least one required.",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": ["skill", "command", "agent", "prompt", "mcp-server", "lsp-server", "config", "hook", "theme"]
      },
      "uniqueItems": true
    },

    "targets": {
      "type": "array",
      "description": "APM monikers this package supports. Empty array or omitted means 'ai' (universal).",
      "items": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]{0,63}$" },
      "uniqueItems": true,
      "default": []
    },

    "title": {
      "type": "string",
      "description": "Human-readable display name. Falls back to id if omitted.",
      "maxLength": 256
    },

    "summary": {
      "type": "string",
      "description": "One-line summary (shorter than description). Used in some UI contexts.",
      "maxLength": 256
    },

    "releaseNotes": {
      "type": "string",
      "description": "What changed in this version. Markdown supported.",
      "maxLength": 10000
    },

    "projectUrl": { "type": "string", "format": "uri" },
    "repositoryUrl": { "type": "string", "format": "uri" },
    "repositoryType": { "type": "string", "enum": ["git", "svn", "mercurial", "other"] },
    "repositoryBranch": { "type": "string" },
    "repositoryCommit": { "type": "string" },
    "licenseExpression": { "type": "string" },
    "licenseFile": { "type": "string" },
    "iconFile": { "type": "string", "default": "icon.png" },
    "readme": { "type": "string", "default": "README.md" },

    "tags": {
      "type": "array",
      "description": "Search tags. Lowercase, alphanumeric and hyphens.",
      "maxItems": 30,
      "items": { "type": "string", "pattern": "^[a-z0-9\\-]{1,50}$" },
      "uniqueItems": true
    },

    "copyright": { "type": "string", "maxLength": 500 },
    "language": { "type": "string", "pattern": "^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$" },

    "modelCompatibility": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "minimumContextWindow": { "type": "integer", "minimum": 0 },
        "requiresToolUse": { "type": "boolean" },
        "requiresVision": { "type": "boolean" },
        "notes": { "type": "string", "maxLength": 1000 }
      }
    },

    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "filesystem:read", "filesystem:write",
          "network:outbound", "network:inbound",
          "process:exec",
          "clipboard:read", "clipboard:write",
          "env:read", "env:write",
          "secrets:read"
        ]
      },
      "uniqueItems": true
    },

    "mcpServers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "transport"],
        "additionalProperties": false,
        "properties": {
          "name": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]{0,63}$" },
          "transport": { "type": "string", "enum": ["stdio", "sse", "http", "websocket"] },
          "command": { "type": "string" },
          "args": { "type": "array", "items": { "type": "string" } },
          "url": { "type": "string", "format": "uri" },
          "env": { "type": "object", "additionalProperties": { "type": "string" } },
          "description": { "type": "string", "maxLength": 500 },
          "targets": { "type": "array", "items": { "type": "string" } }
        }
      }
    },

    "lspServers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "command"],
        "additionalProperties": false,
        "properties": {
          "name": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]{0,63}$" },
          "command": { "type": "string", "description": "Executable to launch. May reference a file bundled in lsp/ using {install_path}." },
          "args": { "type": "array", "items": { "type": "string" } },
          "transport": { "type": "string", "enum": ["stdio"], "default": "stdio", "description": "LSP servers always use stdio per the LSP specification." },
          "languages": {
            "type": "array",
            "description": "Language identifiers this server handles (e.g. 'python', 'typescript', 'rust'). At least one of languages or filetypes is recommended.",
            "items": { "type": "string" }
          },
          "filetypes": {
            "type": "array",
            "description": "File extensions this server handles (e.g. '.py', '.ts'). Alternative to or combined with languages.",
            "items": { "type": "string", "pattern": "^\\.[a-zA-Z0-9]+$" }
          },
          "env": { "type": "object", "additionalProperties": { "type": "string" } },
          "initializationOptions": {
            "type": "object",
            "description": "Passed verbatim to the LSP initialize request as initializationOptions.",
            "additionalProperties": true
          },
          "settings": {
            "type": "object",
            "description": "Workspace-level settings forwarded to the server via workspace/didChangeConfiguration.",
            "additionalProperties": true
          },
          "description": { "type": "string", "maxLength": 500 },
          "targets": { "type": "array", "items": { "type": "string" } }
        }
      }
    },

    "hooks": {
      "type": "array",
      "description": "Lifecycle hooks this package installs. Each entry declares an event, the path to its script or prompt file within the archive, and optional targeting.",
      "items": {
        "type": "object",
        "required": ["event", "path"],
        "additionalProperties": false,
        "properties": {
          "event": {
            "type": "string",
            "description": "The lifecycle event that triggers this hook.",
            "enum": [
              "PreToolUse",
              "PostToolUse",
              "Stop",
              "SubagentStop",
              "SessionStart",
              "SessionEnd",
              "UserPromptSubmit",
              "PreCompact",
              "Notification"
            ]
          },
          "matcher": {
            "type": "string",
            "description": "Glob pattern matched against the tool name. Only valid for PreToolUse and PostToolUse. Omit to match all tools."
          },
          "path": {
            "type": "string",
            "description": "Archive-relative path to the hook's script or prompt file (e.g. 'shared/hooks/pre-tool-use.md')."
          },
          "type": {
            "type": "string",
            "description": "Whether this hook runs as a prompt (sent to the model) or a script (executed as a subprocess).",
            "enum": ["prompt", "script"],
            "default": "prompt"
          },
          "description": { "type": "string", "maxLength": 500 },
          "targets": { "type": "array", "items": { "type": "string" } }
        }
      }
    },

    "dependencies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "version"],
        "additionalProperties": false,
        "properties": {
          "id": { "type": "string" },
          "version": { "type": "string" },
          "apms": { "type": "array", "items": { "type": "string" } },
          "optional": { "type": "boolean", "default": false }
        }
      }
    },

    "listed": { "type": "boolean", "default": true },

    "deprecated": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "message": { "type": "string", "maxLength": 1000 },
        "alternatePackageId": { "type": "string" },
        "alternatePackageVersion": { "type": "string" }
      }
    }
  }
}

Field Reference

Required Fields

FieldTypeNotes
schemastringMust be "https://aipkg.org/schemas/aispec/1.0.0"
idstringPackage ID. Must match filename. See Package Naming.
versionstringSemVer 2.0.0. See Versioning.
descriptionstring1–500 chars
authorsstring[]1–10 authors
capabilitiesstring[]At least one capability

Capability Values

ValueMeaning
skillProvides one or more AI skills (.md skill files)
commandProvides one or more slash commands
agentProvides one or more AI agent definitions
promptProvides system prompts or prompt templates
mcp-serverBundles or configures an MCP server
lsp-serverBundles or configures a Language Server Protocol server
configProvides configuration files for a platform
hookProvides one or more lifecycle hooks (declared via hooks[])
themeProvides UI theme or styling
A package may declare multiple capabilities.

Permission Values

ValueMeaning
filesystem:readReads files from the local filesystem
filesystem:writeWrites or modifies files
network:outboundMakes outbound network calls
network:inboundListens for inbound connections
process:execExecutes subprocesses
clipboard:readReads clipboard contents
clipboard:writeWrites to clipboard
env:readReads environment variables
env:writeModifies environment variables
secrets:readReads secrets or credentials
Platforms may enforce permissions at install or runtime. Installers must warn users when a package requests sensitive permissions (process:exec, secrets:read, env:write).

lspServers[] Fields

Each entry in lspServers configures one Language Server Protocol server the package installs.
FieldRequiredTypeNotes
nameYesstringUnique identifier within the package. Lowercase alphanumeric and hyphens.
commandYesstringExecutable to launch. Use {install_path} to reference bundled files in lsp/.
argsNostring[]Command-line arguments passed to the executable.
transportNostringAlways "stdio" (LSP specification). Default: "stdio".
languagesNostring[]Language identifiers this server handles (e.g. "python", "typescript").
filetypesNostring[]File extensions this server handles (e.g. ".py", ".ts").
envNoobjectEnvironment variables set before launching the server.
initializationOptionsNoobjectPassed verbatim to the LSP initialize request.
settingsNoobjectWorkspace settings forwarded via workspace/didChangeConfiguration.
descriptionNostringHuman-readable description. Max 500 chars.
targetsNostring[]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.
FieldRequiredTypeNotes
eventYesstringLifecycle event that triggers this hook. See event table below.
pathYesstringArchive-relative path to the hook file (e.g. "shared/hooks/pre-tool-use.md").
typeNostring"prompt" (sent to model) or "script" (executed as subprocess). Default: "prompt".
matcherNostringGlob pattern matched against the tool name. Only valid for PreToolUse and PostToolUse.
descriptionNostringHuman-readable description. Max 500 chars.
targetsNostring[]APM monikers this hook applies to. Empty means all platforms.
Hook event values:
EventTrigger
PreToolUseBefore any tool call. Use matcher to filter by tool name.
PostToolUseAfter any tool call completes. Use matcher to filter by tool name.
StopWhen the agent reaches a stopping point and returns control to the user.
SubagentStopWhen a subagent finishes and returns to its parent.
SessionStartAt the beginning of a new conversation session.
SessionEndAt the end of a conversation session.
UserPromptSubmitAfter the user submits a prompt, before the model responds.
PreCompactBefore the context window is compacted.
NotificationWhen the platform surfaces a system notification.

Examples

{
  "schema": "https://aipkg.org/schemas/aispec/1.0.0",
  "id": "git-helpers",
  "version": "1.0.0",
  "title": "Git Helper Skills",
  "description": "A collection of Git workflow skills for AI coding assistants.",
  "authors": ["Jane Developer"],
  "capabilities": ["skill"],
  "targets": ["claude-code", "copilot-vscode", "cursor"],
  "licenseExpression": "MIT",
  "projectUrl": "https://github.com/jane/git-helpers",
  "repositoryUrl": "https://github.com/jane/git-helpers",
  "repositoryType": "git",
  "tags": ["git", "workflow", "version-control"],
  "iconFile": "icon.png",
  "readme": "README.md"
}

Validation Rules

Beyond JSON Schema conformance, the registry enforces these additional rules:
  1. ID uniqueness: The combination of id + version must be unique on the registry.
  2. ID immutability: Once published, a version’s id cannot change.
  3. Version uniqueness: Once a version is published, it cannot be republished (even after deletion).
  4. Filename match: The .aispec filename must match the id field exactly.
  1. Icon format: iconFile must reference a valid square PNG (validated server-side).
  2. MCP server names: All mcpServers[].name values within a single package must be unique.
  3. LSP server names: All lspServers[].name values within a single package must be unique.
  4. Hook matcher scope: hooks[].matcher is only permitted when event is PreToolUse or PostToolUse. Setting it on any other event is a validation error.
  5. Hook capability: Packages that declare entries in hooks[] must include "hook" in capabilities.
  6. LSP capability: Packages that declare entries in lspServers[] must include "lsp-server" in capabilities.
  1. Dependency cycles: Circular dependencies are rejected at push time (server resolves the full graph).
  1. License: At least one of licenseExpression or licenseFile is strongly recommended. A warning (not error) is emitted if both are absent.

Relationship to .nuspec

.nuspec Field.aispec EquivalentNotes
<id>idSame
<version>versionSame format (SemVer)
<authors>authors[]Array instead of comma-delimited string
<description>descriptionSame
<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)modelCompatibilityNew