This is the core loop of using Prompt Lockbox. This guide will walk you through the entire lifecycle of a single prompt: from its initial creation as a draft, to securing it, and finally to creating a new version for safe iteration.

Steps

1

Create the Prompt

We’ll start by creating a new prompt for a “Joke Generator”. The create command builds a new, compliant .yml file for you.

# Interactive prompt creation
plb create
2

Edit and Finalize

Now, open the newly created prompts/joke-generator.v1.0.0.yml file and add your template content. This is the only manual step in the process.

template: |
  Tell me a dad joke about ${topic}.
3

Lock for Production

Once you’re happy with v1.0.0, lock it. This marks the prompt as “production-ready,” records its secure hash, and protects it from accidental changes.

plb lock joke-generator

You can verify the prompt’s new status by running plb status. You’ll see joke-generator is now marked as ✔ Locked.

4

Create a New Version

Let’s say you want to improve the joke prompt. Instead of editing the locked file, you create a new version. This preserves the original v1.0.0 and gives you a safe, unlocked copy to work on.

plb version joke-generator --minor

This creates a new file, prompts/joke-generator.v1.1.0.yml. You are now free to edit this new version without affecting the locked original.

Next Steps

You have now learned how to create, secure, and safely iterate on the prompt. This workflow is fundamental to maintaining a reliable and organized prompt library.