Prompt Engineering logo

Prompt Engineering

Community
nimadorostkar
prompt-engineering

Use when writing or improving prompts for a language model. Covers instruction structure, examples, reasoning elicitation, output formatting, and systematically diagnosing why a prompt fails. Trigger on "improve this prompt", "the model ignores my instructions", "prompt works sometimes and fails randomly". Do not use for guaranteeing schema-valid JSON — see the structured-output skill; for measuring prompt quality, see the llm-evaluation skill.

Overview

Publishernimadorostkar
RepositoryClaude-Skills-collection
Skill nameprompt-engineering
Stars
34
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by nimadorostkar on GitHub. Read the source before you install it.

Installation

Install the Prompt Engineering AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/prompt-engineering
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/ai/prompt-engineering .claude/skills/prompt-engineering
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Prompt Engineering in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Prompt Engineering on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Prompt Engineering is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Prompt Engineering

Purpose

Write prompts that produce the right output reliably, and diagnose the ones that do not. Prompt engineering is an empirical discipline: the model's actual behavior, measured, beats any theory about what should work.

When to Use

  • Writing a prompt for a production feature.
  • A prompt that works most of the time and fails unpredictably.
  • Reducing token cost or latency without losing quality.
  • Migrating a prompt between models.

Capabilities

  • Instruction design: role, task, constraints, and output contract.
  • Few-shot examples, and selecting the ones that teach the boundary.
  • Reasoning elicitation for tasks that need it.
  • Output formatting and structured extraction.
  • Failure diagnosis and systematic iteration.

Inputs

  • The task, and what a correct output looks like.
  • Real failure cases from the current prompt.
  • Constraints: latency, cost, and the model available.

Outputs

  • A prompt with an explicit output contract.
  • An evaluation set of inputs with expected outputs.
  • A measured success rate, before and after.

Workflow

  1. Define correct before writing the prompt — Twenty real inputs and their correct outputs. Without this, "improving" a prompt is a matter of opinion and you will optimize for the last example you looked at.
  2. State the task, the constraints, and the output shape — Be specific about what to do, what not to do, and exactly what format the answer takes.
  3. Add examples that teach the boundary — Two or three examples covering the ambiguous cases, not the obvious ones. An example of the hard case is worth ten of the easy one.
  4. Elicit reasoning only where it helps — For multi-step reasoning, ask the model to work through it before answering. For classification and extraction, it adds latency and cost without improving accuracy.
  5. Measure, change one thing, measure again — On the evaluation set. A change that improves one example and silently breaks three others is a regression that feels like progress.
  6. Handle the failure mode — Decide what happens when the model returns something unparseable, refuses, or hallucinates a field. That path will be taken.

Best Practices

  • Specificity beats politeness. "Return exactly one of: approve, reject, escalate" outperforms "please try to categorize this appropriately".
  • Put the instructions before the data for short inputs, and after for long ones — models attend more reliably to the end of a long context.
  • Negative instructions are weakly followed. "Do not include a preamble" works less well than "Begin your response with the JSON object."
  • Structured output (a JSON schema, a tool call) is far more reliable than asking for JSON in prose and hoping. Use the API's native mechanism.
  • Long, elaborate prompts accumulate contradictions. When a prompt exceeds a page, look for instructions that conflict — the model is following one of them.
  • Prompt improvements do not transfer across models. Re-measure after any model change; a prompt tuned for one is not tuned for another.

Examples

A prompt with an explicit contract and a boundary example:

text
You classify customer support messages for routing.

Categories (choose exactly one):
- billing      — charges, invoices, refunds, payment methods
- technical    — errors, outages, broken functionality, integration problems
- account      — login, permissions, plan changes, cancellation
- other        — anything not clearly covered above

Rules:
- If a message spans two categories, choose the one the customer needs
  resolved first to be unblocked.
- If the message is too vague to classify with confidence, return "other"
  with confidence below 0.5. Do not guess.

Respond with JSON only, matching this schema:
{"category": "billing|technical|account|other", "confidence": 0.0-1.0, "reason": "<one sentence>"}

Examples:

Message: "I was charged twice for March and I can't log in to check."
{"category": "account", "confidence": 0.8, "reason": "The double charge matters, but they cannot access the account to act on it, so access is the blocker."}

Message: "hey"
{"category": "other", "confidence": 0.2, "reason": "No classifiable content."}

The first example is the one that earns its place: it teaches the tie-break rule in a way the prose alone does not.

Diagnosing a failing prompt systematically:

text
Symptom: the classifier returns "billing" for technical messages ~15% of the time.

Hypotheses, tested one at a time against the 40-case evaluation set:

H1: The category definitions overlap.
    Test: read them. "billing" says "payment methods"; several technical
    messages are about a broken payment *integration*.
    Result: CONFIRMED. Baseline 85% -> 94% after clarifying that integration
    failures are technical regardless of subject matter.

H2: Reasoning would help.
    Test: add "Think step by step before answering."
    Result: no accuracy change, +340ms latency, +180 tokens. REVERTED.

H3: More examples would help.
    Test: 6 examples instead of 2.
    Result: 94% -> 96%. Kept. Diminishing returns past 6 (tested 10: 96%).

Final: 96%, at lower cost than the baseline.

Notes

  • The measurement set is the entire discipline. A prompt engineer without an evaluation set is guessing with extra confidence.
  • "Think step by step" is not free and is not universally helpful. It reliably improves multi-step arithmetic and logic; it reliably does nothing for classification. Measure rather than assume.
  • Prompt injection is a real vulnerability when user content enters a prompt. Never let user text be interpreted as instructions — delimit it clearly and treat the model's output as untrusted.

Frequently asked questions

What does the Prompt Engineering AI skill do?

Use when writing or improving prompts for a language model. Covers instruction structure, examples, reasoning elicitation, output formatting, and systematically diagnosing why a prompt fails. Trigger on "improve this prompt", "the model ignores my instructions", "prompt works sometimes and fails randomly". Do not use for guaranteeing schema-valid JSON — see the structured-output skill; for measuring prompt quality, see the llm-evaluation skill.

Why use Prompt Engineering on TypingMind?

Because you install it once and use it with any model. Prompt Engineering is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Prompt Engineering in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/prompt-engineering. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Prompt Engineering?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Prompt Engineering?

As many as you like. As long as a model supports skills, you can use Prompt Engineering with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Prompt Engineering AI skill free?

Yes. It is published on GitHub by nimadorostkar under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇