[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-10348ceb-6401-4a81-87ac-114f0a7286ce":3,"$fPjaFnWIwy3KjhcuvB8zepOAnr6mMTmNoGM1a_tyYT98":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"10348ceb-6401-4a81-87ac-114f0a7286ce","prompt-engineer-toolkit","分析并重写提示以提高AI输出质量，创建可重复使用的营销用例提示模板（广告文案、电子邮件活动、社交媒体），并构建端到端AI内容工作流程。当用户希望改进AI辅助营销的提示、构建提示模板或优化AI内容工作流程时使用。当用户提及“提示工程”、“改进我的提示”、“AI写作质量”、“提示模板”或“AI内容工作流程”时也使用。","cat_writing_copywriting","mod_writing","alirezarezvani,writing","---\nname: \"prompt-engineer-toolkit\"\ndescription: \"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.'\"\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  author: Alireza Rezvani\n  category: marketing\n  updated: 2026-03-06\n---\n\n# Prompt Engineer Toolkit\n\n## Overview\n\nUse 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\u002Fdiffs, when you need evidence-based prompt choice for production rollout, or when you want consistent prompt governance across environments.\n\n## Core Capabilities\n\n- A\u002FB prompt evaluation against structured test cases\n- Quantitative scoring for adherence, relevance, and safety checks\n- Prompt version tracking with immutable history and changelog\n- Prompt diffs to review behavior-impacting edits\n- Reusable prompt templates and selection guidance\n- Regression-friendly workflows for model\u002Fprompt updates\n\n## Key Workflows\n\n### 1. Run Prompt A\u002FB Test\n\nPrepare JSON test cases and run:\n\n```bash\npython3 scripts\u002Fprompt_tester.py \\\n  --prompt-a-file prompts\u002Fa.txt \\\n  --prompt-b-file prompts\u002Fb.txt \\\n  --cases-file testcases.json \\\n  --runner-cmd 'my-llm-cli --prompt {prompt} --input {input}' \\\n  --format text\n```\n\nInput can also come from stdin\u002F`--input` JSON payload.\n\n### 2. Choose Winner With Evidence\n\nThe tester scores outputs per case and aggregates:\n\n- expected content coverage\n- forbidden content violations\n- regex\u002Fformat compliance\n- output length sanity\n\nUse the higher-scoring prompt as candidate baseline, then run regression suite.\n\n### 3. Version Prompts\n\n```bash\n# Add version\npython3 scripts\u002Fprompt_versioner.py add \\\n  --name support_classifier \\\n  --prompt-file prompts\u002Fsupport_v3.txt \\\n  --author alice\n\n# Diff versions\npython3 scripts\u002Fprompt_versioner.py diff --name support_classifier --from-version 2 --to-version 3\n\n# Changelog\npython3 scripts\u002Fprompt_versioner.py changelog --name support_classifier\n```\n\n### 4. Regression Loop\n\n1. Store baseline version.\n2. Propose prompt edits.\n3. Re-run A\u002FB test.\n4. Promote only if score and safety constraints improve.\n\n## Script Interfaces\n\n- `python3 scripts\u002Fprompt_tester.py --help`\n  - Reads prompts\u002Fcases from stdin or `--input`\n  - Optional external runner command\n  - Emits text or JSON metrics\n- `python3 scripts\u002Fprompt_versioner.py --help`\n  - Manages prompt history (`add`, `list`, `diff`, `changelog`)\n  - Stores metadata and content snapshots locally\n\n## Pitfalls, Best Practices & Review Checklist\n\n**Avoid these mistakes:**\n1. Picking prompts from single-case outputs — use a realistic, edge-case-rich test suite.\n2. Changing prompt and model simultaneously — always isolate variables.\n3. Missing `must_not_contain` (forbidden-content) checks in evaluation criteria.\n4. Editing prompts without version metadata, author, or change rationale.\n5. Skipping semantic diffs before deploying a new prompt version.\n6. Optimizing one benchmark while harming edge cases — track the full suite.\n7. Model swap without rerunning the baseline A\u002FB suite.\n\n**Before promoting any prompt, confirm:**\n- [ ] Task intent is explicit and unambiguous.\n- [ ] Output schema\u002Fformat is explicit.\n- [ ] Safety and exclusion constraints are explicit.\n- [ ] No contradictory instructions.\n- [ ] No unnecessary verbosity tokens.\n- [ ] A\u002FB score improves and violation count stays at zero.\n\n## References\n\n- [references\u002Fprompt-templates.md](references\u002Fprompt-templates.md)\n- [references\u002Ftechnique-guide.md](references\u002Ftechnique-guide.md)\n- [references\u002Fevaluation-rubric.md](references\u002Fevaluation-rubric.md)\n- [README.md](README.md)\n\n## Evaluation Design\n\nEach test case should define:\n\n- `input`: realistic production-like input\n- `expected_contains`: required markers\u002Fcontent\n- `forbidden_contains`: disallowed phrases or unsafe content\n- `expected_regex`: required structural patterns\n\nThis enables deterministic grading across prompt variants.\n\n## Versioning Policy\n\n- Use semantic prompt identifiers per feature (`support_classifier`, `ad_copy_shortform`).\n- Record author + change note for every revision.\n- Never overwrite historical versions.\n- Diff before promoting a new prompt to production.\n\n## Rollout Strategy\n\n1. Create baseline prompt version.\n2. Propose candidate prompt.\n3. Run A\u002FB suite against same cases.\n4. Promote only if winner improves average and keeps violation count at zero.\n5. Track post-release feedback and feed new failure cases back into test suite.\n","","imported","https:\u002F\u002Fgithub.com\u002Falirezarezvani\u002Fclaude-skills","user_system_seed","SkillOPIC",true,192,428,"2026-05-16 14:02:23",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"写作研究","writing","mdi-pencil-outline","从学术写作到创意文案，让 AI 成为你的专属写作助手",1,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"文案策划","copywriting","mdi-comment-text-outline","广告文案、品牌故事、Slogan",4,72,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"f79ff8a3-0c33-415e-af9e-057fc51b7057","1.0.0","prompt-engineer-toolkit.zip",9707,"uploads\u002Fskills\u002F10348ceb-6401-4a81-87ac-114f0a7286ce\u002Fprompt-engineer-toolkit.zip","e1073b9559a717e46ab1a006afea259b345d5f8094a86819765eb4a4e4462a60","[{\"path\":\"README.md\",\"isDirectory\":false,\"size\":1244},{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":5088},{\"path\":\"references\u002Fevaluation-rubric.md\",\"isDirectory\":false,\"size\":328},{\"path\":\"references\u002Fprompt-templates.md\",\"isDirectory\":false,\"size\":1532},{\"path\":\"references\u002Ftechnique-guide.md\",\"isDirectory\":false,\"size\":675},{\"path\":\"scripts\u002Fprompt_tester.py\",\"isDirectory\":false,\"size\":7793},{\"path\":\"scripts\u002Fprompt_versioner.py\",\"isDirectory\":false,\"size\":8111}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]