Prerequisites
- Node.js + npm (for the PromptArena CLI)
- Go toolchain (to run template-related tests locally)
- A clone of the template repo (e.g.,
../promptkit-templates)
Workflow
-
Create a template package
- Add a new directory under the template repo (matching the template name).
- Add
template.yamlwithapiVersion: promptkit.altairalabs.ai/v1alpha1,kind: Template,spec.files, and anyvariables. - Prefer
files[].sourceto keep larger content in separate files; setBaseDirby keeping files besidetemplate.yaml.
-
Update the index
- Edit
index.yamland add an entry underspec.entrieswithname,version,description, andsource: <template-name>/template.yaml. - Keep versions semver-like and increment when you change templates.
- Edit
-
Test locally with the CLI
# Point to your local index (no fetch from GitHub needed) promptarena templates list --index ../promptkit-templates/index.yaml # Render using the repo/template shorthand (fills cache then render) promptarena templates fetch --index ../promptkit-templates/index.yaml --template your-template --version 1.0.0 promptarena templates render --index ../promptkit-templates/index.yaml --template your-template --version 1.0.0 --values values.example.yaml --out ./out- Alternatively, add a repo shortname:
promptarena templates repo add --name local --url ../promptkit-templates/index.yamlthen uselocal/your-template.
- Alternatively, add a repo shortname:
-
Validate with Go tests (optional but recommended)
GOCACHE=.cache/go-build go test ./tools/arena/templates ./tools/arena/cmd/promptarena- This exercises template loading, repo resolution, and CLI flows.
-
Documentation and examples
- Include a
README.mdin your template directory describing generated files and how to run. - Provide a
values.example.yamlshowing the expected variables.
- Include a
Submission checklist
- Template builds locally (
templates rendersucceeds). -
index.yamlupdated with correct version and source path. - Variables and provider options use current provider names (
openai,claude,gemini,mock). - README and example values included.
- Tests pass locally (optional but encouraged).
When ready, open a PR against promptkit-templates with the new template and index update.***
Was this page helpful?