with one click
prompt-engineering
Advanced prompt patterns — chain-of-thought, few-shot, tree-of-thought, self-consistency, and meta-prompting
Menu
Advanced prompt patterns — chain-of-thought, few-shot, tree-of-thought, self-consistency, and meta-prompting
Code Agent. Use when relevant to this domain.
Deploy Agent. Use when relevant to this domain.
Planning Agent. Use when relevant to this domain.
Research Agent. Use when relevant to this domain.
Review Agent. Use when relevant to this domain.
Browser automation with AI — Playwright, Puppeteer, browser-use library. Navigate, extract, interact with web pages autonomously
| name | prompt-engineering |
| description | Advanced prompt patterns — chain-of-thought, few-shot, tree-of-thought, self-consistency, and meta-prompting |
| domain | core |
Prompt engineering is the foundational skill for all AI work. This covers advanced patterns: chain-of-thought reasoning, few-shot examples, tree-of-thought exploration, self-consistency voting, and meta-prompting for prompt optimization.
# Example workflow for this skill
def execute(input_data):
# Step 1: Validate input
if not input_data:
raise ValueError("Input data is required")
# Step 2: Process core logic
result = process(input_data)
# Step 3: Validate output
validate_output(result)
return result
def chain_of_thought(question):
return f"""Think step by step.
Question: {question}
Let me break this down:
1. First, identify the key components...
2. Then, analyze each component...
3. Finally, synthesize the answer...
Answer:"""
def few_shot_prompt(task, examples, input_text):
header = f"Task: {task}\n\n"
shots = "\n\n".join([
f"Input: {ex['input']}\nOutput: {ex['output']}"
for ex in examples
])
return f"{header}{shots}\n\nInput: {input_text}\nOutput:"
def self_consistent_answer(question, n=5):
answers = [generate(question, temperature=0.7) for _ in range(n)]
return most_common(answers)
<context>, <instructions>, <output> tags for clarityAfter completing this skill, confirm: