agentleFS
grandameniumgrandamenium/cortextos/skills/prompt-engineering/SKILL.md

prompt-engineering

Skill106 starsChanged 7 months agoMITView on GitHub

Techniques for writing effective prompts for Claude. Covers structured outputs, chain of thought, few-shot examples, and system prompt design.

85 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-checklist, multi-agent-orchestration 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.
  • 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

  • javalenciacaiSkill

    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 4 projects that use this

  • xfstudioSkill

    llm-evaluation

    Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

    Also in 3 projects that use this

  • GoogleSkill

    coding-principles

    Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.

    Also in 3 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 6 projects that use this

  • mjunaidcaSkill

    tool-design

    Design tools that agents can use effectively. Use when creating new tools for agents, debugging tool-related failures, or optimizing existing tool sets.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 75 edited versions we read keep these.

  • 2

    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:

    Start Claude's response to force a format:

    line 55
  2. Distinctive:

    Add examples of ideal responses

    line 67

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

Techniques for getting the best results from Claude.

Core Techniques

Be Specific and Direct

Bad: "Tell me about dogs" Good: "List the top 5 dog breeds for apartment living, with a one-sentence reason for each"

Use XML Tags for Structure

<context>
You are a customer support agent for Acme Corp.
</context>

<instructions>
Respond to the customer query below. Be helpful but concise.
</instructions>

<query>
{{customer_message}}
</query>

Chain of Thought

Think through this step by step:
1. First, identify the key variables
2. Then, set up the equation
3. Finally, solve and verify

Few-Shot Examples

Here are examples of the format I want:

Input: "The food was great but service was slow"
Output: {"sentiment": "mixed", "food": "positive", "service": "negative"}

Input: "Everything was perfect!"
Output: {"sentiment": "positive", "food": "positive", "service": "positive"}

Now analyze: "{{input}}"

Structured Output with Prefill

Start Claude's response to force a format:

messages=[
    {"role": "user", "content": "Extract the name and age from: 'John is 30'"},
    {"role": "assistant", "content": '{"name": "'}
]

System Prompt Design

  • Define the role clearly
  • Set boundaries on what to do and not do
  • Include output format requirements
  • Add examples of ideal responses

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.