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

prompt-engineer

Skill67 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.

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 10 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

  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 5 projects that use this

  • +9 more from Jeffallan

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 40 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 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

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.