About
A prompt workbench with a token-based template, generated variable inputs, missing-token shortcuts, example filling, a live rendered preview, word and token counts, copy gating and version saving and loading.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Prompt Workbench to your project and fits it to your theme.
Code
How Prompt Workbench is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
/**
* PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
*/
import {
PromptWorkbench,
type PromptVariable,
type PromptVersion,
} from "@/components/ui/prompt-workbench";
const TEMPLATE = `You are helping {{audience}}.
Rewrite the release note for {{product}} in a {{tone}} tone.
Keep it under {{length}} words and mention {{feature}}.
Release note:
{{notes}}`;
const VARIABLES: PromptVariable[] = [
{ key: "audience", label: "Audience", example: "a busy operations team" },
{ key: "product", label: "Product", example: "Field Notes" },
{ key: "tone", label: "Tone", example: "clear and friendly" },
{ key: "length", label: "Word limit", example: "80" },
{ key: "feature", label: "Feature", example: "the new saved views" },
{ key: "notes", label: "Raw notes", example: "Saved views keep filters between sessions and can be shared with the team." },
];
const VALUES: Record<string, string> = {
audience: "a busy operations team",
product: "Field Notes",
tone: "clear and friendly",
length: "80",
feature: "saved views",
notes: "Saved views keep filters between sessions and can be shared with the team.",
};
const VERSIONS: PromptVersion[] = [
{
id: "v1",
name: "Release note v1",
template: TEMPLATE,
values: { ...VALUES, tone: "formal", length: "120" },
},
{
id: "v2",
name: "Release note v2",
template: TEMPLATE,
values: VALUES,
},
];
export default function PromptWorkbenchDemo() {
return (
<main className="flex min-h-screen w-full items-start justify-center bg-gradient-to-b from-muted/40 via-background to-background px-4 py-8 sm:px-6">
<PromptWorkbench
defaultTemplate={TEMPLATE}
variables={VARIABLES}
initialValues={VALUES}
initialVersions={VERSIONS}
title="Release note prompt"
/>
</main>
);
}
















