[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74G5HDZ76F7WRZGF1V47R62":3,"skill-same:01M74G5HDZ76F7WRZGF1V47R62":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M74G5HDZ76F7WRZGF1V47R62","prompt-engineer",null,"Author or improve an LLM prompt — clarify task, constrain output shape, place worked examples, bound calibration; vendor-agnostic.","MohammadBafkar\u002Fpolymath","MohammadBafkar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34940462?v=4","01M74G540TQFZWK6KVAPKFVGNR","Mohammad Bafkar","01M74G541HG19QP9V5DQCJVKYE",0,"MIT","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-ai\u002Fskills\u002Fprompt-engineer\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: prompt-engineer\ndescription: Author or improve an LLM prompt — clarify task, constrain output shape, place worked examples, bound calibration; vendor-agnostic.\n---\n\n# prompt-engineer\n\n> Write a prompt that gets the right answer with the lowest variance. Output is the prompt plus the reasoning behind each section.\n\n**Mode:** analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked `[TBD]` or `[VERIFY]`, never filled in.\n\n## When to use\n\n- A new prompt is being authored.\n- An existing prompt has high variance or unreliable failure modes.\n\n## Inputs\n\n- The task in English (what should the model do, given what).\n- The deployment shape: one-shot single-turn, multi-turn, tool-using agent, structured-output extractor.\n- Available context: documents, examples, schemas.\n\n## Procedure\n\n1. **Task statement first**. The first sentence after any role framing is the task. Specific verb + specific deliverable: \"Classify the message into one of [list]\" beats \"Help me categorize this\".\n2. **Output shape**. Pin it explicitly:\n   - JSON: prefer the API's native structured output \u002F tool schema when the provider has one; otherwise give the schema in the prompt, then parse and validate the reply and retry on failure — never assume it parsed.\n   - Markdown sections (named).\n   - One-of-N (give the list).\n3. **Inputs section**. Label every input with a heading so the model can reference them. `\u003Cmessage>...\u003C\u002Fmessage>` style tags work across vendors.\n4. **Constraints in priority order**:\n   - What it MUST do.\n   - What it MUST NOT do — but phrase rules positively where you can (\"reply in plain prose\" beats \"don't use Markdown\").\n   - Soft preferences last.\n   Give the *reason* behind non-obvious constraints (\"answers are read aloud by a TTS engine, so no lists\") — models generalize from the why.\n5. **Worked examples** if the task allows variance. 2–4 examples that span the space, wrapped in tags (`\u003Cexample>`) so they read as examples, not instructions. Long reference documents go at the top of the prompt and the question at the end.\n6. **Reasoning room** for multi-step tasks: let the model think before the final answer (or enable the provider's extended thinking), and ask for the answer in a separate tagged block so it's easy to parse. Skip it for simple classification where latency matters.\n7. **Calibration line**: tell the model when to say \"I don't know\" or to abstain. Otherwise it confabulates.\n8. **Compare two drafts** when the task has real variance: write a second draft that differs in approach (few-shot vs rules-first, or reasoning block vs none), not just wording, and keep whichever scores better on the eval set.\n9. **Test it**: run the prompt against a small labeled set (`polymath-ai:eval-plan`) before and after each change; keep the failures as regression cases. A prompt tuned on vibes regresses silently.\n10. **Cost trim**. Cut tokens that don't change the answer. Remove:\n   - \"You are a helpful assistant\" filler.\n   - Multiple ways of saying the same constraint.\n   - Examples that test the same axis twice.\n\n## Output\n\n```text\nPrompt:\n---\nYou will classify an inbound support message into exactly one category from:\n[billing, technical, account, abuse, other].\n\nOutput JSON only, matching:\n{ \"category\": \"\u003Cone-of-the-five>\", \"confidence\": \"high\" | \"low\" }\n\nRules:\n- If the message touches multiple categories, pick the one most relevant to\n  the user's *primary* ask.\n- If you cannot determine a category from the message alone, output\n  category=\"other\", confidence=\"low\". Do NOT guess.\n\nExamples:\n\u003Cmessage>I was charged twice for the same order.\u003C\u002Fmessage>\n{ \"category\": \"billing\", \"confidence\": \"high\" }\n\n\u003Cmessage>The app crashes when I open settings.\u003C\u002Fmessage>\n{ \"category\": \"technical\", \"confidence\": \"high\" }\n\n\u003Cmessage>hi\u003C\u002Fmessage>\n{ \"category\": \"other\", \"confidence\": \"low\" }\n\nNow classify:\n\u003Cmessage>{{user_message}}\u003C\u002Fmessage>\n---\n\nReasoning per section:\n- Task in the first sentence; verb \"classify\"; deliverable \"one category\".\n- Output shape pinned to JSON with the legal categories enumerated.\n- Calibration line guards against confabulation.\n- 3 examples spanning billing \u002F technical \u002F abstention.\n```\n\n## Anti-patterns to avoid\n\n- Generic \"You are a world-class expert\" framing in place of real context — a specific role (audience, domain, constraints) helps; flattery doesn't.\n- Shouting (ALL-CAPS \"MUST\", \"CRITICAL\") to fix a rule the model ignores — explain the reason instead; capable models over-apply shouted rules.\n- Examples that all test the same axis.\n- \"Be creative\" plus a strict schema — pick one.\n","# prompt-engineer\n\n> Write a prompt that gets the right answer with the lowest variance. Output is the prompt plus the reasoning behind each section.\n\n**Mode:** analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked `[TBD]` or `[VERIFY]`, never filled in.\n\n## When to use\n\n- A new prompt is being authored.\n- An existing prompt has high variance or unreliable failure modes.\n\n## Inputs\n\n- The task in English (what should the model do, given what).\n- The deployment shape: one-shot single-turn, multi-turn, tool-using agent, structured-output extractor.\n- Available context: documents, examples, schemas.\n\n## Procedure\n\n1. **Task statement first**. The first sentence after any role framing is the task. Specific verb + specific deliverable: \"Classify the message into one of [list]\" beats \"Help me categorize this\".\n2. **Output shape**. Pin it explicitly:\n   - JSON: prefer the API's native structured output \u002F tool schema when the provider has one; otherwise give the schema in the prompt, then parse and validate the reply and retry on failure — never assume it parsed.\n   - Markdown sections (named).\n   - One-of-N (give the list).\n3. **Inputs section**. Label every input with a heading so the model can reference them. `\u003Cmessage>...\u003C\u002Fmessage>` style tags work across vendors.\n4. **Constraints in priority order**:\n   - What it MUST do.\n   - What it MUST NOT do — but phrase rules positively where you can (\"reply in plain prose\" beats \"don't use Markdown\").\n   - Soft preferences last.\n   Give the *reason* behind non-obvious constraints (\"answers are read aloud by a TTS engine, so no lists\") — models generalize from the why.\n5. **Worked examples** if the task allows variance. 2–4 examples that span the space, wrapped in tags (`\u003Cexample>`) so they read as examples, not instructions. Long reference documents go at the top of the prompt and the question at the end.\n6. **Reasoning room** for multi-step tasks: let the model think before the final answer (or enable the provider's extended thinking), and ask for the answer in a separate tagged block so it's easy to parse. Skip it for simple classification where latency matters.\n7. **Calibration line**: tell the model when to say \"I don't know\" or to abstain. Otherwise it confabulates.\n8. **Compare two drafts** when the task has real variance: write a second draft that differs in approach (few-shot vs rules-first, or reasoning block vs none), not just wording, and keep whichever scores better on the eval set.\n9. **Test it**: run the prompt against a small labeled set (`polymath-ai:eval-plan`) before and after each change; keep the failures as regression cases. A prompt tuned on vibes regresses silently.\n10. **Cost trim**. Cut tokens that don't change the answer. Remove:\n   - \"You are a helpful assistant\" filler.\n   - Multiple ways of saying the same constraint.\n   - Examples that test the same axis twice.\n\n## Output\n\n```text\nPrompt:\n---\nYou will classify an inbound support message into exactly one category from:\n[billing, technical, account, abuse, other].\n\nOutput JSON only, matching:\n{ \"category\": \"\u003Cone-of-the-five>\", \"confidence\": \"high\" | \"low\" }\n\nRules:\n- If the message touches multiple categories, pick the one most relevant to\n  the user's *primary* ask.\n- If you cannot determine a category from the message alone, output\n  category=\"other\", confidence=\"low\". Do NOT guess.\n\nExamples:\n\u003Cmessage>I was charged twice for the same order.\u003C\u002Fmessage>\n{ \"category\": \"billing\", \"confidence\": \"high\" }\n\n\u003Cmessage>The app crashes when I open settings.\u003C\u002Fmessage>\n{ \"category\": \"technical\", \"confidence\": \"high\" }\n\n\u003Cmessage>hi\u003C\u002Fmessage>\n{ \"category\": \"other\", \"confidence\": \"low\" }\n\nNow classify:\n\u003Cmessage>{{user_message}}\u003C\u002Fmessage>\n---\n\nReasoning per section:\n- Task in the first sentence; verb \"classify\"; deliverable \"one category\".\n- Output shape pinned to JSON with the legal categories enumerated.\n- Calibration line guards against confabulation.\n- 3 examples spanning billing \u002F technical \u002F abstention.\n```\n\n## Anti-patterns to avoid\n\n- Generic \"You are a world-class expert\" framing in place of real context — a specific role (audience, domain, constraints) helps; flattery doesn't.\n- Shouting (ALL-CAPS \"MUST\", \"CRITICAL\") to fix a rule the model ignores — explain the reason instead; capable models over-apply shouted rules.\n- Examples that all test the same axis.\n- \"Be creative\" plus a strict schema — pick one.\n",{"name":5,"description":7},"main","23f6e21841a39580c9da2b5ec941f39dda17cd86","plugins\u002Fpolymath-ai\u002Fskills\u002Fprompt-engineer","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath","https:\u002F\u002Fgithub.com\u002FMohammadBafkar","2026-10-29 18:34:59",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add MohammadBafkar\u002Fpolymath --skill prompt-engineer",{"tool":36,"command":37},"bunx","bunx skills add MohammadBafkar\u002Fpolymath --skill prompt-engineer",{"tool":39,"command":40},"pnpm","pnpm dlx skills add MohammadBafkar\u002Fpolymath --skill prompt-engineer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-ai\u002Fskills\u002Fprompt-engineer\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M74GN87EBRHM9N87M7AP1HDD","runbook","Write or refresh an operational runbook for an alert\u002Fsymptom; structured as TL;DR + Pre-checks + Steps + Verification + Rollback + Escalation.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frunbook\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M74GN5GPKEC1JEKP2DFQNEQJ","rfc","Draft a lightweight design RFC to docs\u002Frfcs\u002F\u003Cslug>.md; Summary, Motivation, Detailed design, Drawbacks, Alternatives, Unresolved questions. A proposal to debate, not a recorded decision (adr).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frfc\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M74GN2F4CWPMV4X09TG4E304","editorial-pass","Review and tighten prose in a Markdown artifact for a target tone (terse, formal, friendly) without dropping information; preserve quotations and load-bearing constraints.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Feditorial-pass\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M74GMZWGYMZ37C4DYGT6P23G","architecture-review-facilitation","Run an architecture review as a process — entry criteria, reviewer checklist, decision log, and follow-up actions — pairing the design artifact with a red-team pass.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-review-facilitation\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M74GMXVX0YX3ETDXS527XDGM","architecture-doc","Write a C4-style architecture document; System Context + Containers (+ Components when interesting) with mermaid diagrams. Describes structure, not a decision (adr) or proposal (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-doc\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M74GMVG1WSMCK066S3KE6V5K","adr","Write an Architecture Decision Record (Michael Nygard format) to docs\u002Fadrs\u002FNNNN-\u003Cslug>.md; frontmatter validated by the ADR artifact schema. Records a made decision, not a proposal to debate (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Fadr\u002FSKILL.md",[],[]]