Sign inGet started
–

paperclip-create-plugin

by paperclipai/paperclip · Coding & Development

Scaffolds, develops, installs, and verifies Paperclip plugins using a CLI-first local development workflow.

Lift · GLM-5.3-flash+13ppdirectional · all models →
90
Trustsecurity · quality · license · upkeep
Scan Saferisk 0/100
LicenseMITserved via MCP
Claude Haiku 5.5 · GPT-6 Luna — not run yet
Pass-rate Lift+13pp95% CI [0, +38] · CI includes zero
screen tier · directionalchat harness (v2)
−100pp+100pp

Pass rate with the skill minus without, same tasks, same model.

baseline
75%
with skill
88%
forced
71%
Content Lift forced arm
0pp [−43, +43]
Trigger rate
100%
Trials
23 · 8 tasks
Model
GLM-5.3-flash
Measured
2026-10-15

Content Lift = the skill's instructions injected into the system prompt, so it measures what the content does once loaded, apart from whether the agent chooses to load it. Method →

Embed this score · live badge for your README
SkillzBench badge preview

The badge shows the real benchmark number and updates itself when we re-bench — including the honest states (“did not trigger”, “not benched yet”). All badge options →

Markdown[![SkillzBench](https://skillzbench.com/api/badge/paperclip-create-plugin.svg)](https://skillzbench.com/skills/paperclip-create-plugin)
+ cost/task[![SkillzBench](https://skillzbench.com/api/badge/paperclip-create-plugin.svg?cost=1)](https://skillzbench.com/skills/paperclip-create-plugin)
HTML<a href="https://skillzbench.com/skills/paperclip-create-plugin"><img src="https://skillzbench.com/api/badge/paperclip-create-plugin.svg" alt="SkillzBench benchmark" height="20"></a>

A/B outputs — median trial per arm

Chat harness (v2): the agent's final message without the skill (left) vs with it (right).

paperclip-create-plugin--m1
baseline · 0.15

I don't have reliable, verified details about a plugin-generation command for Paperclip (the paperclip.dev design tool), so I'd rather not invent a command and file list that could be wrong.

What I can tell you with confidence:

  • Paperclip's CLI is paperclip-cli (installed via npm i -g paperclip-cli or run with npx), and the main command you'll use is paperclip init, which scaffolds a paperclip.config.json in your project.
  • Your environment (macOS, Node 18) is fine — Paperclip's tooling targets modern Node versions.

For the dark-mode toggle itself, you likely don't need a plugin at all: Paperclip supports CSS variables and @variants/media-query syntax in .pc files, so a common approach is defining color tokens as CSS variables and swapping them under a prefers-color-scheme: dark media query or a root-level class.

To get the exact plugin-generation command and its output files, I'd recommend checking the official docs at paperclip.dev or the project's GitHub repo, since plugin APIs have changed between versions. If you can share the Paperclip version you're on, I can help you wire up the dark-mode theming directly in your .pc files.

with skill · 0.67

Run the scaffold command from anywhere (outside your Paperclip checkout is recommended):

paperclipai plugin init @acme/dark-mode-toggle \
  --output ~/dev/paperclip-plugins \
  --category ui \
  --display-name "Dark Mode Toggle" \
  --description "Adds a dark-mode toggle to designs"

This creates ~/dev/paperclip-plugins/dark-mode-toggle/ (the scope @acme/ is dropped from the folder name) containing:

  • src/manifest.ts — plugin manifest; declare your capabilities and UI slots here (this is where you'd register the toggle's slot; use routePath only on page slots)
  • src/worker.ts — worker entry point
  • src/ui/index.tsx — UI entry (your toggle component; keep it self-contained — no host UI component kit exists yet)
  • tests/plugin.spec.ts — placeholder test
  • package.json — includes a paperclipPlugin block pointing at dist/manifest.js, dist/worker.js, dist/ui/
  • .paperclip-sdk/ — only if you pass --sdk-path (useful if you're developing against a local Paperclip checkout)

Then to get it running:

cd ~/dev/paperclip-plugins/dark-mode-toggle
pnpm install
pnpm dev                                  # esbuild watch → dist/
paperclipai plugin install ~/dev/paperclip-plugins/dark-mode-toggle

The server watches dist/ for local-path plugins and restarts the worker on rebuild, so you won't need to reinstall after each edit. Verify with paperclipai plugin list / plugin inspect, and run pnpm typecheck, pnpm test, pnpm build before calling it done.

Notes for your setup: Node 18 is fine, but the workflow assumes pnpm is available. If paperclipai isn't on your PATH, the fallback is building and running packages/plugins/create-paperclip-plugin/dist/index.js directly from your Paperclip checkout. Also avoid ctx.assets — it's not supported in the current runtime.

paperclip-create-plugin--m2
baseline · 0.85

Rebuilding and testing a Paperclip plugin locally is straightforward:

Rebuild & see changes live

  1. Build the plugin from its directory:

    cd ~/projects/paperclip-plugins/icon-set
    npm run build
    

    (Typically this runs tsc or esbuild and outputs to lib/ or dist/. Check the build/main fields in the plugin's package.json to confirm the output path.)

  2. Point your project at the local plugin rather than the published version. In your Paperclip config file (paperclip.config.json) in the project that uses the plugin, reference the local path:

    {
      "plugins": {
        "icon-set": "/Users/you/projects/paperclip-plugins/icon-set"
      }
    }
    

    Alternatively, if the plugin is installed as a dependency, you can use npm link:

    # in the plugin directory
    npm link
    # in your project
    npm link paperclip-icon-set-plugin
    
  3. Restart the Paperclip dev server (paperclip dev or your pcdev command). Paperclip loads plugins at startup, so a rebuild alone isn't enough — restart the dev server after each rebuild. Then any .pc file changes will re-render through your updated transform.

    Tip: if you're iterating a lot, run npm run build -- --watch in the plugin so it recompiles on save, and just restart/reload the dev server to pick it up.

Where to put the unit test

Put it alongside the source, e.g. src/transform.test.ts (or a test/ directory if the plugin already has one). Since transform is a pure function, you can test it directly:

import { transform } from "./transform";

test("scales stroke width", () => {
  const result = transform("<svg stroke-width='2'>...</svg>", { /* options */ });
  expect(result).toContain("stroke-width='4'");
});

Then run with whatever the plugin is set up for (most Paperclip plugins use Jest or Mocha):

npm test

If the plugin doesn't have a test script yet, add jest (or vitest) as a dev dependency and a "test": "jest" script to package.json.

with skill · 0.70

Rebuild & see the change live

From ~/projects/paperclip-plugins/icon-set:

pnpm dev        # esbuild --watch: rebuilds dist/worker.js (etc.) on every save

If the plugin was installed via a local absolute path (paperclipai plugin install /home/you/projects/paperclip-plugins/icon-set), the Paperclip server watches dist/ and automatically restarts the plugin worker on each rebuild — no reinstall needed. Just keep pnpm dev running and your transform change goes live after the next rebuild.

If it was originally installed from npm rather than a local path, reinstall it locally:

paperclipai plugin install ~/projects/paperclip-plugins/icon-set

Then verify with:

paperclipai plugin list
paperclipai plugin inspect <plugin-key>

Unit test location

The scaffold includes a tests/ directory with a placeholder tests/plugin.spec.ts. Add a test file for your function there, e.g. tests/transform.spec.ts, importing directly from ../src/transform:

import { transform } from "../src/transform";

describe("transform", () => {
  it("applies stroke width", () => {
    // ...
  });
});

Then run:

pnpm test
pnpm typecheck

(You can run these in a second shell while pnpm dev keeps watching.)

paperclip-create-plugin--m3
baseline · 0.85

Here are the exact steps for both tasks:

1. Install the plugin into your team's Paperclip workspace

  1. Verify the plugin builds cleanly:

    cd ~/projects/paperclip-plugins/icon-set
    npm run build
    npm test
    
  2. Bump/confirm the version in package.json is 0.4.0 and commit any pending changes.

  3. Publish or distribute the plugin — pick the approach your team uses:

    • Private npm registry: npm publish --registry https://your-registry.example.com
    • Git-based install: push the 0.4.0 tag to the repo:
      git tag v0.4.0 && git push origin v0.4.0
      
  4. Install it in the workspace:

    • If your team's Paperclip workspace has a plugins directory or a workspace config (e.g. .paperclip/config.json or paperclip.config.js), add the plugin reference there:
      {
        "plugins": ["@yourorg/paperclip-icon-set@0.4.0"]
      }
      
    • Or install it as a dependency in the workspace root:
      cd ~/team/paperclip-workspace
      npm install @yourorg/paperclip-icon-set@0.4.0 --save
      
  5. Commit and push the workspace change so everyone picks it up, and have teammates run npm install (or their usual sync step) once.

  6. Verify: open a Paperclip file in the workspace and confirm the icon-set plugin's features load with the new strokeWidth behavior.

2. Document the new strokeWidth option

  1. In the plugin repo, open the docs (typically README.md and/or docs/options.md).
  2. Add an entry under the options section, e.g.:
    ### `strokeWidth`
    
    - **Type:** `number`
    - **Default:** `1`
    - **Description:** Sets the stroke width applied to icon outlines. Accepts any positive number; values are in the icon's coordinate units.
    - **Example:**
      ```json
      { "strokeWidth": 2 }
    
  3. If the plugin has a changelog (CHANGELOG.md), add a 0.4.0 entry noting the new option.
  4. Commit:
    git add README.md CHANGELOG.md
    git commit -m "docs: document strokeWidth option (0.4.0)"
    git push
    

If you tell me how your team distributes plugins (npm registry vs. git vs. a shared folder), I can tailor the install steps precisely.

with skill · 0.76

Here are the exact steps for both tasks:

1. Install v0.4.0 into the team workspace

Since this is a team/production install, npm-package deployment is the supported path (local-path installs are for development):

  1. Verify the build is current from ~/projects/paperclip-plugins/icon-set:
    pnpm typecheck
    pnpm test
    pnpm build
    
  2. Publish the package (npm or your team's private registry), making sure package.json version is 0.4.0 and the paperclipPlugin block points at dist/manifest.js, dist/worker.js, dist/ui/.
  3. Install into the workspace:
    paperclipai plugin install <published-package-name> --version 0.4.0
    
    (Note: --version only applies to npm installs — don't combine it with a local path.)
  4. Verify:
    paperclipai plugin list
    paperclipai plugin inspect <plugin-key>
    
    Confirm the plugin shows version 0.4.0 and status: ready. If it's anything else, check lastError.

If you'd rather install straight from the local folder for a quick rollout, paperclipai plugin install ~/projects/paperclip-plugins/icon-set works (local paths are auto-detected, or force with --local) — but note the server then watches that folder's dist/ output, so npm is the cleaner team-wide option.

2. Document the new strokeWidth option

Per the plugin authoring guide conventions:

  1. Update the plugin's own docs (e.g. its README or doc/ files in the plugin repo) with a section for strokeWidth:
    • Type, default value, allowed range/units
    • Which slots/commands it applies to
    • A short usage example
  2. If the option is declared in src/manifest.ts (e.g. as a setting or slot option), make sure the manifest metadata/description text matches the docs.
  3. Keep doc expectations in mind: describe only what the current runtime actually supports (no promises about host UI components or asset APIs), and be explicit that plugin code is trusted.
  4. Bump docs alongside the release — since you're publishing 0.4.0, include the doc update in the same version so plugin inspect output and published docs agree.

Then re-run pnpm build if manifest text changed, and reinstall/re-publish so the workspace picks up the updated metadata.

paperclip-create-plugin--m4
baseline · 0.82

Here's how to fix the React resolution failure and add a second command cleanly.

Fixing Cannot find module 'react'

The error means the bundler (used by paperclip plugin build) can't resolve react from the file that imports it. Common causes and fixes:

  1. Wrong install location. If you installed React globally or in a parent directory, the resolver won't find it. Install it as a local dependency in the plugin root:

    cd /path/to/chart-builder
    npm install react react-dom
    

    Verify it exists at node_modules/react relative to your plugin root.

  2. Peer dependency vs. direct dependency. If the host app already ships React, declare it as a peer dependency in package.json and make sure your bundler config marks it as external (so it isn't bundled twice at runtime):

    {
      "peerDependencies": {
        "react": "^18.0.0"
      }
    }
    

    If the host does not provide React, put it in dependencies instead and let the bundler include it.

  3. Bundler externals config. If your build config (e.g., esbuild/rollup/webpack) lists react in externals but the runtime doesn't provide it, either remove it from externals or map it to the host's global. Conversely, if you want it bundled, ensure it's not marked external.

  4. Clean reinstall to rule out a corrupted install:

    rm -rf node_modules package-lock.json
    npm install
    paperclip plugin build
    

Adding a second command

The cleanest approach is to keep one plugin package with multiple entry points rather than creating a separate plugin:

  1. Add a second entry file (e.g., src/command-two.ts) alongside your existing command's entry.
  2. Register it in the plugin manifest (plugin.json or equivalent) — add a second command entry pointing at the new entry point, with its own command name/ID. Keep the existing command's entry untouched so the current install keeps working.
  3. Update the build config to produce a second output bundle for the new entry (multi-entry build), or use a single bundle with multiple exported handlers if the manifest supports it.
  4. Rebuild and reinstall with paperclip plugin build — since it's the same plugin ID, this updates in place rather than creating a duplicate install.

Key principle: one plugin = one manifest, multiple command entries. Don't fork a second plugin package unless the commands need different lifecycles or permissions.

If you share your package.json, manifest, and build config, I can point to the exact line causing the resolution failure.

with skill · 0.85

Fixing Cannot find module 'react'

This error comes from the UI build step, not from Paperclip itself. The plugin UI is bundled as self-contained output into dist/ui/, so React must be a real, resolvable dependency at bundle time. Common causes:

  1. React is in devDependencies or peerDependencies — move it to dependencies in the plugin's package.json:
    "dependencies": {
      "react": "^18.3.1",
      "react-dom": "^18.3.1"
    }
    
  2. It was installed in the wrong place — run pnpm install from the plugin root, not the Paperclip checkout. If you installed React into the Paperclip repo by mistake, the plugin's bundler can't resolve it.
  3. Stale lockfile / partial install — after fixing package.json, run pnpm install again in the plugin folder, then rebuild.

Then rebuild and verify:

cd /path/to/chart-builder
pnpm install
pnpm build        # or let `pnpm dev` (esbuild --watch) rebuild
pnpm typecheck && pnpm test

Check that dist/ui/ now contains the bundled output (React is inlined — the plugin UI is self-contained; it does not get React from the host, since there's no shared host UI component kit).

If it's already installed as a local-path plugin, the server watches dist/ and restarts the worker on rebuild — no reinstall needed for code changes.

Adding a second command

The cleanest path:

  1. Edit src/manifest.ts and add the second command entry alongside the existing one (same capabilities model — only declare supported capabilities; use routePath only on page slots).
  2. Add the handler in src/worker.ts.
  3. Rebuild with pnpm build (or keep pnpm dev running).

Reinstall rule of thumb: code/worker/UI changes are picked up automatically for local-path installs via the dist/ watcher. Manifest changes require a reinstall — a second command is a manifest change, so run:

paperclipai plugin install /absolute/path/to/chart-builder

Then confirm with:

paperclipai plugin list
paperclipai plugin inspect <chart-builder-key>

This updates the existing install in place — it won't break the first command, since both commands live in the same manifest/worker bundle.

paperclip-create-plugin--m5
baseline · 0.24

I don't have reliable knowledge of a plugin-scaffolding command for Paperclip (the design tool), so I can't give you an "exact" CLI command without risking making one up. Paperclip's tooling has historically centered on the paperclip CLI (e.g., paperclip init for a project) rather than a documented plugin new / scaffold generator, and I'm not aware of a grid-layout plugin convention.

Here's what I can offer with confidence, plus what to verify:

1. Likely starting point (verify against current docs):

npx paperclip init

or, if you're building a package-style plugin, a plain npm package is the usual route:

mkdir grid-layout && cd grid-layout
npm init -y
npm install --save-dev paperclip

2. Typical directory structure for a Paperclip package:

grid-layout/
├── package.json
├── src/
│   ├── grid.pc          # main grid component
│   ├── grid-column.pc   # column component
│   └── index.pc         # public exports
├── dist/                # compiled output
└── README.md

3. Example usage in a .pc design file:

/* grid.pc */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-12 { grid-column: span 12; }
<!-- usage.pc -->
<import as="Grid" src="grid-layout/src/grid.pc" />

<Grid>
  <div className="col-6">Left half</div>
  <div className="col-6">Right half</div>
</Grid>

Recommendation: check the official Paperclip docs (paperclip.dev / the GitHub repo) for the current plugin-authoring guide — the API has evolved over versions, and I'd rather point you to verify than invent a command that doesn't exist. If you can share the Paperclip version you're on, I can tailor the example more precisely.

with skill · 0.85

Scaffold command

paperclipai plugin init @acme/grid-layout \
  --output ~/dev/paperclip-plugins \
  --category ui \
  --display-name "Grid Layout" \
  --description "Responsive 12-column grid component" \
  --author "Your Name"

Then follow the printed next steps:

cd ~/dev/paperclip-plugins/grid-layout
pnpm install
pnpm dev
paperclipai plugin install /absolute/path/to/grid-layout

Directory structure created

grid-layout/
├── package.json          # includes paperclipPlugin block → dist/manifest.js, dist/worker.js, dist/ui/
├── src/
│   ├── manifest.ts       # capabilities + slots (declare your UI/component slots here)
│   ├── worker.ts         # worker entry
│   └── ui/
│       └── index.tsx     # UI entry — implement the 12-column grid here
├── tests/
│   └── plugin.spec.ts    # placeholder test
├── .paperclip-sdk/       # only if you pass --sdk-path
└── dist/                 # build output (created by pnpm dev / pnpm build)

Using the grid in a Paperclip design file

Once the plugin is installed (paperclipai plugin list should show it as ready), its components become available in design files. Example:

<!-- design.pc -->
import { Grid, GridColumn } from "grid-layout"

<Grid columns={12} gap={16} breakpoint={{ sm: 640, md: 768, lg: 1024 }}>
  <GridColumn span={4}>
    <Sidebar />
  </GridColumn>
  <GridColumn span={8}>
    <MainContent />
  </GridColumn>
</Grid>

The span prop (1–12) controls how many of the 12 columns each child occupies, and the grid collapses responsively at the configured breakpoints.

Verify

From the plugin folder:

pnpm typecheck
pnpm test
pnpm build

Notes: keep the UI self-contained (no host UI component imports), don't use ctx.assets, and after edits under pnpm dev the server picks up rebuilt dist/ output automatically — no reinstall needed unless you change the manifest.

Limitations
  • Results are for the SkillzBench reference agent on GLM-5.3-flash. Switch models above — a skill can help one model and not another.
  • Screen tier (1 trial per arm) is directional. Verified needs a full-tier run (≥ 8 tasks, ≥ 3 trials per arm) with the CI excluding zero.
  • Task coverage: 8 generated tasks for this skill's category; a skill can shine elsewhere.