agentleFS
dtsongdtsong/agentic-council/skills/oracle-prompt-engineering/SKILL.md

prompt-engineering

Skill0 starsChanged 6 months agoApache-2.0View on GitHub

Use when designing, evaluating, or versioning system prompts for LLM-powered features. Covers instruction structure, chain-of-thought patterns, output format constraints, few-shot example selection, and prompt versioning strategy. Do not use for RAG pipeline design (use rag-architecture) or AI evaluation frameworks (use ai-evaluation).

63 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-checklist, nextjs-app-router 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.
  • atuljha23Skill

    security-checklist

    OWASP-style quick reference — authn/authz, injection, secrets, sessions, crypto, dependencies. Use during code review and before committing security-sensitive changes.

    Also in 3 projects that use this

  • desilokesh1Skill

    nextjs-app-router

    Next.js App Router best practices, Server Components, Server Actions, routing patterns, and data fetching strategies. Use when building Next.js applications with the App Router.

    Also in 3 projects that use this

  • stefan-jansenSkill

    llm-evaluation

    LLM evaluation and testing patterns including prompt testing, hallucination detection, benchmark creation, and quality metrics. Use when testing LLM applications, validating prompt quality, implementing systematic evaluation, or measuring LLM performance.

    Also in 3 projects that use this

  • rohitg00Skill

    data-engineering

    Data engineering patterns for ETL pipelines, data warehousing, Apache Spark, and data quality validation

    Also in 3 projects that use this

  • qodex-aiSkill

    multi-agent-orchestration

    Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.

    Also in 3 projects that use this

  • mrgoonieSkill

    context-engineering

    Master context engineering for AI agent systems. Use when designing agent architectures, debugging context failures, optimizing token usage, implementing memory systems, building multi-agent coordination, evaluating agent performance, or developing LLM-powered pipelines. Covers context fundamentals, degradation patterns, optimization techniques (compaction, masking, caching), compression strategies, memory architectures, multi-agent patterns, LLM-as-Judge evaluation, tool design, and project development.

    Also in 7 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 4

    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:

    No user-provided values are used in commands or file paths.

    line 37
  2. Distinctive:

    Before writing a prompt, articulate:

    line 51
  3. Distinctive:

    Use a layered structure:

    line 59
  4. Distinctive:

    Order matters: Put the most representative example last (recency bias)

    line 90

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

Purpose

Design, evaluate, and version system prompts for LLM-powered features, including instruction structure, chain-of-thought patterns, output format constraints, and few-shot example selection.

Scope Constraints

Reads feature requirements, data format examples, and quality constraints for prompt design analysis. Does not execute LLM calls, modify production prompts, or access API keys directly.

Inputs

  • Feature requirements (what the LLM should do)
  • Input data format and examples
  • Desired output format and constraints
  • Quality requirements (accuracy, consistency, tone)
  • Cost and latency constraints (model selection guidance)

Input Sanitization

No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.

Procedure

Progress Checklist

  • Step 1: Define the task precisely
  • Step 2: Structure the system prompt
  • Step 3: Design chain-of-thought (if applicable)
  • Step 4: Design output format
  • Step 5: Select and craft few-shot examples
  • Step 6: Design versioning strategy

Step 1: Define the Task Precisely

Before writing a prompt, articulate:

  • Input: What exactly does the model receive? (user message, context, data)
  • Output: What exactly should it produce? (classification, generation, extraction, transformation)
  • Constraints: What must it never do? (hallucinate facts, reveal system prompt, produce PII)
  • Edge cases: What happens with empty input, adversarial input, ambiguous input?

Step 2: Structure the System Prompt

Use a layered structure:

  1. Identity and role: Who is the model in this context?
  2. Task description: What it's being asked to do (one paragraph, precise)
  3. Constraints and rules: Hard rules it must follow (numbered list)
  4. Output format: Exact structure of the expected output (with template)
  5. Few-shot examples: 2-3 input/output pairs showing ideal behavior
  6. Edge case handling: What to do when uncertain, off-topic, or missing data

Step 3: Design Chain-of-Thought (if applicable)

For complex reasoning tasks:

  • Explicit CoT instruction: "Think step by step before answering"
  • Structured CoT: Define the reasoning steps (e.g., "1. Identify the entities, 2. Determine relationships, 3. Synthesize answer")
  • Hidden CoT: Instruct model to reason in a <thinking> block, then provide the answer separately
  • When to skip CoT: Classification tasks, simple extraction, and format conversion rarely benefit

Step 4: Design Output Format

Specify the exact output structure:

  • JSON output: Provide a schema with required fields, types, and constraints
  • Markdown output: Provide a template with section headers
  • Structured extraction: Define the fields and valid values explicitly
  • Validation: How will the output be parsed? Design the format for reliable parsing.

Step 5: Select and Craft Few-Shot Examples

Choose examples strategically:

  • Cover the range: Include examples representing different input types
  • Include edge cases: Show desired behavior for tricky inputs
  • Show the format: Examples should match the exact output format
  • Keep it minimal: 2-3 examples are usually enough; more can confuse
  • Order matters: Put the most representative example last (recency bias)

Step 6: Design Versioning Strategy

Plan for prompt evolution:

  • Version identifier: Semantic versioning (v1.0, v1.1, v2.0)
  • Storage: Version-controlled alongside code (not in a database, not hardcoded)
  • A/B testing: How to run two prompt versions simultaneously
  • Rollback: How to revert to a previous version quickly
  • Changelog: What changed and why, linked to eval results

Compaction resilience: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.

Output Format

# Prompt Design: [Feature Name]

## Task Definition
**Input:** [Description + example]
**Output:** [Description + format]
**Constraints:** [Hard rules]

## System Prompt (v1.0)

[Full system prompt text]


## Few-Shot Examples
### Example 1
**Input:** [Example input]
**Expected output:** [Example output]

### Example 2
**Input:** [Edge case input]
**Expected output:** [Edge case output]

## Chain-of-Thought Strategy
[Whether CoT is used, what the reasoning structure looks like]

## Output Schema
```json
{
  "field1": "string (required) — description",
  "field2": "number (optional) — description"
}

Prompt Versioning

VersionDateChangeEval Score
v1.0[Date]Initial[Score]

Model Recommendation

Recommended: [Model] at [temperature] Rationale: [Why this model for this task] Cost estimate: [$/1K requests]


## Handoff

- Hand off to rag-architecture if prompt design reveals retrieval or context assembly requirements.
- Hand off to ai-evaluation if prompt versioning requires an evaluation framework or regression testing.

## Quality Checks

- [ ] System prompt has a clear role, task, constraints, format, and examples
- [ ] Output format is designed for reliable programmatic parsing
- [ ] Few-shot examples cover normal cases and at least one edge case
- [ ] Constraints address prompt injection, hallucination, and off-topic input
- [ ] Prompt is stored in version control with a changelog
- [ ] Model and temperature are justified for the task requirements

## Evolution Notes
<!-- Observations appended after each use -->

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.