Guide for Developers
This guide covers the developer workflow — from initial setup to ongoing management of prompts and the API.
Initial setup
1. Create your config file
Add .promptdeploy.yml to your repository root:
prompts:
- path: prompts/system.txt
name: System Prompt
description: Core AI system instructions
deploy_mode: pr
provider: anthropic
model: claude-sonnet-4-20250514
temperature: 0.7
Commit and push this file before connecting the repo in PromptDeploy.
2. Connect the repository
In the PromptDeploy dashboard, go to Repos → Connect and select your repository. The config file is read automatically and prompt definitions are created.
3. Set deploy modes
Choose the right deploy mode for each prompt:
- Use direct for development/staging prompts where you want fast iteration
- Use pr for production prompts where changes should be reviewed
You can mix modes — some prompts direct, some via PR — within the same repository.
Day-to-day workflow
Syncing config changes
When you update .promptdeploy.yml in your repo (adding new prompts, changing metadata), click Sync config on the repo page to import the changes.
Reviewing prompt PRs
When an editor saves a change to a PR-mode prompt:
- A pull request appears in your GitHub repository
- Review the diff as you would any code change
- Merge when approved — the prompt is now live
- The edit log in PromptDeploy updates to show the PR was merged
Managing the team
As a developer, you can invite new members and manage roles. See Roles & Permissions for what each role can do.
Using the API
Tracking prompt quality
Integrate signals into your application to track how well prompts are performing:
// After each AI response, let users give feedback
async function recordFeedback(promptId, isPositive) {
await fetch(`/api/v1/prompts/${promptId}/signals`, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
value: isPositive ? "positive" : "negative",
metadata: { session_id: sessionId },
}),
});
}
Fetching edit history
Pull edit history into your monitoring or dashboards:
curl -H "Authorization: Bearer $PROMPTDEPLOY_API_KEY" \
"https://promptdeploy.com/api/v1/prompts/pmt_abc123/history?limit=5"
Best practices
- Version control first — always keep
.promptdeploy.ymlin your repo so config is tracked alongside code - PR mode for production — use pull request mode for any prompt that affects end users
- Descriptive names — give prompts clear names and descriptions so editors understand what they're editing
- Document variables — if your prompt uses template variables, define them in the config so editors have context