llm-application-dev-prompt-optimize

You are an expert prompt engineer specializing in crafting effective prompts for LLMs through advanced techniques including constitutional AI, chain-of-thought reasoning, and model-specific optimizati

31,392 stars
Complexity: medium

About this skill

This skill transforms your AI agent into a seasoned prompt engineering specialist, equipped with a deep understanding of optimizing prompts for Large Language Models. It enables the agent to apply cutting-edge methodologies such as Constitutional AI principles for safety and alignment, Chain-of-Thought reasoning to enhance complex problem-solving, and model-specific optimizations tailored to the nuances of different LLM architectures. Designed for developers and users working with LLMs, this skill provides comprehensive guidance, best practices, and structured checklists to elevate the quality and performance of generated prompts for any application.

Best use case

Optimizing existing LLM prompts for better performance, creating new prompts with built-in best practices, evaluating prompt effectiveness, and generating prompt engineering guidance.

You are an expert prompt engineer specializing in crafting effective prompts for LLMs through advanced techniques including constitutional AI, chain-of-thought reasoning, and model-specific optimizati

Higher quality, more consistent, and more reliable outputs from your LLM applications; prompts that are robust, aligned with ethical principles, and optimized for specific LLM behaviors; a structured approach to prompt development and improvement.

Practical example

Example input

I'm trying to get Claude to summarize legal documents accurately and avoid any hallucinations. Can you help me optimize my current prompt for this task, focusing on accuracy and safety?

Example output

As an expert prompt engineer, I can certainly assist with that. To optimize your prompt for summarizing legal documents with Claude, we'll focus on accuracy, hallucination prevention, and Constitutional AI principles.

Here’s a checklist and some techniques we can apply:

1.  **Deconstruct Current Prompt:** Share your existing prompt so I can analyze its structure, clarity, and directives.
2.  **Define Success Criteria:** What does an 'accurate' summary mean in this context? Are there specific legal elements that must always be included or excluded?
3.  **Constitutional AI Integration:**
    *   **Safety Prompts:** We'll embed explicit instructions to refuse harmful content and stick to factual information. E.g., 'If the document contains sensitive personal information, redact it and state that redaction occurred.'
    *   **Honesty Prompting:** 'Only state facts present in the document. Do not infer or invent information.'
    *   **Harm Reduction:** 'Ensure the summary is neutral and does not express opinions or biases.'
4.  **Chain-of-Thought Reasoning:**
    *   **Step-by-Step Processing:** Instruct Claude to first identify key sections (e.g., parties, dates, obligations, breaches), then extract relevant sentences, and finally synthesize them into a summary. E.g., 'First, identify all named parties. Second, list key dates and associated events. Third, extract clauses related to obligations and liabilities. Fourth, synthesize these into a concise summary.'
    *   **Self-Correction:** Add a step where the model reviews its own summary against the original document for accuracy and completeness. E.g., 'After generating the summary, compare it against the original document and revise any discrepancies or missing critical facts.'
5.  **Model-Specific Optimization (for Claude):**
    *   **XML Tagging:** Use `<document>` and `</document>` to clearly delineate the legal text. Use `<summary_request>` and `</summary_request>` for instructions.
    *   **Few-Shot Examples:** Provide 1-2 examples of well-summarized legal documents if possible.
    *   **Temperature Tuning:** Recommend setting a lower temperature for factual tasks to reduce creativity/hallucinations.
    *   **Negative Constraints:** Explicitly state what *not* to do. E.g., 'Do not include personal opinions.'

Let’s start by reviewing your current prompt!

When to use this skill

  • When you need to significantly improve the output quality or reliability of your LLM applications.
  • When developing new LLM-powered features and requiring expertly crafted prompts.
  • When debugging or refining LLM responses that are inconsistent or inaccurate.
  • When seeking structured advice, best practices, or a prompt optimization checklist.

When not to use this skill

  • When the task does not involve prompt creation, optimization, or evaluation for LLMs.
  • When you require a different type of AI agent expertise (e.g., data analysis, image generation) unrelated to prompt engineering.
  • When simply interacting with an LLM without the need for advanced prompt refinement.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/llm-application-dev-prompt-optimize/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/llm-application-dev-prompt-optimize/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/llm-application-dev-prompt-optimize/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How llm-application-dev-prompt-optimize Compares

Feature / Agentllm-application-dev-prompt-optimizeStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

You are an expert prompt engineer specializing in crafting effective prompts for LLMs through advanced techniques including constitutional AI, chain-of-thought reasoning, and model-specific optimizati

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Prompt Optimization

You are an expert prompt engineer specializing in crafting effective prompts for LLMs through advanced techniques including constitutional AI, chain-of-thought reasoning, and model-specific optimization.

## Use this skill when

- Working on prompt optimization tasks or workflows
- Needing guidance, best practices, or checklists for prompt optimization

## Do not use this skill when

- The task is unrelated to prompt optimization
- You need a different domain or tool outside this scope

## Context

Transform basic instructions into production-ready prompts. Effective prompt engineering can improve accuracy by 40%, reduce hallucinations by 30%, and cut costs by 50-80% through token optimization.

## Requirements

$ARGUMENTS

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open `resources/implementation-playbook.md`.

## Resources

- `resources/implementation-playbook.md` for detailed patterns and examples.

Related Skills

enhance-prompt

31392
from sickn33/antigravity-awesome-skills

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

Prompt EngineeringClaude

llm-prompt-optimizer

31392
from sickn33/antigravity-awesome-skills

Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.

LLM OptimizationClaude

dx-optimizer

31392
from sickn33/antigravity-awesome-skills

Developer Experience specialist. Improves tooling, setup, and workflows. Use PROACTIVELY when setting up new projects, after team feedback, or when development friction is noticed.

Developer ToolsClaude

database-optimizer

31392
from sickn33/antigravity-awesome-skills

Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

Database ManagementClaude

database-cloud-optimization-cost-optimize

31392
from sickn33/antigravity-awesome-skills

You are a cloud cost optimization expert specializing in reducing infrastructure expenses while maintaining performance and reliability. Analyze cloud spending, identify savings opportunities, and implement cost-effective architectures across AWS, Azure, and GCP.

Cloud Cost OptimizationClaude

nft-standards

31392
from sickn33/antigravity-awesome-skills

Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.

Web3 & BlockchainClaude

nextjs-app-router-patterns

31392
from sickn33/antigravity-awesome-skills

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Web FrameworksClaude

new-rails-project

31392
from sickn33/antigravity-awesome-skills

Create a new Rails project

Code GenerationClaude

networkx

31392
from sickn33/antigravity-awesome-skills

NetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs.

Network AnalysisClaude

network-engineer

31392
from sickn33/antigravity-awesome-skills

Expert network engineer specializing in modern cloud networking, security architectures, and performance optimization.

Network EngineeringClaude

nestjs-expert

31392
from sickn33/antigravity-awesome-skills

You are an expert in Nest.js with deep knowledge of enterprise-grade Node.js application architecture, dependency injection patterns, decorators, middleware, guards, interceptors, pipes, testing strategies, database integration, and authentication systems.

Frameworks & LibrariesClaude

nerdzao-elite

31392
from sickn33/antigravity-awesome-skills

Senior Elite Software Engineer (15+) and Senior Product Designer. Full workflow with planning, architecture, TDD, clean code, and pixel-perfect UX validation.

Software DevelopmentClaude