360 Secure SkillHub
360 安全技能中心

AI Prompt Optimization

核心功能涵盖四项:诊断优化现有提示(分析问题并给出改进方案)、生成场景化结构化模板、创建示例驱动的few-shot提示、设计推理类思维链提示。适用于写作、代码、图像生成等多领域提示优化,支持ChatGPT、Claude、Midjourney等AI工具。用户输入原始提示或场景需求,即可获取优化后的提示、模板等输出,遵循具体、结构化等原则提升AI输出质量。

openlark
openlark
热度 45.54
最近更新 2026-05-11 17:45:46
分类:效率依赖:纯提示词应用场景:模板 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ai-prompt-optimization
Metadata
name
ai-prompt-optimization
description
Use when users need to optimize prompts for AI conversations, generate structured templates, create few-shot examples, design chain-of-thought guidance, or diagnose and improve existing prompts. Applicable to prompt optimization for various AI tools such as ChatGPT, Claude, Midjourney, etc.

AI Prompt Optimization

Core Capabilities

When users seek prompt optimization assistance, provide the following services:

  1. Diagnosis & Optimization - Analyze existing prompt issues and provide specific improvement plans
  2. Template Generation - Generate structured prompt templates for different scenarios
  3. Few-Shot Generation - Create example-driven few-shot prompts
  4. Chain-of-Thought Guidance - Design CoT (Chain of Thought) prompts

Usage

1. Diagnosis & Optimization Workflow

When a user provides a prompt for optimization:

Analyze Structure → Identify Issues → Provide Improved Version → Explain Changes

Diagnosis Checklist:

  • Is the role/identity clearly defined?
  • Is the task objective specific and clear?
  • Are output format/style constrained?
  • Is the necessary context/background information provided?
  • Are boundary conditions and exceptions specified?
  • Are there clear success criteria?

2. Template Generation

Generate structured templates based on user scenarios. Core template format:

# Role Definition
You are a [role] in [professional domain], skilled at [core competency].

# Task Description
Please help me [specific task], with the goal of [expected outcome].

# Context Information
- Background: [relevant background]
- Audience: [target users]
- Constraints: [boundary conditions]

# Output Requirements
- Format: [desired format]
- Style: [language style]
- Length: [length requirement]

# Quality Standards
[Key metrics for evaluating output]

3. Few-Shot Example Generation

Generate few-shot examples for complex tasks:

  1. Select Representative Samples - 3-5 examples covering different variants
  2. Format Examples - Input → Output structure
  3. Add Explanations - Explain the rationale for selecting each example

4. Chain-of-Thought Design

Design CoT prompts for tasks requiring reasoning:

Before giving your final answer, please think through the following steps:
1. [Understand the Problem] - ...
2. [Decompose the Problem] - ...
3. [Step-by-Step Reasoning] - ...
4. [Verify the Conclusion] - ...

Scenario Reference

For complete scenario templates and examples, see references/templates.md:

  • Writing assistance prompts
  • Code generation prompts
  • Image generation prompts
  • Data analysis prompts
  • Q&A and consultation prompts

Optimization Principles

  1. Specific > Vague - Clearly specify what is wanted and what is not
  2. Structured > Scattered - Use clear segmentation and markers
  3. Constrained > Free - Appropriate constraints improve output quality
  4. Iterative > One-Shot - Encourage users to continuously optimize based on output