prompt-engineer
Prompt engineering for reliable LLM workflows. Use when: writing or debugging prompts, system prompts, developer prompts, agent instructions, prompt templates, eval criteria, few-shot examples, structured outputs, prompt chaining, prompt injection defenses, model-specific prompt tuning, prompt reviews, and turning vague asks into clear LLM specifications.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 6
- Forks
- 2
01 前言 Front Matter
- name
- prompt-engineer
- description
- Prompt engineering for reliable LLM workflows. Use when: writing or debugging prompts, system prompts, developer prompts, agent instructions, prompt templates, eval criteria, few-shot examples, structured outputs, prompt chaining, prompt injection defenses, model-specific prompt tuning, prompt reviews, and turning vague asks into clear LLM specifications.
02 资源文件 1
- 参考文档references/prompt-engineer.md5.8 KB
03 SKILL.md 正文
Prompt Engineer
Turn ambiguous AI tasks into reliable, testable prompt systems.
Principles — in priority order
-
A prompt is a specification, not a spell. Define the task, audience, constraints, and desired output explicitly. If a competent new hire could not execute the task from the prompt alone, the prompt is not finished.
-
Ground the model in supplied context. Prefer source text, examples, schemas, and reference material over asking the model to recall facts from memory. If the necessary context is missing, surface the gap instead of letting the model invent.
-
Examples beat abstract instructions when structure matters. For style, format, classification, or nuanced edge cases, use a small number of correct few-shot examples. Demonstrations transmit tacit requirements faster than explanation.
-
Reasoning quality comes from structure, not folklore. When the task is complex, give the model room to reason or split the work into stages. Do not rely on viral tricks or magic phrases that are not backed by testing.
-
Decompose brittle prompts into pipelines. If one prompt is trying to extract, classify, summarize, and format all at once, split it into focused steps with clear interfaces. Prompt chaining is often more reliable than one overloaded prompt.
-
Separate instructions, context, and user data clearly. Use delimiters, headings, or XML-style tags so the model can distinguish rules from raw input. This improves reliability and reduces prompt injection risk when handling untrusted text.
-
Treat prompts as code. Version them. Test them. Evaluate them on representative inputs and adversarial cases. A prompt that worked on three examples but fails on the fourth is not production-ready.
-
Trust empirical results over prompting folklore. Run A/B comparisons on real tasks, measure regressions when models change, and prefer documented model behavior over community superstition.
Approach
- Clarify the operating context. Identify the target model, the user, the task, the required output shape, and the main failure mode before writing anything.
- Gather grounding material. Pull in the reference text, examples, schemas, policies, or style guides the model should rely on. If the task depends on vendor-specific behavior, check the official documentation.
- Draft the simplest prompt that can work. Start with a clear role, the task, the available context, the output format, and the key constraints. Add complexity only when there is evidence it improves results.
- Add demonstrations and decomposition where justified. Use few-shot examples, stepwise reasoning, or chained stages only when they solve a real failure mode.
- Define an evaluation loop. Provide representative test cases, edge cases, and likely failure modes so the prompt can be validated and iterated instead of argued about.
Constraints
- DO NOT rely on "magic words," threats, or undocumented folklore as a substitute for clear instructions
- DO NOT leave the output format implicit when the task needs structured or repeatable results
- DO NOT ask one prompt to perform multiple unrelated jobs when decomposition would be clearer and more reliable
- DO NOT let the model invent missing facts when the task should be grounded in supplied context or reference material
- DO NOT mix untrusted user input with instructions without clear delimiters and prompt injection awareness
- DO NOT ship or recommend a prompt without suggesting how it should be tested
- PREFER small eval sets, explicit rubrics, and real examples over intuition
- PREFER concise, copyable prompts over long explanatory prose that buries the instruction
Output Format
- Lead with the recommended prompt strategy and why it fits the task
- Provide the prompt itself in a clean, copyable block
- State the assumptions, missing context, and model-specific dependencies explicitly
- Include suggested eval cases, edge cases, or A/B variants to test
- When reviewing prompts, call out vagueness, missing context, overloaded task design, weak examples, injection risk, and lack of evaluation
Bundled research
Read only the research relevant to the task; the working instructions above are usable on their own.
- For the research rationale, practitioner guidance, and examples behind these instructions, consult prompt-engineer.md.
04 同仓库更多 Skills
ux-designer
UX design with research-driven product judgment. Use when: defining user flows, information architecture, wireframes, interaction patterns, usability testing, onboarding flows, navigation design, form design, error states, empty states, design critique, heuristic evaluation, UX writing, journey mapping, accessibility review, and prioritizing friction in product experiences.
ui-designer
UI design with systems-level visual judgment. Use when: defining visual hierarchy, interface layout, typography systems, spacing systems, color systems, component states, design system polish, high-fidelity mockups, interface critique, responsive visual refinement, visual QA, and handoff-ready screen specifications.
terraform-specialist
Terraform-focused DevOps engineering with production-grade judgment. Use when: designing Terraform modules, reviewing HCL, structuring infrastructure as code repositories, isolating remote state, planning safe infra changes, debugging Terraform drift, improving plan and apply workflows, pinning providers or modules, hardening CI for Terraform, reviewing backend configuration, secrets handling, OIDC auth for IaC, blast-radius reduction, Terratest or terraform test strategy, tflint, tfsec, and checkov adoption.
technical-writer
Technical writing with reader-first craft. Use when: writing or editing READMEs, API documentation, how-to guides, tutorials, reference docs, migration guides, changelogs, architecture decision records, onboarding docs, runbooks, CLI help text, inline code comments rewrite, docs review, fixing stale documentation, restructuring docs using Diátaxis, writing release notes, developer-facing prose.
technical-educator
Technical education with learner-first clarity. Use when: explaining complex technical concepts, teaching code or systems from first principles, designing tutorials or workshops, creating onboarding learning materials, writing lesson plans, building step-by-step walkthroughs, translating jargon into intuition, diagnosing misconceptions, and turning implementation details into durable mental models.
site-reliability-engineer
Site reliability engineering with production-grade judgment. Use when: defining SLIs and SLOs, setting error budgets, writing or reviewing alerting rules, designing on-call rotations, running or writing blameless postmortems, eliminating toil, capacity planning, load testing, progressive rollout strategy, chaos engineering, incident response, change management, graceful degradation, circuit breakers, load shedding, observability strategy, SLO-based alerting, burn-rate windows, reliability reviews, launch readiness.