---
title: "Export a plugin as a Codex package [read]"
method: GET
path: "/plugins/{name}/export"
---

# Export a plugin as a Codex package \[read\]

`GET /plugins/{name}/export`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/plugins/{name}/export`
- Auth: HTTP bearer

One plugin, by the id GET /plugins shows, as a package. `format=claude` (or `grok`, the same folder) writes a Claude Code plugin folder that Grok installs as written: `.claude-plugin/plugin.json`, `skills/<name>/` and `.mcp.json` with each server `{type: http, url}`; an API-key server sends its key as a bearer token read from the `<SERVER>_API_KEY` environment variable (`AGENTSKY_API_KEY` for AgentSky's own), which both expand when they start it. `format=codex` writes a Codex portable plugin package: root `plugin.json` (with `extensions["com.openai"].interface`), `skills/<name>/` and root `mcp.json` (Agent Plugins 1.0.0: each server `{type: streamable-http, url}`) for the servers that need no key or sign in with OAuth. A server that signs in with an API key, which a plugin cannot carry, is named instead in an `api-key-setup` onboarding skill that adds it with `codex mcp add … --bearer-token-env-var`. No token is ever written. A bundle keeps its skills (its commands were installed as skills) and remote MCP servers; a skill is one plugin; a custom MCP server is a plugin with that server. Apps, tools, chat apps, Mac features and browser logins export the AgentSky plugin, AgentSky's own MCP server (API key) and help server, because Codex reaches them only through it. Write each file to `path` under one folder (base64 when `encoding` is base64, made executable when `executable`). 400 invalid_request without `format=codex|claude|grok`; 404 not_found for a bundle or MCP server the workspace has not added; 409 skill_empty for a skill with no saved version.

## Path parameters

- `name` string, required

## Query parameters

- `format` 'codex' | 'claude' | 'grok', required

## Response `200`

The package

- object
  - `format` 'codex' | 'claude' | 'grok', required
  - `plugin_id` string, required
  - `name` string, required: The package's kebab-case name
  - `files` object[], required: Every file of an exported package or marketplace, by its path from the root
    - `path` string, required
    - `encoding` 'utf-8' | 'base64', required
    - `content` string, required
    - `executable` boolean: Present and true for a file to make executable

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-03** `9a155f8dd3e8`: 2 warning, 2 info
  - added the new `claude` enum value to the `format` response property for the response status `200`
  - added the new `grok` enum value to the `format` response property for the response status `200`
  - added the new enum value `claude` to the `query` request parameter `format`
  - added the new enum value `grok` to the `query` request parameter `format`
- **2026-11-02** `0d435187cd55`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/plugins/:name/export/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/9a155f8dd3e8?raw)
