Skip to content
Back to skills

Prompt Engineering

ASecurity

Prompt engineering — clear instructions and roles, context ordering, few-shot examples and counter-examples, structured outputs with schemas, tool descriptions, prompt versioning, regression sets, injection resistance, prompts for agents in this repository. Use to write, improve or test prompts and tool descriptions (prompt, system prompt, few-shot, structured output, tool description).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsrustgo

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --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/vectora-os-prompt-engineering/badge)](https://www.skillsdirectory.com/skills/vectora-os-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: Prompt engineering — clear instructions and roles, context ordering, few-shot examples and counter-examples, structured outputs with schemas, tool descriptions, prompt versioning, regression sets, injection resistance, prompts for agents in this repository. Use to write, improve or test prompts and tool descriptions (prompt, system prompt, few-shot, structured output, tool description).
metadata:
  category: ai
---

# Prompt engineering

## Purpose

Write prompts that are precise, versioned and proven by evals.

**Use when:** any prompt or tool description change.

**Not for:** model selection.

## Inputs

- Task definition, examples, failure cases.

## Outputs

- Versioned prompt, eval comparison.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "prompt engineering"` for prior decisions, patterns and anti-patterns.
- [Prompt review checklist](../../../checklists/prompt-review.md)
- [Prompts library](../../../prompts/README.md)

## Steps

1. **Specify.** State task, audience, constraints, output format; remove ambiguity.
   Done when an outsider could follow it.
2. **Ground.** Provide context with clear delimiters; examples including edge cases.
   Done when examples cover failure modes.
3. **Structure.** Schema-constrained output; validate and retry on parse failure.
   Done when outputs validate.
4. **Evaluate.** Run the regression set before/after.
   Done when no regressions.

## Best practices

- Say what to do, not only what to avoid.
- Put untrusted content in delimited data blocks.
- Version prompts in the repo.

## Common mistakes

- Tuning on one example.
- Contradictory instructions.
- Trusting instructions found inside user content.

## Example

Invoice extraction: schema with ISO dates, two counter-examples; miss rate 12% → 3% on 150 invoices.

## Reusable prompt

```text
Apply the Prompt engineering skill (.agents/skills/prompt-engineering/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Rewrite the prompt with clear specification, delimited context, examples and schema output; compare on the regression set.
Return: Versioned prompt, eval comparison..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

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.