Plugin creator

From lightspeedwp/.github · View interactive version

Plugin creator is an AI agent skill from the GitHub repository lightspeedwp/.github. Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update m

How to use this skill

Skill file

Plugin Creator

Quick Start

  1. Run the scaffold script:
# Plugin names are normalized to lower-case hyphen-case and must be <= 64 chars.
# The generated folder and plugin.json name are always the same.
# Run from the skill root (the directory containing this `SKILL.md`).
# By default creates in `~/plugins/<plugin-name>`.
python3 scripts/create_basic_plugin.py <plugin-name>
  1. Edit <plugin-path>/.codex-plugin/plugin.json when the request gives specific metadata.

The scaffold starts with valid defaults and must not contain [TODO: ...] placeholders.

  1. Generate or update the personal marketplace entry when the plugin should appear in Codex UI ordering:
# Personal marketplace entries default to `~/.agents/plugins/marketplace.json`.
python3 scripts/create_basic_plugin.py my-plugin --with-marketplace

Only specify --marketplace-name <name> when the default personal marketplace name is already

taken or installed and you need to seed a different new marketplace file:

python3 scripts/create_basic_plugin.py my-plugin \
  --with-marketplace \
  --marketplace-name team-local

Only use a repo/team marketplace when the user specifically asks for that destination:

python3 scripts/create_basic_plugin.py my-plugin \
  --path <repo-root>/plugins \
  --marketplace-path <repo-root>/.agents/plugins/marketplace.json \
  --with-marketplace

When the user specifies a marketplace path, make sure that marketplace is actually installed before

telling the user to reinstall from it. The default personal marketplace file at

~/.agents/plugins/marketplace.json is discovered implicitly, but other marketplace paths are not.

On Windows, use the equivalent path under the user profile.

  1. Generate/adjust optional companion folders as needed:
python3 scripts/create_basic_plugin.py my-plugin \
  --path <parent-plugin-directory> \
  --marketplace-path <marketplace-json-path> \
  --with-skills --with-hooks --with-scripts --with-assets --with-mcp --with-apps --with-marketplace

<parent-plugin-directory> is the directory where the plugin folder <plugin-name> will be

created (for example ~/plugins).

  1. Before handing back a generated plugin, run:
python3 scripts/validate_plugin.py <plugin-path>

For updates to an existing local plugin during development, keep the scaffold flow as-is and use the

reference instead of hand-editing marketplace files:

python3 scripts/update_plugin_cachebuster.py <plugin-path>

Prefer the helper default cachebuster unless the user explicitly asks for a specific override.

See references/installing-and-updating.md for the expected cachebuster and reinstall flow while iterating on an existing local plugin.

What this skill creates

~/.agents/plugins/marketplace.json, with plugins generally being stored in

~/plugins/<plugin-name>/.

Marketplace workflow

"personal marketplace" means the marketplace whose file is at that path.

when the user specifically requests it.

name is already taken and you need to seed a different new marketplace file.

already exists, its top-level name must already match.

marketplace.json file. With no argument it reads the default personal marketplace; with an

explicit path it works for repo/team marketplaces too.

{
  "name": "plugin-name",
  "source": {
    "source": "local",
    "path": "./plugins/plugin-name"
  },
  "policy": {
    "installation": "AVAILABLE",
    "authentication": "ON_INSTALL"
  },
  "category": "Productivity"
}
{
  "name": "personal",
  "interface": {
    "displayName": "Personal"
  },
  "plugins": [
    {
      "name": "plugin-name",
      "source": {
        "source": "local",
        "path": "./plugins/plugin-name"
      },
      "policy": {
        "installation": "AVAILABLE",
        "authentication": "ON_INSTALL"
      },
      "category": "Productivity"
    }
  ]
}

Required behavior

personal because that name is already taken or installed elsewhere.

proceeding. If the user prefers to run the write themselves, provide the exact scaffold command

and then continue from validation or subsequent plugin edits instead of leaving the workflow

vague.

or marketplace.json. Use the update flow documented in

references/installing-and-updating.md and scripts/update_plugin_cachebuster.py.

flow. That command is for explicit non-default marketplace configuration, not for the standard

~/.agents/plugins/marketplace.json path.

before giving reinstall instructions. Use codex plugin marketplace add <path-to-marketplace-root>

when that explicit marketplace has not been configured yet.

response with a short Codex app handoff. Say To view this in the Codex app: and write

View <normalized plugin name> and Share <normalized plugin name> as Markdown links, not raw

URLs or code spans.

The Share deeplink uses the same URL with &mode=share.

path from the scaffolded plugin. URL-encode the path segment and query value when needed.

the user clicks the link.

created or updated.

Reference to exact spec sample

For the exact canonical sample JSON for both plugin manifests and marketplace entries, use:

iterating on an existing local plugin, plus the new-thread pickup behavior after reinstall

Validation

After editing SKILL.md, run:

python3 ../skill-creator/scripts/quick_validate.py .

Before handing back a generated plugin, run:

python3 scripts/validate_plugin.py <plugin-path>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.