vuralserhat86/antigravity-agentic-skills/prompt-engineering
Claude Code and agent skill by vuralserhat86/antigravity-agentic-skills
- community
Checking that the SKILL.md file is still in the repository.
Engineer effective LLM prompts using zero-shot, few-shot, chain-of-thought, and structured output techniques. Use when building LLM applications requiring reliable outputs, implementing RAG systems, creating AI agents, or optimizing prompt quality and cost. Covers OpenAI, Anthropic, and open-source models with multi-language examples (Python/TypeScript).
Install
npx vskill@latest install vuralserhat86/antigravity-agentic-skills/prompt-engineeringSKILL.md
Prompt Engineering
Design and optimize prompts for large language models (LLMs) to achieve reliable, high-quality outputs across diverse tasks.
Purpose
This skill provides systematic techniques for crafting prompts that consistently elicit desired behaviors from LLMs. Rather than trial-and-error prompt iteration, apply proven patterns (zero-shot, few-shot, chain-of-thought, structured outputs) to improve accuracy, reduce costs, and build production-ready LLM applications. Covers multi-model deployment (OpenAI GPT, Anthropic Claude, Google Gemini, open-source models) with Python and TypeScript examples.
When to Use This Skill
Trigger this skill when:
- Building LLM-powered applications requiring consistent outputs
- Model outputs are unreliable, inconsistent, or hallucinating
- Need structured data (JSON) from natural language inputs
- Implementing multi-step reasoning tasks (math, logic, analysis)
- Creating AI agents that use tools and external APIs
- Optimizing prompt costs or latency in production systems
- Migrating prompts across different model providers
- Establishing prompt versioning and testing workflows
Common requests:
- "How do I make Claude/GPT follow instructions reliably?"
- "My JSON parsing keeps failing - how to get valid outputs?"
- "Need to build a RAG system for question-answering"
- "How to reduce hallucination in model responses?"
- "What's the best way to implement multi-step workflows?"
Quick Start
Zero-Shot Prompt (Python + OpenAI):
Structured Output (TypeScript + Vercel AI SDK):
Prompting Technique Decision Framework
Choose the right technique based on task requirements:
| Goal | Technique | Token Cost | Reliability | Use Case | |
|---|---|---|---|---|---|
| Simple, well-defined task | Zero-Shot | ⭐⭐⭐⭐⭐ Minimal | ⭐⭐⭐ Medium | Translation, simple summarization | |
| Specific format/style | Few-Shot | ⭐⭐⭐ Medium | ⭐⭐⭐⭐ High | Classification, entity extraction | |
| Complex reasoning | Chain-of-Thought | ⭐⭐ Higher | ⭐⭐⭐⭐⭐ Very High | Math, logic, multi-hop QA | |
| Structured data output | JSON Mode / Tools | ⭐⭐⭐⭐ Low-Med | ⭐⭐⭐⭐⭐ Very High | API responses, data extraction | |
| Multi-step workflows | Prompt Chaining | ⭐⭐⭐ Medium | ⭐⭐⭐⭐ High | Pipelines, complex tasks | |
| Knowledge retrieval | RAG | ⭐⭐ Higher | ⭐⭐⭐⭐ High | QA over documents | |
| Agent behaviors | ReAct (Tool Use) | ⭐ Highest | ⭐⭐⭐ Medium | Multi-tool, complex tasks |
Decision tree:
Core Prompting Patterns
1. Zero-Shot Prompting
Pattern: Clear instruction + optional context + input + output format specification
When to use: Simple, well-defined tasks with clear expected outputs (summarization, translation, basic classification).
Best practices:
- Be specific about constraints and requirements
- Use imperative voice ("Summarize...", not "Can you summarize...")
- Specify output format upfront
- Set
temperature=0for deterministic outputs
Example:
See references/zero-shot-patterns.md for comprehensive examples and anti-patterns.
2. Chain-of-Thought (CoT)
Pattern: Task + "Let's think step by step" + reasoning steps → answer
When to use: Complex reasoning tasks (math problems, multi-hop logic, analysis requiring intermediate steps).
Research foundation: Wei et al. (2022) demonstrated 20-50% accuracy improvements on reasoning benchmarks.
Zero-shot CoT:
Few-shot CoT: Provide 2-3 examples showing reasoning steps before the actual task.
See references/chain-of-thought.md for advanced patterns (Tree-of-Thoughts, self-consistency).
3. Few-Shot Learning
Pattern: Task description + 2-5 examples (input → output) + actual task
When to use: Need specific formatting, style, or classification patterns not easily described.
Sweet spot: 2-5 examples (quality > quantity)
Example structure:
Best practices:
- Use diverse, representative examples
- Maintain consistent formatting
- Randomize example order to avoid position bias
- Label edge cases explicitly
See references/few-shot-learning.md for selection strategies and common pitfalls.
4. Structured Output Generation
Modern approach (2025): Use native JSON modes and tool calling instead of text parsing.
OpenAI JSON Mode:
Anthropic Tool Use (for structured outputs):
TypeScript with Zod validation:
See references/structured-outputs.md for validation patterns and error handling.
5. System Prompts and Personas
Pattern: Define consistent behavior, role, constraints, and output format.
Structure:
Example:
Anthropic Claude with XML tags:
Best practices:
- Test system prompts extensively (global state affects all responses)
- Version control system prompts like code
- Keep under 1000 tokens for cost efficiency
- A/B test different personas
6. Tool Use and Function Calling
Pattern: Define available functions → Model decides when to call → Execute → Return results → Model synthesizes response
When to use: LLM needs to interact with external systems, APIs, databases, or perform calculations.
OpenAI function calling:
Critical: Tool descriptions matter:
See references/tool-use-guide.md for multi-tool workflows and ReAct patterns.
7. Prompt Chaining and Composition
Pattern: Break complex tasks into sequential prompts where output of step N → input of step N+1.
LangChain LCEL example:
Benefits:
- Better debugging (inspect intermediate outputs)
- Prompt caching (reduce costs for repeated prefixes)
- Modular testing and optimization
Anthropic Prompt Caching:
See references/prompt-chaining.md for LangChain, LlamaIndex, and DSPy patterns.
Library Recommendations
Python Ecosystem
LangChain - Full-featured orchestration
- Use when: Complex RAG, agents, multi-step workflows
- Install:
pip install langchain langchain-openai langchain-anthropic - Context7:
/langchain-ai/langchain(High trust)
LlamaIndex - Data-centric RAG
- Use when: Document indexing, knowledge base QA
- Install:
pip install llama-index - Context7:
/run-llama/llama_index
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/prompt_engineering/SKILL.md
Popularity
- Repository stars
- 43
- Repository forks
- 12
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 4 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vuralserhat86/antigravity-agentic-skills/prompt-engineering)