prompt-engineering

Optimize prompts for LLM applications with in-context learning and attack defenses.

1|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/hung-phan/ml-skills --skill prompt-engineering-hung-phan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-engineering
Source: https://github.com/hung-phan/ml-skills/tree/main/skills/ml-review/references/ml-training/prompt-engineering
Command: npx skills add https://github.com/hung-phan/ml-skills --skill prompt-engineering-hung-phan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill equips users with advanced techniques for creating and optimizing prompts for large language models, solving issues related to model behavior, and protecting against attacks on LLM applications.

Core Features & Use Cases

  • In-Context Learning: Offers strategies for training models using examples in the prompt without external gradient updates.
  • Chat Templates: Provides guidelines for designing and managing chat formats that communicate between developers and the model.
  • Prompt Attacks and Defenses: Equips users with knowledge to defend against various attack vectors and secure their LLM applications.
  • Automated Prompt Optimization: Integrates tools for automated prompt design and evaluation.
  • Use Case: Imagine you're building a LLM-based application and need to create robust prompts to handle edge cases, ensure accurate responses, and maintain user privacy.

Quick Start

/ml-review prompt-engineering to understand advanced prompting techniques and in-context learning.

Frequently Asked Questions about prompt-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use in-context learning to train large language models without gradient updates?

In-context learning provides strategies for training large language models using examples directly within the prompt. This approach modifies model behavior without external gradient updates or fine-tuning.

What is the best way to design chat templates for developer-to-model communication?

Designing chat templates requires specific guidelines for managing conversational formats that facilitate communication between developers and the model. These templates ensure structured and predictable LLM interactions.

How do I defend against prompt attacks to secure my LLM applications?

Defending against prompt attacks involves equipping your LLM applications with knowledge of various attack vectors. This allows you to implement specific defenses to maintain security and user privacy.

Can I automate prompt optimization for handling edge cases in my applications?

Automated prompt optimization integrates specific tools to design and evaluate prompts automatically. This helps build robust LLM applications capable of handling edge cases and ensuring accurate responses.

Why does my large language model behave unpredictably when I change the prompt format?

Unpredictable large language model behavior often stems from poorly structured prompt formats. Applying advanced prompt engineering techniques helps debug these issues by optimizing context and chat template design.