agentleFS
kazemcodeskazemcodes/skill-tree/skills/prompt-engineering/SKILL.md

prompt-engineering

Skill1 starsChanged 5 months agoMITView on GitHub

Apply prompt engineering techniques — chain-of-thought, few-shot, role prompting, structured output, and Anthropic best practices

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

Files
SKILL.md

Prompt Engineering

Craft effective prompts for LLMs using proven techniques.

When to Use

  • Writing system prompts for agents
  • Designing few-shot examples
  • Structuring outputs from LLMs
  • Improving prompt quality

Core Techniques

Role Prompting

You are a senior security engineer reviewing code for vulnerabilities.
Focus on OWASP Top 10 issues. Be specific about line numbers.

Chain-of-Thought

Think through this step by step:
1. What is the input?
2. What rules apply?
3. What is the output?

Few-Shot

Convert these natural language queries to SQL:

Q: "Show all users who signed up this week"
A: SELECT * FROM users WHERE created_at >= DATE('now', '-7 days')

Q: "Find orders over $100"
A: SELECT * FROM orders WHERE amount > 100

Q: "List active subscriptions"
A: 

Structured Output

Respond in this exact JSON format:
{
  "summary": "one line summary",
  "issues": [{"severity": "high|medium|low", "file": "path", "description": "..."}],
  "recommendation": "what to do"
}

Anthropic Best Practices

  1. Be specific — "Write a Python function that..." not "Write some code"
  2. Use XML tags — <instructions>, <example>, <context> for structure
  3. Provide examples — Show, don't just tell
  4. Set constraints — "Respond in under 100 words"
  5. Use delimiters — Separate context from instructions clearly

Anti-Patterns

PatternProblem
Vague instructionsModel guesses intent
No examplesInconsistent output format
Too many constraintsModel can't satisfy all
Ambiguous "good"No way to measure success
Mixing languagesConfusing instructions

Output Control

# Force specific format
Respond ONLY with valid JSON. No explanation, no markdown.

# Limit length
In exactly 3 bullet points...

# Require citations
Cite sources with [Source: URL] format.

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.