One prompt to build any Storyblok Space Plugin
The field wizard, one size up: a generator prompt and an Agent Skill for whole apps inside Storyblok
TL;DR A generator prompt and Agent Skill that let a coding agent build a whole app inside Storyblok: auth that works in an iframe, Management API manners, no database, and a native look with Vercel's ui-sdk. Paste one URL, describe your app, check the plan.
For field plugins, I published a generator prompt: point a coding agent at it, describe the field in one sentence, and it builds one that holds up in production. I wrote about the night it started and about the rules inside it.
Then I built a translation editor as a Space Plugin, a whole app inside Storyblok. So I did the same thing one size up: a prompt, and the same content as an Agent Skill, for building any Space Plugin. It holds what took real trial and error to learn, so the next person's agent gets it right the first time.
From a field to a whole app
A field plugin extends one field. A Space Plugin adds a whole tool to the Storyblok interface: an audit, a bulk editor, a dashboard, an importer, an AI helper. Technically it is a web app that Storyblok loads in the space's sidebar under Apps, and OAuth gives it a token for that space and user.
That is a bigger surface than a field, with more places to get something subtly wrong: auth inside an iframe, rate limits, where to keep data, how it should look. A written recipe takes those off the table, so the agent can spend its effort on the app itself.
Before any code, the prompt asks the agent for a five-line plan: what the app does, which Storyblok data it reads and writes, where it stores its own data, the main screens, and what it will test. You read five lines, correct what is off, and only then does it start.
What the prompt knows
Auth that works inside an iframe. @storyblok/app-extension-auth is a Node (req, res) handler, so it lives in one Pages Router file next to the App Router. The session sits in a partitioned cookie, which is why the very first consent bounces through a small /401 page back into Storyblok. And with Next 16, the session check needs await connection() inside <Suspense>, because it compares the token's expiry with the current time. Each detail is small, and each one stops the app from loading if you miss it.
Management API manners. Pace writes to the rate limit (3 requests per second on Starter, 6 on paid plans), retry when the API says "too many requests", and read every page of a list. Never publish as a side effect. And for datasources, dimension_id goes at the top level of a full PUT, together with the default value.
No database. Every piece of data goes to the lightest place that fits:
| Data | Where |
|---|---|
| Content the app manages | A Storyblok datasource, with dimensions for languages. Editors also get Storyblok's own screen for it. |
| Per-space configuration | Space-level plugin settings, stored by Storyblok |
| Personal view preferences | The browser |
| Unsaved edits | Session storage, so a reload doesn't lose them |
| Secrets | Server environment variables only |
From the prompt's storage table.
AI as drafts. If the app uses AI, the output is a draft that people review and save themselves. The prompts live in one module that both the request and an "AI instructions" view use, so editors can see exactly what the model gets. The editable parts, like the tone of voice, go into space-level settings.
Many small "done"s. The prompt ends with a checklist: build, lint and typecheck pass, the logic has tests, the app was opened inside Storyblok and its main flow checked against a real space, and the README explains setup and where the data lives. It is the same idea as in the field plugin contract: don't describe one big "done", describe many small ones.
A native look with ui-sdk
What makes a Space Plugin look native this easily is Vercel's ui-sdk: accessible, keyboard-friendly components that leave the styling to you. The prompt installs ui-sdk's own agent skill and tells the agent to read ui-sdk's docs from node_modules before using a component, so it uses the real API instead of guessing.
Then it maps Storyblok's design tokens onto ui-sdk's CSS variables:
:root {
--ui-foreground: #1b243f; --ui-muted: #f7f9fc; --ui-muted-foreground: #5f616e;
--ui-border: #dde3ee; --ui-input: #8b91a7; --ui-primary: #037c7d; --ui-primary-foreground: #fff;
--ui-destructive: #c11c14; --ui-ring: #c2dedc; --ui-ring-border: #037c7d;
--ui-radius: 8px; --ui-font-size: 0.875rem;
}With Roboto on top, every generated app looks like it belongs in Storyblok. One rule I would not have guessed: leave Tailwind out. Its reset overrides ui-sdk's default styles, so the prompt scaffolds the project without it.
The prompt also asks for every state, not just the happy path: loading, empty (offer to set things up, not a dead end), error, session expired and rate limited. A Space Plugin is a Next.js app with a public URL, so once it works, deploying it to Vercel is the natural next step.
Prompt or skill
It is the same recipe, two ways in:
- The prompt is one URL. Paste it into any coding agent with a sentence about your app, as in the box at the top.
- The Agent Skill is the same content, built from the prompt by a small script, so the two never drift apart. Install it once with
npx skills add d12rio/storyblok-translatable-datasource-label-space-plugin --skill storyblok-space-plugin, and Claude Code (and other agents that support skills) pick it up whenever someone asks to extend Storyblok with an app.
The example: an SEO audit
The prompt ends with "The app to build", and you replace it with your own idea. The example it ships with is an SEO audit:
- A table of every story with its meta title and description. Which fields hold them is configured in space-level settings.
- Checks per story: missing, too long (titles over 60, descriptions over 160 characters), or duplicated across stories, with "N issues" per folder.
- Inline editing as drafts, saved back to the stories. Publishing is a separate, explicit choice.
- Optional AI suggestions for title and description, again as drafts to review.
Other ideas the same recipe fits: a redirects manager on a datasource, a broken-link checker, a bulk tag editor, an alt-text helper for assets, or a release checklist dashboard.
Field types were the first step. A whole app is the same idea, one size up, and now it is one prompt away. If you build something with it, I would love to see it.