agentleFS
patonkikhpatonkikh/APES/skills/ai/prompt-engineer/skill.md

prompt-engineer

Skill3 starsChanged 5 months agoMITView on GitHub

Design production-grade prompts: system instructions, task templates, variable slots, few-shot examples, and output format contracts. Use when working on designing prompts, system instructions, few-shot templates.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use secure-code-guardian, fullstack-guardian and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JeffallanSkill

    secure-code-guardian

    Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.

    Also in 3 projects that use this

  • JeffallanSkill

    fullstack-guardian

    Builds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level. Covers the complete stack from database to UI, enforcing auth, input validation, output encoding, and parameterized queries across all layers. Use when implementing features across frontend and backend, building REST APIs with corresponding UI, connecting frontend components to backend endpoints, creating end-to-end data flows from database to UI, or implementing CRUD operations with UI forms. Distinct from frontend-only, backend-only, or API-only skills in that it simultaneously addresses all three perspectives—Frontend, Backend, and Security—within a single implementation workflow. Invoke for full-stack feature work, web app development, authenticated API routes with views, microservices, real-time features, monorepo architecture, or technology selection decisions.

    Also in 3 projects that use this

  • +9 more from Jeffallan

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use {{variable_name}} placeholders.

    line 49
  2. Distinctive:

    Put instructions after context (recency bias).

    line 111
  3. Very specific:

    Use delimiters for variable content (---, XML tags).

    line 112
  4. Distinctive:

    Test with edge cases before production.

    line 113

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

Prompt Engineer

Purpose

Design production-grade prompts: system instructions, task templates, variable slots, few-shot examples, and output format contracts.

Input: Task definition, AI architecture (optional), example inputs/outputs (optional), constraints
Output: Prompt specification with template, variables, examples, and test cases
References: See references.md for domain cheat sheets. Examples: See examples.md for worked input/output.


Workflow

Step 1: Define prompt objective

Specify:

  • Single task the prompt performs (one objective per prompt)
  • Success criteria (what good output looks like)
  • Failure modes to prevent

Step 2: Structure the prompt

Use layered structure:

  1. Objective — what to accomplish
  2. Context — background information slots
  3. Instructions — step-by-step task rules
  4. Constraints — what not to do
  5. Output format — exact structure expected
  6. Examples — few-shot demonstrations (2–3)

Step 3: Define variables

VariableTypeRequiredDescription

Use {{variable_name}} placeholders. Document validation rules.

Step 4: Write output format contract

Specify exact output structure:

  • JSON schema description, or
  • Markdown sections, or
  • Structured text pattern

Include handling for edge cases (empty input, ambiguous input).

Step 5: Create test cases

IDInputExpected behaviorPass criteria

Minimum 5 test cases: happy path, edge cases, adversarial input.

Step 6: Validate

Run Validation checklist.


Decision Rules

ConditionAction
Multiple unrelated tasks in one promptSplit into separate prompts
No output format specifiedDefine strict format before delivery
Task requires external data not in variablesAdd variable or recommend RAG/tool integration
Prompt exceeds ~2000 tokens templateModularize; use context-engineering skill
Customer-facing without refusal behaviorAdd constraint block for out-of-scope requests

Validation

  • Single clear objective stated
  • All 6 prompt layers present
  • Variables documented with types and validation
  • Output format contract is unambiguous
  • ≥2 few-shot examples included
  • ≥5 test cases with pass criteria
  • No Role Play or persona assignment phrasing
  • Refusal/out-of-scope handling for user-facing prompts

Anti-patterns

  • Mega-prompt — everything in one undifferentiated block.
  • Vague instructions — "be helpful", "be accurate" without specifics.
  • No output format — free-form when structure is needed.
  • Missing negative constraints — not saying what to avoid.
  • Example pollution — examples that contradict instructions.

Best Practices

  • Put instructions after context (recency bias).
  • Use delimiters for variable content (---, XML tags).
  • Test with edge cases before production.
  • Version prompts with changelog.
  • Pair with prompt-reviewer before deployment.

Output Structure

# Prompt Specification: [Prompt Name]
**Version:** 1.0

## Objective
[Single task description]

## Template

[Full prompt with {{variables}}]


## Variables
| Name | Type | Required | Validation |
|------|------|----------|------------|

## Output Format
[Exact structure]

## Examples
### Example 1
**Input:** ...
**Output:** ...

## Test Cases
| ID | Input | Pass criteria |
|----|-------|---------------|

## Changelog
| Version | Change |
|---------|--------|

Next Skills

OutcomeRecommended Skill
Review prompt qualityai/prompt-reviewer
Optimize token usageai/prompt-optimizer
Manage context budgetai/context-engineering
AI architecture contextai/ai-solution-architect

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.