agentleFS
OpenCovenOpenCoven/coven/skills/prompt-engineer/SKILL.md

prompt-engineer

Skill75 starsChanged 4 months agoMITView on GitHub

Design, optimize, test, and evaluate prompts for large language models. Use when: (1) crafting or refining system prompts, user prompts, or prompt templates, (2) optimizing token usage or cost of existing prompts, (3) designing few-shot examples or chain-of-thought reasoning, (4) setting up prompt evaluation, A/B testing, or regression testing, (5) building production prompt management systems (versioning, monitoring, safety), (6) debugging inconsistent or low-quality LLM outputs, (7) selecting prompt patterns (zero-shot, few-shot, CoT, ToT, ReAct, role-based). Triggers on: prompt engineering, optimize prompt, reduce tokens, prompt template, few-shot, chain-of-thought, prompt evaluation, A/B test prompts, prompt versioning.

74 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use idea-validator, debugger and 8 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.
  • dipaulavsSkill

    idea-validator

    Validates app ideas before building. Analyzes market saturation, competitors, real demand vs stated interest, solo builder feasibility (2-4 weeks timeline), and monetization potential. Use when user asks to validate an idea, evaluate a concept, check if idea is worth building, or before starting a new project.

    Also in 3 projects that use this

  • JohnJBorenSkill

    debugger

    Systematic debugging workflows, root cause analysis, and troubleshooting patterns

    Also in 3 projects that use this

  • VercelSkill

    technical-writer

    Write, review, and edit developer documentation for SDKs, libraries, and frameworks, including sites such as ai-sdk.dev and chat-sdk.dev. Use for getting-started guides, tutorials, API references, conceptual explanations, integration guides, migration guides, troubleshooting, and code examples.

    Also in 3 projects that use this

  • JetBrainsSkill

    webapp-testing

    Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

    Also in 4 projects that use this

  • JetBrainsSkill

    doc-coauthoring

    Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

    Also in 3 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 65 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing or editing any prompt:

    line 14

“Common” is measured: kept by at least 6 in 10 of the 65 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

Craft and optimize LLM prompts for maximum effectiveness, consistency, and cost efficiency.

Core Workflow

1. Requirements Analysis

Before writing or editing any prompt:

  1. Identify the use case — what task the prompt must accomplish
  2. Define success criteria — accuracy target, format requirements, tone
  3. Understand constraints — token budget, latency ceiling, cost limit, model choice
  4. Review existing prompts and their failure modes (if any)
  5. Determine safety requirements — input validation, output filtering, injection defense

2. Prompt Design

Select the appropriate pattern based on task complexity. See references/patterns.md for detailed guidance on each.

ComplexityPatternWhen to Use
SimpleZero-shotClear task, model already knows the domain
MediumFew-shotSpecific format or style needed
ComplexChain-of-thoughtMulti-step reasoning required
BranchingTree-of-thoughtMultiple valid approaches to explore
AgenticReActTool use + reasoning interleaved
SafetyConstitutional AIOutput must pass ethical/policy filters

Design principles:

  • Instruction clarity — state the task, constraints, and output format explicitly
  • Minimal tokens — every token must earn its place; compress without losing meaning
  • Modular structure — separate system prompt, context, instructions, and examples
  • Variable placeholders — use {{variable}} for dynamic content injection
  • Error recovery — include fallback instructions for ambiguous or invalid input

3. Optimization

Iterate on prompts to reduce cost and improve quality:

  • Token reduction — remove redundant phrasing, compress examples, use abbreviations the model understands
  • Context compression — summarize long context; only include what the model needs for the current step
  • Output constraints — specify format (JSON, markdown, list) to reduce parsing overhead
  • Caching — identify static prompt sections that can be cached across calls
  • Batch processing — group similar requests when possible

4. Evaluation & Testing

See references/evaluation.md for detailed frameworks.

Minimum evaluation protocol:

  1. Create a test set — 20+ examples covering happy path, edge cases, and adversarial inputs
  2. Define metrics — accuracy, format compliance, latency, token usage, cost per call
  3. Run baseline — measure current prompt performance
  4. A/B test variants — change one variable at a time, measure statistical significance
  5. Regression test — ensure new versions don't break existing passing cases

Target thresholds (adjust per use case):

  • Accuracy: >90%
  • Latency: <2s
  • Token efficiency: track input/output ratio

5. Production Deployment

See references/production.md for safety mechanisms, multi-model strategies, and team workflows.

Production checklist:

  • Prompt versioned in source control
  • Safety filters enabled (input validation + output filtering)
  • Monitoring active (accuracy, latency, cost, error rate)
  • Fallback strategy defined (retry logic, model fallback chain)
  • Documentation complete (purpose, variables, examples, known limitations)
  • Cost tracking per query/endpoint

Quick Reference — Prompt Template Structure

[System Prompt]
  Role definition + behavioral constraints + output format

[Context Section]
  {{dynamic_context}} — injected per request

[Instructions]
  Step-by-step task description

[Examples] (if few-shot)
  Input → Output pairs (3-5 diverse examples)

[User Input]
  {{user_query}}

[Output Constraints]
  Format specification + validation rules

Reference Files

  • references/patterns.md — Detailed prompt patterns (zero-shot, few-shot, CoT, ToT, ReAct, constitutional AI, role-based)
  • references/evaluation.md — Evaluation frameworks, A/B testing methodology, metrics, statistical analysis
  • references/production.md — Safety mechanisms, multi-model strategies, production systems, monitoring, team workflows

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.