# Orderly Plugin Create

> Use when the user wants to scaffold / generate a new Orderly plugin project via the official `@orderly.network/devkit` (`orderly-devkit`) CLI. Triggers on "create Orderly plugin", "new Orderly plugin", "scaffold plugin", "generate plugin", "orderly-devkit create plugin".

- Skill: `orderlynetwork/orderly-plugin-create` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add orderlynetwork/orderly-plugin-create`
- Raw SKILL.md: https://api.skillmd.com/api/skills/orderlynetwork/orderly-plugin-create/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: orderlynetwork (https://skillmd.com/u/orderlynetwork)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/orderlynetwork/orderly-plugin-create

---


# Orderly plugin — create (CLI)

Scaffold a new plugin package using **`@orderly.network/devkit`** (the official template).

## When to use

- User wants to **generate a new plugin project** from the CLI template.
- After scaffolding, use **[orderly-plugin-write](../orderly-plugin-write/SKILL.md)** to develop plugin code.

## Prerequisites

- Node.js >= 20.19.0
- CLI: `npx orderly-devkit` (preferred if repo depends on the devkit) or `npx @orderly.network/devkit`

## Inputs to collect

Ask for these if missing. **For naming validation rules, see [reference.md § Naming conventions](reference.md#naming-conventions)**:

| Input | Flag | Description |
|-------|------|-------------|
| Plugin name | `--name` / `-n` | PascalCase, e.g. `BuySellButtons` |
| Plugin ID | `--id` / `-i` | Optional. Default: kebab-case of name, e.g. `buy-sell-buttons` |
| Interceptor target | `--interceptor` | Where the plugin UI appears (see table below) |
| Target directory | `--target` / `-t` | Where to create plugin folder. Default: `./<PluginName>` |

### Supported `--interceptor` targets

For SDK runtime targets, see:
- [shared interceptor targets](../_shared/orderly-plugin-reference.md#interceptor-targets)

The installed devkit's `--interceptor` choices are only scaffold defaults and may include legacy paths or omit newer SDK paths. If the desired target is missing, scaffold with any target and edit the generated `interceptors[].target` string manually; always verify the final path with the SDK Inspector.

> **Tip**: Use the Inspector tool in your development environment to discover all available interceptor target paths.

## Step 1 — Check CLI options

```bash
npx orderly-devkit create plugin --help
```

Or:

```bash
npx @orderly.network/devkit create plugin --help
```

Show the output to see available flags and current defaults.

## Step 2 — Confirm and run

After collecting inputs, summarize before running:

```
Plugin: <Name>
ID: <plugin-id>
Target: <path>
Interceptor: <interceptor-target>
```

Run from the parent directory (where the plugin folder should be created):

```bash
npx orderly-devkit create plugin \
  --name "<PluginName>" \
  --id "<plugin-id>" \
  --interceptor "<InterceptorTarget>" \
  --target "<path>"
```

Or with pnpm:

```bash
pnpm orderly-devkit create plugin \
  --name "<PluginName>" \
  --id "<plugin-id>" \
  --interceptor "<InterceptorTarget>" \
  --target "<path>"
```

## After creation

```
Plugin generated at: <target-directory>
```

### Generated structure

```
<target-directory>/
├── src/
│   ├── index.tsx      # Entry point, exports registerOrderlyPlugin()
│   ├── plugin.tsx     # Registration function with createInterceptor() and setup
│   ├── components/    # Widget / business-logic / UI layers
│   ├── types/         # TypeScript definitions
│   ├── i18n/           # LocaleProvider and locale messages
│   └── tailwind.css
├── package.json
├── tsconfig.json
├── tsup.config.ts
├── tailwind.config.cjs
├── README.md
├── .orderly-manifest.json  # Generated by the CLI after template download
└── pnpm-lock.yaml
```

### Next steps

1. **Review manifest**: Open `.orderly-manifest.json` to verify metadata.
2. **Verify generated metadata**: Open `src/plugin.tsx` and make sure `id`, `name`, `version`, and `orderlyVersion` are real values rather than unresolved or empty template placeholders.
3. **Develop plugin**: See **[orderly-plugin-write](../orderly-plugin-write/SKILL.md)** for:
   - Architecture patterns (Widget, Page, Layout)
   - Interceptor strategies (Enhance, Wrap, Replace)
   - Hooks usage and props typing
   - Setup, error hooks, and best practices
4. **Wire into app**: See **[orderly-plugin-add](../orderly-plugin-add/SKILL.md)** to add to `OrderlyAppProvider`.
5. **Publish**: See **[orderly-plugin-submit](../orderly-plugin-submit/SKILL.md)** for Marketplace submission.

## Reference

- [reference.md](reference.md) — create-command specific details (template variables, generated structure)
- [shared reference](../_shared/orderly-plugin-reference.md) — naming rules, interceptor targets, and manifest constraints

