prompt-engineering

Guides writing effective prompts for AI coding assistants using Cursor, OpenAI, and Anthropic best practices.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/shoshoavi/agentic_worflows --skill prompt-engineering-shoshoavi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prompt-engineering
Source: https://github.com/shoshoavi/agentic_worflows/tree/main/cursor/skills/prompt-engineering
Command: npx skills add https://github.com/shoshoavi/agentic_worflows --skill prompt-engineering-shoshoavi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Vague or poorly structured prompts cause AI coding assistants to hallucinate, break existing code, or produce unusable output. This Skill teaches the proven patterns, templates, and model-selection rules that turn weak prompts into precise instructions. ## Core Features & Use Cases - The Golden Pattern: A five-part structure (Context, Current, Desired, Constraints, Success criteria) applied to every prompt. - 7-Step Technique Ladder: Escalating methods from clear instructions to few-shot examples, chain-of-thought, XML tags, system prompts, and prompt chaining. - Model Selection Guide: Decision tables for GPT-4o-mini, GPT-4.1, GPT-5.2, o1/o3, and Claude Opus/Sonnet/Haiku based on task complexity, speed, and cost. - Hallucination Prevention: Concrete rules like pasting actual code, listing assumptions, and defining what not to change. - Use Case: When a prompt like "fix the bug" fails, the Skill rewrites it into a structured bug report with reproduction steps, affected files, expected behavior, and acceptance criteria. ## Quick Start Ask the assistant to help you write a prompt for adding a feature or fixing a bug, and it will apply the golden pattern and templates automatically.

Frequently Asked Questions about prompt-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a good prompt for an AI coding assistant?▼

Use the golden pattern: state your goal in one sentence, provide context (tech stack and files), describe current behavior, specify desired behavior, list constraints on what not to change, and define acceptance criteria for verifying success.

Which AI model should I use for coding tasks?▼

Use gpt-4o-mini or claude-haiku for simple edits, gpt-4.1 or claude-sonnet for daily coding, gpt-5.2 or claude-opus for complex features, and o1/o3 reasoning models for architecture and hard debugging problems.

How do I stop AI hallucinations in code generation?▼

Paste the actual current code instead of describing it, be hyper-specific about function names and file paths, ask the AI to list its assumptions before coding, and explicitly state what must not be changed.

When should I use chain-of-thought prompting?▼

Use it when initial direct instructions fail or for complex logic. Ask the AI to explain its approach, assumptions, and edge cases before writing code, which surfaces mistakes early and improves solution quality.

What is the difference between Cursor inline edit, agent mode, and composer?▼

Inline edit handles small single-file changes like fixing a typo, agent mode coordinates multi-file features like adding auth across five files, and composer suits complex reasoning tasks like refactoring an entire API architecture.

How can I reduce prompt costs and token usage?▼

Start with cheaper models and upgrade only if quality suffers, place repeated context at the start to leverage prompt caching, chain large tasks into smaller prompts, and use structured outputs to avoid parsing retries.