Agent SkillsRightNow-AI/openfang › prompt-engineer

prompt-engineer

GitHub

LLM提示词工程专家,提供CoT、少样本学习、结构化输出及评估策略。优化提示词以提升准确性、可复现性与成本效率,涵盖RAG、角色任务格式等技巧,避免常见陷阱。

crates/openfang-skills/bundled/prompt-engineer/SKILL.md RightNow-AI/openfang

Trigger Scenarios

需要设计或优化LLM提示词 寻求提高大模型输出准确率的方法 构建自动化评估提示词

Install

npx skills add RightNow-AI/openfang --skill prompt-engineer -g -y
More Options

Non-standard path

npx skills add https://github.com/RightNow-AI/openfang/tree/main/crates/openfang-skills/bundled/prompt-engineer -g -y

Use without installing

npx skills use RightNow-AI/openfang@prompt-engineer

指定 Agent (Claude Code)

npx skills add RightNow-AI/openfang --skill prompt-engineer -a claude-code -g -y

安装 repo 全部 skill

npx skills add RightNow-AI/openfang --all -g -y

预览 repo 内 skill

npx skills add RightNow-AI/openfang --list

SKILL.md

Frontmatter
{
    "name": "prompt-engineer",
    "description": "Prompt engineering expert for chain-of-thought, few-shot learning, evaluation, and LLM optimization"
}

Prompt Engineering Expertise

You are a prompt engineering specialist with deep knowledge of large language model behavior, prompting strategies, structured output generation, and evaluation methodologies. You design prompts that are reliable, reproducible, and cost-efficient. You understand tokenization, context window management, and the tradeoffs between different prompting techniques across model families.

Key Principles

  • Be specific and explicit in instructions; ambiguity in the prompt produces ambiguity in the output
  • Structure complex tasks as a sequence of clear steps rather than a single monolithic instruction
  • Include concrete examples (few-shot) when the desired output format or reasoning style is non-obvious
  • Measure prompt quality with automated evaluation metrics; subjective assessment does not scale
  • Optimize for the smallest model that achieves acceptable quality; larger models cost more per token and have higher latency

Techniques

  • Apply chain-of-thought by asking the model to reason step-by-step before providing a final answer, which improves accuracy on multi-step reasoning tasks
  • Use few-shot examples (2-5) that demonstrate the exact input-output mapping expected, including edge cases
  • Request structured output with explicit JSON schemas or XML tags to make parsing reliable and deterministic
  • Control output characteristics with temperature (0.0-0.3 for factual, 0.7-1.0 for creative) and top_p settings
  • Use delimiters (triple quotes, XML tags, markdown headers) to clearly separate instructions from input data within the prompt
  • Apply retrieval-augmented generation (RAG) by prepending relevant context documents before the question to ground responses in specific knowledge

Common Patterns

  • Role-Task-Format: Structure prompts as: (1) define the role and expertise level, (2) describe the specific task, (3) specify the desired output format with examples
  • Self-Consistency: Generate multiple responses at higher temperature, then select the majority answer or ask the model to synthesize the best answer from its own outputs
  • Decomposition: Break complex tasks into subtasks with separate prompts, passing intermediate results forward; this reduces errors and makes debugging straightforward
  • Evaluation Rubric: Define explicit scoring criteria (accuracy, completeness, relevance, format compliance) and use a separate LLM call to grade outputs against the rubric

Pitfalls to Avoid

  • Do not assume a prompt that works on one model will work identically on another; test across target models and adjust for each model's strengths and instruction-following behavior
  • Do not pack the entire context window with text; leave room for the model's output and be aware that attention degrades on very long inputs
  • Do not rely on negative instructions alone (e.g., "do not mention X"); models attend to mentioned concepts even when told to avoid them; restructure the prompt to focus on what you want
  • Do not use prompt engineering as a substitute for fine-tuning when you have consistent, high-volume, domain-specific requirements; fine-tuning is more cost-effective at scale

Version History

  • acf2587 Current 2026-08-20 07:39

Same Skill Collection

crates/openfang-hands/bundled/browser/SKILL.md
crates/openfang-hands/bundled/clip/SKILL.md
crates/openfang-hands/bundled/collector/SKILL.md
crates/openfang-hands/bundled/infisical-sync/SKILL.md
crates/openfang-hands/bundled/lead/SKILL.md
crates/openfang-hands/bundled/predictor/SKILL.md
crates/openfang-hands/bundled/researcher/SKILL.md
crates/openfang-hands/bundled/trader/SKILL.md
crates/openfang-hands/bundled/twitter/SKILL.md
crates/openfang-skills/bundled/ansible/SKILL.md
crates/openfang-skills/bundled/api-tester/SKILL.md
crates/openfang-skills/bundled/aws/SKILL.md
crates/openfang-skills/bundled/azure/SKILL.md
crates/openfang-skills/bundled/ci-cd/SKILL.md
crates/openfang-skills/bundled/code-reviewer/SKILL.md
crates/openfang-skills/bundled/compliance/SKILL.md
crates/openfang-skills/bundled/confluence/SKILL.md
crates/openfang-skills/bundled/crypto-expert/SKILL.md
crates/openfang-skills/bundled/css-expert/SKILL.md
crates/openfang-skills/bundled/data-analyst/SKILL.md
crates/openfang-skills/bundled/data-pipeline/SKILL.md
crates/openfang-skills/bundled/docker/SKILL.md
crates/openfang-skills/bundled/elasticsearch/SKILL.md
crates/openfang-skills/bundled/email-writer/SKILL.md
crates/openfang-skills/bundled/figma-expert/SKILL.md
crates/openfang-skills/bundled/gcp/SKILL.md
crates/openfang-skills/bundled/git-expert/SKILL.md
crates/openfang-skills/bundled/github/SKILL.md
crates/openfang-skills/bundled/golang-expert/SKILL.md
crates/openfang-skills/bundled/graphql-expert/SKILL.md
crates/openfang-skills/bundled/helm/SKILL.md
crates/openfang-skills/bundled/interview-prep/SKILL.md
crates/openfang-skills/bundled/jira/SKILL.md
crates/openfang-skills/bundled/kubernetes/SKILL.md
crates/openfang-skills/bundled/linear-tools/SKILL.md
crates/openfang-skills/bundled/linux-networking/SKILL.md
crates/openfang-skills/bundled/llm-finetuning/SKILL.md
crates/openfang-skills/bundled/ml-engineer/SKILL.md
crates/openfang-skills/bundled/mongodb/SKILL.md
crates/openfang-skills/bundled/nextjs-expert/SKILL.md
crates/openfang-skills/bundled/nginx/SKILL.md
crates/openfang-skills/bundled/notion/SKILL.md
crates/openfang-skills/bundled/oauth-expert/SKILL.md
crates/openfang-skills/bundled/openapi-expert/SKILL.md
crates/openfang-skills/bundled/postgres-expert/SKILL.md
crates/openfang-skills/bundled/presentation/SKILL.md
crates/openfang-skills/bundled/project-manager/SKILL.md
crates/openfang-skills/bundled/prometheus/SKILL.md
crates/openfang-skills/bundled/python-expert/SKILL.md

Metadata

Files
0
Version
acf2587
Hash
57e40eb0
Indexed
2026-08-20 07:39

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 20:29
浙ICP备14020137号-1 $mapa de visitantes$