Internal Safety Override
- Status: local-only unless explicitly opted into external access.
- Before using network tools, account connectors, browser automation, or APIs, state the destination, data scope, and credential source.
- Do not transmit repository files, secrets, credentials, or private documents by default.
- Audit categories: network, secrets.
Prompt Engineer Toolkit
Overview
Use this skill to move prompts from ad-hoc drafts to production assets with repeatable testing, versioning, and regression safety. It emphasizes measurable quality over intuition. Apply it when launching a new LLM feature that needs reliable outputs, when prompt quality degrades after model or instruction changes, when multiple team members edit prompts and need history/diffs, when you need evidence-based prompt choice for production rollout, or when you want consistent prompt governance across environments.
Core Capabilities
- A/B prompt evaluation against structured test cases
- Quantitative scoring for adherence, relevance, and safety checks
- Prompt version tracking with immutable history and changelog
- Prompt diffs to review behavior-impacting edits
- Reusable prompt templates and selection guidance
- Regression-friendly workflows for model/prompt updates
Key Workflows
1. Run Prompt A/B Test
Prepare JSON test cases and run:
python3 scripts/prompt_tester.py \
--prompt-a-file prompts/a.txt \
--prompt-b-file prompts/b.txt \
--cases-file testcases.json \
--runner-cmd 'my-llm-cli --prompt {prompt} --input {input}' \
--format text
Input can also come from stdin/--input JSON payload.
2. Choose Winner With Evidence
The tester scores outputs per case and aggregates:
- expected content coverage
- forbidden content violations
- regex/format compliance
- output length sanity
Use the higher-scoring prompt as candidate baseline, then run regression suite.
3. Version Prompts
# Add version
python3 scripts/prompt_versioner.py add \
--name support_classifier \
--prompt-file prompts/support_v3.txt \
--author alice
# Diff versions
python3 scripts/prompt_versioner.py diff --name support_classifier --from-version 2 --to-version 3
# Changelog
python3 scripts/prompt_versioner.py changelog --name support_classifier
4. Regression Loop
- Store baseline version.
- Propose prompt edits.
- Re-run A/B test.
- Promote only if score and safety constraints improve.
Script Interfaces
python3 scripts/prompt_tester.py --help
- Reads prompts/cases from stdin or
--input
- Optional external runner command
- Emits text or JSON metrics
python3 scripts/prompt_versioner.py --help
- Manages prompt history (
add, list, diff, changelog)
- Stores metadata and content snapshots locally
Pitfalls, Best Practices & Review Checklist
Avoid these mistakes:
- Picking prompts from single-case outputs — use a realistic, edge-case-rich test suite.
- Changing prompt and model simultaneously — always isolate variables.
- Missing
must_not_contain (forbidden-content) checks in evaluation criteria.
- Editing prompts without version metadata, author, or change rationale.
- Skipping semantic diffs before deploying a new prompt version.
- Optimizing one benchmark while harming edge cases — track the full suite.
- Model swap without rerunning the baseline A/B suite.
Before promoting any prompt, confirm:
References
- references/prompt-templates.md
- references/technique-guide.md
- references/evaluation-rubric.md
- README.md
Evaluation Design
Each test case should define:
input: realistic production-like input
expected_contains: required markers/content
forbidden_contains: disallowed phrases or unsafe content
expected_regex: required structural patterns
This enables deterministic grading across prompt variants.
Versioning Policy
- Use semantic prompt identifiers per feature (
support_classifier, ad_copy_shortform).
- Record author + change note for every revision.
- Never overwrite historical versions.
- Diff before promoting a new prompt to production.
Rollout Strategy
- Create baseline prompt version.
- Propose candidate prompt.
- Run A/B suite against same cases.
- Promote only if winner improves average and keeps violation count at zero.
- Track post-release feedback and feed new failure cases back into test suite.
1---2name: prompt-engineer-toolkit3description: Analyzes and rewrites prompts for better AI output, creates reusable prompt templates for marketing use cases (ad copy, email campaigns, social media), and structures end-to-end AI content workflows. Use when the user wants to improve prompts for AI-assisted marketing, build prompt templates, or optimize AI content workflows. Also use when the user mentions 'prompt engineering,' 'improve my prompts,' 'AI writing quality,' 'prompt templates,' or 'AI content workflow.'4license: MIT5---67## Internal Safety Override89- Status: local-only unless explicitly opted into external access.10- Before using network tools, account connectors, browser automation, or APIs, state the destination, data scope, and credential source.11- Do not transmit repository files, secrets, credentials, or private documents by default.12- Audit categories: network, secrets.1314# Prompt Engineer Toolkit1516## Overview1718Use this skill to move prompts from ad-hoc drafts to production assets with repeatable testing, versioning, and regression safety. It emphasizes measurable quality over intuition. Apply it when launching a new LLM feature that needs reliable outputs, when prompt quality degrades after model or instruction changes, when multiple team members edit prompts and need history/diffs, when you need evidence-based prompt choice for production rollout, or when you want consistent prompt governance across environments.1920## Core Capabilities2122- A/B prompt evaluation against structured test cases23- Quantitative scoring for adherence, relevance, and safety checks24- Prompt version tracking with immutable history and changelog25- Prompt diffs to review behavior-impacting edits26- Reusable prompt templates and selection guidance27- Regression-friendly workflows for model/prompt updates2829## Key Workflows3031### 1. Run Prompt A/B Test3233Prepare JSON test cases and run:3435```bash36python3 scripts/prompt_tester.py \37 --prompt-a-file prompts/a.txt \38 --prompt-b-file prompts/b.txt \39 --cases-file testcases.json \40 --runner-cmd 'my-llm-cli --prompt {prompt} --input {input}' \41 --format text42```4344Input can also come from stdin/`--input` JSON payload.4546### 2. Choose Winner With Evidence4748The tester scores outputs per case and aggregates:4950- expected content coverage51- forbidden content violations52- regex/format compliance53- output length sanity5455Use the higher-scoring prompt as candidate baseline, then run regression suite.5657### 3. Version Prompts5859```bash60# Add version61python3 scripts/prompt_versioner.py add \62 --name support_classifier \63 --prompt-file prompts/support_v3.txt \64 --author alice6566# Diff versions67python3 scripts/prompt_versioner.py diff --name support_classifier --from-version 2 --to-version 36869# Changelog70python3 scripts/prompt_versioner.py changelog --name support_classifier71```7273### 4. Regression Loop74751. Store baseline version.762. Propose prompt edits.773. Re-run A/B test.784. Promote only if score and safety constraints improve.7980## Script Interfaces8182- `python3 scripts/prompt_tester.py --help`83 - Reads prompts/cases from stdin or `--input`84 - Optional external runner command85 - Emits text or JSON metrics86- `python3 scripts/prompt_versioner.py --help`87 - Manages prompt history (`add`, `list`, `diff`, `changelog`)88 - Stores metadata and content snapshots locally8990## Pitfalls, Best Practices & Review Checklist9192**Avoid these mistakes:**931. Picking prompts from single-case outputs — use a realistic, edge-case-rich test suite.942. Changing prompt and model simultaneously — always isolate variables.953. Missing `must_not_contain` (forbidden-content) checks in evaluation criteria.964. Editing prompts without version metadata, author, or change rationale.975. Skipping semantic diffs before deploying a new prompt version.986. Optimizing one benchmark while harming edge cases — track the full suite.997. Model swap without rerunning the baseline A/B suite.100101**Before promoting any prompt, confirm:**102- [ ] Task intent is explicit and unambiguous.103- [ ] Output schema/format is explicit.104- [ ] Safety and exclusion constraints are explicit.105- [ ] No contradictory instructions.106- [ ] No unnecessary verbosity tokens.107- [ ] A/B score improves and violation count stays at zero.108109## References110111- [references/prompt-templates.md](references/prompt-templates.md)112- [references/technique-guide.md](references/technique-guide.md)113- [references/evaluation-rubric.md](references/evaluation-rubric.md)114- [README.md](README.md)115116## Evaluation Design117118Each test case should define:119120- `input`: realistic production-like input121- `expected_contains`: required markers/content122- `forbidden_contains`: disallowed phrases or unsafe content123- `expected_regex`: required structural patterns124125This enables deterministic grading across prompt variants.126127## Versioning Policy128129- Use semantic prompt identifiers per feature (`support_classifier`, `ad_copy_shortform`).130- Record author + change note for every revision.131- Never overwrite historical versions.132- Diff before promoting a new prompt to production.133134## Rollout Strategy1351361. Create baseline prompt version.1372. Propose candidate prompt.1383. Run A/B suite against same cases.1394. Promote only if winner improves average and keeps violation count at zero.1405. Track post-release feedback and feed new failure cases back into test suite.