Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

llm-prompt-optimizerLLM prompt 优化器

Agent Skill

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

总安装

32,009

周安装

814

GitHub Stars

公开资料未说明

下载量

6,809
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:llm-prompt-optimizer(LLM prompt 优化器)
来源仓库:https://github.com/eddiebe147/claude-settings
仓库路径:skills/llm-prompt-optimizer
安装命令:
npx skills add eddiebe147/claude-settings --skill "llm-prompt-optimizer"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add eddiebe147/claude-settings --skill "llm-prompt-optimizer"

简介

发现并安装 AI 代理的技能。

  • 适用于提示词优化和工作流模板设计场景。
  • 支持多种宿主环境的技能集成。
  • 安装命令:npx skills add eddiebe147/claude-settings --skill "llm-prompt-optimizer"。
  • 注意确认权限范围及是否触发提示词修改操作。

SKILL.md

name
LLM Prompt Optimizer
slug
llm-prompt-optimizer
description
Optimize prompts for better LLM outputs through systematic analysis and refinement
category
ai-ml
complexity
intermediate
version
1.0.0
author
ID8Labs
triggers
tags

LLM Prompt Optimizer

The LLM Prompt Optimizer skill systematically analyzes and refines prompts to maximize the quality, accuracy, and relevance of large language model outputs. It applies evidence-based optimization techniques including structural improvements, context enrichment, constraint calibration, and output format specification.

This skill goes beyond basic prompt writing by leveraging understanding of how different LLMs process instructions, their attention patterns, and their response tendencies. It helps you transform underperforming prompts into high-yield instructions that consistently produce the results you need.

Whether you are building production AI systems, conducting research, or simply want better ChatGPT responses, this skill ensures your prompts are optimized for your specific model and use case.

Core Workflows

Workflow 1: Analyze and Diagnose Prompt Issues

  1. Receive the current prompt and sample outputs
  2. Identify failure patterns:

- Hallucination triggers - Ambiguity sources - Missing context gaps - Conflicting instructions - Over/under-constrained parameters

  1. Map issues to specific prompt segments
  2. Prioritize fixes by impact
  3. Explain root causes to user

Workflow 2: Apply Optimization Techniques

  1. Select appropriate techniques based on diagnosis:

- Chain-of-thought insertion - Few-shot example addition - Role/persona specification - Output schema definition - Constraint tightening/loosening

  1. Restructure prompt for clarity
  2. Add missing context or examples
  3. Remove conflicting or redundant instructions
  4. Test optimized version
  5. Iterate based on results

Workflow 3: Model-Specific Optimization

  1. Identify target LLM (GPT-4, Claude, Llama, etc.)
  2. Apply model-specific best practices:

- Token budget optimization - System prompt vs user prompt split - Temperature/sampling guidance - Context window utilization

  1. Adjust for model quirks and strengths
  2. Document model-specific recommendations

Quick Reference

ActionCommand/Trigger
Diagnose prompt issues"Why isn't this prompt working: [prompt]"
Optimize for accuracy"Optimize for accuracy: [prompt]"
Reduce hallucinations"Reduce hallucinations in: [prompt]"
Add structure"Add better structure to: [prompt]"
Model-specific optimization"Optimize this for [model]: [prompt]"
A/B test variants"Create prompt variants for testing: [prompt]"

Best Practices

  • Start with Clear Intent: Define exactly what success looks like before optimizing

- Bad: "Make it work better" - Good: "Reduce factual errors while maintaining conversational tone"

  • Use Explicit Output Formats: LLMs follow structure better than vague requests

- Specify JSON schemas, markdown formats, or template structures - Example: "Return as JSON with keys: analysis, recommendations, confidence"

  • Calibrate Constraints: Too many constraints cause conflicts; too few cause drift

- Test constraint combinations systematically - Remove constraints that don't improve output quality

  • Leverage Positive Instructions: Tell the model what TO do, not just what NOT to do

- Bad: "Don't be verbose" - Good: "Respond in 2-3 concise sentences"

  • Position Critical Instructions Strategically: Beginning and end get more attention

- Put key constraints at the start - Repeat critical requirements at the end

  • Use Delimiters for Multi-Part Inputs: Clear separation prevents confusion

- Triple quotes, XML tags, or markdown headers - Example: """User Query: {query}""" """Context: {context}"""

Advanced Techniques

Recursive Refinement Loop

For complex prompts, use iterative optimization:

1. Generate baseline outputs (n=5)
2. Score outputs against criteria
3. Identify lowest-scoring dimension
4. Adjust prompt targeting that dimension
5. Repeat until all dimensions score acceptably

Prompt Decomposition

Break complex tasks into simpler sub-prompts:

Complex: "Analyze this code, find bugs, suggest fixes, and refactor"
Decomposed:
  Step 1: "List all potential bugs in this code"
  Step 2: "For each bug, explain the fix"
  Step 3: "Refactor the fixed code for clarity"

Negative Example Injection

Show what NOT to do alongside positive examples:

Good output: [example]
Bad output (avoid this): [anti-example]
Key difference: [explanation]

Token Budget Optimization

When context is limited:

1. Remove redundant phrases
2. Use abbreviations consistently
3. Compress examples to minimal effective size
4. Prioritize recent/relevant context
5. Consider summarizing long contexts

Common Pitfalls to Avoid

  • Over-engineering simple prompts with unnecessary complexity
  • Copying prompts between models without adaptation
  • Ignoring the relationship between temperature and prompt specificity
  • Adding examples that introduce unwanted patterns
  • Using vague terms like "good," "proper," or "appropriate" without definition
  • Conflicting instructions that force the model to choose
  • Forgetting to specify handling of edge cases and errors

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.66%
按下载量换算1,951

OpenCode

21.95%
按下载量换算1,495

Gemini CLI

17.8%
按下载量换算1,212

Antigravity

13.03%
按下载量换算887

Cursor

8.14%
按下载量换算554

windsurf

4.11%
按下载量换算280

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills