paperclip-create-plugin
Scaffolds, develops, installs, and verifies Paperclip plugins using a CLI-first local development workflow.
Pass rate with the skill minus without, same tasks, same model.
- 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
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 →
[](https://skillzbench.com/skills/paperclip-create-plugin)[](https://skillzbench.com/skills/paperclip-create-plugin)<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
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 vianpm i -g paperclip-clior run withnpx), and the main command you'll use ispaperclip init, which scaffolds apaperclip.config.jsonin 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.
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; useroutePathonly onpageslots)src/worker.ts— worker entry pointsrc/ui/index.tsx— UI entry (your toggle component; keep it self-contained — no host UI component kit exists yet)tests/plugin.spec.ts— placeholder testpackage.json— includes apaperclipPluginblock pointing atdist/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
Rebuilding and testing a Paperclip plugin locally is straightforward:
Rebuild & see changes live
-
Build the plugin from its directory:
cd ~/projects/paperclip-plugins/icon-set npm run build(Typically this runs
tscoresbuildand outputs tolib/ordist/. Check thebuild/mainfields in the plugin'spackage.jsonto confirm the output path.) -
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 -
Restart the Paperclip dev server (
paperclip devor yourpcdevcommand). Paperclip loads plugins at startup, so a rebuild alone isn't enough — restart the dev server after each rebuild. Then any.pcfile changes will re-render through your updatedtransform.Tip: if you're iterating a lot, run
npm run build -- --watchin 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.
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
Here are the exact steps for both tasks:
1. Install the plugin into your team's Paperclip workspace
-
Verify the plugin builds cleanly:
cd ~/projects/paperclip-plugins/icon-set npm run build npm test -
Bump/confirm the version in
package.jsonis0.4.0and commit any pending changes. -
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.0tag to the repo:git tag v0.4.0 && git push origin v0.4.0
- Private npm registry:
-
Install it in the workspace:
- If your team's Paperclip workspace has a
pluginsdirectory or a workspace config (e.g..paperclip/config.jsonorpaperclip.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
- If your team's Paperclip workspace has a
-
Commit and push the workspace change so everyone picks it up, and have teammates run
npm install(or their usual sync step) once. -
Verify: open a Paperclip file in the workspace and confirm the icon-set plugin's features load with the new
strokeWidthbehavior.
2. Document the new strokeWidth option
- In the plugin repo, open the docs (typically
README.mdand/ordocs/options.md). - 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 } - If the plugin has a changelog (
CHANGELOG.md), add a0.4.0entry noting the new option. - 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.
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):
- Verify the build is current from
~/projects/paperclip-plugins/icon-set:pnpm typecheck pnpm test pnpm build - Publish the package (npm or your team's private registry), making sure
package.jsonversion is0.4.0and thepaperclipPluginblock points atdist/manifest.js,dist/worker.js,dist/ui/. - Install into the workspace:
(Note:paperclipai plugin install <published-package-name> --version 0.4.0--versiononly applies to npm installs — don't combine it with a local path.) - Verify:
Confirm the plugin shows versionpaperclipai plugin list paperclipai plugin inspect <plugin-key>0.4.0andstatus: ready. If it's anything else, checklastError.
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:
- Update the plugin's own docs (e.g. its README or
doc/files in the plugin repo) with a section forstrokeWidth:- Type, default value, allowed range/units
- Which slots/commands it applies to
- A short usage example
- 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. - 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.
- Bump docs alongside the release — since you're publishing 0.4.0, include the doc update in the same version so
plugin inspectoutput 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
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:
-
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-domVerify it exists at
node_modules/reactrelative to your plugin root. -
Peer dependency vs. direct dependency. If the host app already ships React, declare it as a peer dependency in
package.jsonand 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
dependenciesinstead and let the bundler include it. -
Bundler externals config. If your build config (e.g., esbuild/rollup/webpack) lists
reactinexternalsbut 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. -
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:
- Add a second entry file (e.g.,
src/command-two.ts) alongside your existing command's entry. - Register it in the plugin manifest (
plugin.jsonor 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. - 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.
- 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.
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:
- React is in
devDependenciesorpeerDependencies— move it todependenciesin the plugin'spackage.json:"dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } - It was installed in the wrong place — run
pnpm installfrom 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. - Stale lockfile / partial install — after fixing
package.json, runpnpm installagain 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:
- Edit
src/manifest.tsand add the second command entry alongside the existing one (same capabilities model — only declare supported capabilities; useroutePathonly onpageslots). - Add the handler in
src/worker.ts. - Rebuild with
pnpm build(or keeppnpm devrunning).
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
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.
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.
- 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.