Skip to content
Back to skills

Prompt Engineering

ASecurity

Writes and iterates production prompts with clear structure, examples and failure tests. Use it when a prompt behind a feature must work every time.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 15, 2026
ai-agentsgo

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill prompt-engineering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prompt Engineering?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prompt Engineering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-prompt-engineering/badge)](https://www.skillsdirectory.com/skills/workspace-templates-prompt-engineering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prompt-engineering
description: Writes and iterates production prompts with clear structure, examples and failure tests. Use it when a prompt behind a feature must work every time.
---

# Prompt engineering

A prompt is a specification. Make it precise, then try to break it.

## Steps

1. Write down the task, the input, the exact output you need, and who consumes the output (a person or a parser). Parser output must be strict.
2. Collect 15 to 30 test inputs from real data: typical, long, empty, ambiguous, in another language, and adversarial (text that tries to give the model new orders). Save them as a file with the expected result or a pass rule for each.
3. Draft the prompt with sections in this order: role and goal, rules, the output format, examples, then the input last. Wrap the variable input in delimiters such as `<document>` tags and tell the model it is data, not instructions.
4. State rules positively and concretely ("return at most 3 bullets") instead of vague ones ("be concise"). Give the model a way out, such as `{"answer": null}` when the information is missing.
5. Add 2 to 4 examples that cover the hard cases, not only the easy ones. Vary them so the model does not copy one.
6. For structured output, use the provider's schema or tool mode if available, and validate the result in code anyway.
7. Run the tests. Read the failures, change one thing, rerun, and keep the score for each version in a log.
8. Set temperature low for extraction and classification.

## Rules

- Never put secrets in a prompt.
- Do not tune on the same inputs you report on; hold some out.

## Report

The final prompt, the score per version, the failures still open, and the cases that need a code-side guard.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.