agentleFS
VoDaiLoczVoDaiLocz/kilo-kit-mcp/skills/engineering/prompt-engineering/SKILL.md

prompt-engineering

Skill27 starsChanged 3 months agoApache-2.0View on GitHub

Use when designing, optimizing, testing, or deploying robust prompt systems for AI agents. This skill provides frameworks for structured prompt engineering, meta-prompting, and automated optimization workflows.

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

  • dylantarreSkill

    performance-optimization

    Use when animation runs slow, janky, or causes frame drops

    Also in 4 projects that use this

  • ArogyaReddySkill

    changelog-generator

    Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When developing new LLM-powered features or agents.

    line 14
  2. Distinctive:

    When existing prompts produce inconsistent, fragile, or hallucinated outputs.

    line 15
  3. Distinctive:

    When implementing complex reasoning tasks that require strict output formatting.

    line 16
  4. Distinctive:

    When you need to scale prompt maintenance across a team or large codebase.

    line 17
  5. Distinctive:

    When setting up automated prompt optimization or regression testing pipelines.

    line 18
  6. Distinctive:

    Chain-of-Symbol (CoS): Use compact symbol-based notation for complex logic to minimize token usage and improve coherence.

    line 33
  7. Distinctive:

    Define: Create a declarative signature for the task.

    line 42
  8. Very specific:

    Optimize: Run meta-prompting loops (using pro models) to critique and refine.

    line 44
  9. Distinctive:

    Validate: Test against a set of representative inputs and boundary cases.

    line 45
  10. Distinctive:

    Iterate: Use DSPy optimizers to refine instruction logic.

    line 46

“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 Skill

Overview

The prompt-engineering skill establishes a disciplined approach to LLM instruction design within the KILO-KIT ecosystem. Moving beyond ad-hoc prompting, this skill treats prompts as first-class code, emphasizing contract-based structures, declarative signatures, and rigorous validation loops to ensure reproducible, high-quality AI behavior.

When To Use

  • When developing new LLM-powered features or agents.
  • When existing prompts produce inconsistent, fragile, or hallucinated outputs.
  • When implementing complex reasoning tasks that require strict output formatting.
  • When you need to scale prompt maintenance across a team or large codebase.
  • When setting up automated prompt optimization or regression testing pipelines.

Core Concepts

Contract-First Prompt Architecture

Prompts are defined using a 5-part structure to ensure clarity and modularity:

  1. Identity: Define the persona, expertise, and operational boundaries.
  2. Context Boundaries: Explicitly define what data is in-scope and what is off-limits.
  3. Operational Rules: Step-by-step logic and prioritized directives.
  4. Edge Cases: Explicit handling of ambiguous, empty, or adversarial inputs.
  5. Output Schemas: Declarative JSON, XML, or Pydantic schemas to enforce structured output.

Reasoning Model Steerability

Optimizing for advanced reasoning models (e.g., o1, o3, Gemini 2.0+):

  • Reasoning Effort Control: Explicitly specify constraints to trade-off speed vs. reasoning depth.
  • Chain-of-Symbol (CoS): Use compact symbol-based notation for complex logic to minimize token usage and improve coherence.
  • XML/Markdown Boundary Formatting: Utilize strict XML tags (e.g., <thought>, <logic>, <result>) to segment reasoning from content.

DSPy Integration

Leverage programmatic prompt optimization:

  • Signatures: Define declarative Input/Output contracts.
  • Optimizers: Apply BootstrapFewShot, MIPROv2, or COPRO to automatically refine prompts based on validation datasets.

Workflow

  1. Define: Create a declarative signature for the task.
  2. Draft: Implement using the Contract-First structure.
  3. Optimize: Run meta-prompting loops (using pro models) to critique and refine.
  4. Validate: Test against a set of representative inputs and boundary cases.
  5. Iterate: Use DSPy optimizers to refine instruction logic.
  6. Deploy & Monitor: Version control the final prompt as code.

Key Patterns

  • Semantic Diversity: Select Few-Shot examples based on embedding-space diversity rather than arbitrary selection.
  • Negative Constraint Prioritization: Explicitly list what NOT to do, placing these at the beginning of the operational rules.
  • Structured Output First: Enforce JSON/Schema output early in the instruction stream to prevent preamble bloat.
  • Self-Correction Loops: Instruct the model to critique its own intermediate steps before generating the final output.

Quality Gates

  • Contract Adherence: Does the output strictly follow the schema?
  • Ambiguity Check: Can the prompt produce valid responses for empty or malformed input?
  • Few-Shot Quality: Are examples diverse, representative, and error-free?
  • Regression Testing: Does this version outperform the previous version on the golden test set?
  • Token Efficiency: Have unnecessary filler instructions been removed?

References

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.