template = """
Use the following context to answer the question.
If you don't know, say "I don't know based on the provided context."
Context:
{context}
Question: {question}
Answer:
"""
Few-Shot Template
template = """
Context: {context}
Examples:
Q: What is X?
A: X is...
Q: {question}
A:
"""
1---2name: prompt-engineering-243description: Prompt Engineering SKILL4---56# Prompt Engineering SKILL78## RAG Prompt Template910```python11template = """12Use the following context to answer the question.13If you don't know, say "I don't know based on the provided context."1415Context:16{context}1718Question: {question}1920Answer:21"""22```2324## Few-Shot Template2526```python27template = """28Context: {context}2930Examples:31Q: What is X?32A: X is...3334Q: {question}35A:36"""37```
Run npx skillmds@latest add majiayu000/prompt-engineering-24 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Prompt Engineering SKILL It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
majiayu000 (@majiayu000) published this skill. Their other Agent Skills are listed on their SkillMD profile.