跳到正文
Skillpedia
提示词与 LLM280k · #387

prompt-optimizer

它能做什么

这个 AI 代理可以帮你改进写给其他 AI 的请求(提示词)。它会分析你想让 AI 做什么,提出改进建议,并指出哪些 AI 工具最适合完成你的任务。

适用场景

  • ✓当你想让 AI 帮忙改进自己写的请求时。
  • ✓当你不确定该如何向 AI 描述需求时。
  • ✓当你想知道哪些 AI 工具最适合某项具体任务时。

技能链接

https://github.com/affaan-m/ECC/blob/main/skills/prompt-optimizer/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/skills/prompt-optimizer/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“优化这个提示词:“为一个简单的网站编写代码”。”

每周 5 个新技能,1 分钟读完。

工作原理

它会先理解你的目标和项目背景,然后给出表述更清晰的提示词,并推荐最适合完成该任务的 AI 工具。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Prompt Optimizer

Analyze a draft prompt, critique it, match it to ECC ecosystem components, and output a complete optimized prompt the user can paste and run.

When to Use

  • User says "optimize this prompt", "improve my prompt", "rewrite this prompt"
  • User says "help me write a better prompt for..."
  • User says "what's the best way to ask Claude Code to..."
  • User says "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令"
  • User pastes a draft prompt and asks for feedback or enhancement
  • User says "I don't know how to prompt for this"
  • User says "how should I use ECC for..."
  • User explicitly invokes /prompt-optimize

Do Not Use When

  • User wants the task done directly (just execute it)
  • User says "优化代码", "优化性能", "optimize this code", "optimize performance" — these are refactoring tasks, not prompt optimization
  • User is asking about ECC configuration (use configure-ecc instead)
  • User wants a skill inventory (use skill-stocktake instead)
  • User says "just do it" or "直接做"

How It Works

Advisory only — do not execute the user's task.

Do NOT write code, create files, run commands, or take any implementation action. Your ONLY output is an analysis plus an optimized prompt.

If the user says "just do it", "直接做", or "don't optimize, just execute", do not switch into implementation mode inside this skill. Tell the user this skill only produces optimized prompts, and instruct them to make a normal task request if they want execution instead.

Run this 6-phase pipeline sequentially. Present results using the Output Format below.

Analysis Pipeline

Phase 0: Project Detection

Before analyzing the prompt, detect the current project context:

  1. Check if a CLAUDE.md exists in the working directory — read it for project conventions
  2. Detect tech stack from project files:
    • package.json → Node.js / TypeScript / React / Next.js
    • go.mod → Go
    • pyproject.toml / requirements.txt → Python
    • Cargo.toml → Rust
    • build.gradle / pom.xml → Java / Kotlin (then check for quarkus in build file → Quarkus, or spring-boot → Spring Boot)
    • Package.swift → Swift
    • Gemfile → Ruby
    • composer.json → PHP
    • *.csproj / *.sln → .NET
    • Makefile / CMakeLists.txt → C / C++
    • cpanfile / Makefile.PL → Perl
  3. Note detected tech stack for use in Phase 3 and Phase 4

If no project files are found (e.g., the prompt is abstract or for a new project), skip detection and flag "tech stack unknown" in Phase 4.

Phase 1: Intent Detection

Classify the user's task into one or more categories:

Category Signal Words Example
New Feature build, create, add, implement, 创建, 实现, 添加 "Build a login page"
Bug Fix fix, broken, not working, error, 修复, 报错 "Fix the auth flow"
Refactor refactor, clean up, restructure, 重构, 整理 "Refactor the API layer"
Research how to, what is, explore, investigate, 怎么, 如何 "How to add SSO"
Testing test, coverage, verify, 测试, 覆盖率 "Add tests for the cart"
Review review, audit, check, 审查, 检查 "Review my PR"
Documentation document, update docs, 文档 "Update the API docs"
Infrastructure deploy, CI, docker, database, 部署, 数据库 "Set up CI/CD pipeline"
Design design, architecture, plan, 设计, 架构 "Design the data model"

Phase 2: Scope Assessment

If Phase 0 detected a project, use codebase size as a signal. Otherwise, estimate from the prompt description alone and mark the estimate as uncertain.

Scope Heuristic Orchestration
TRIVIAL Single file, < 50 lines Direct execution
LOW Single component or module Single command or skill
MEDIUM Multiple components, same domain Command chain + /verify
HIGH Cross-domain, 5+ files /plan first, then phased execution
EPIC Multi-session, multi-PR, architectural shift Use blueprint skill for multi-session plan

Phase 3: ECC Component Matching

Map intent + scope + tech stack (from Phase 0) to specific ECC components.

By Intent Type

Intent Commands Skills Agents
New Feature /plan, /tdd, /code-review, /verify tdd-workflow, verification-loop planner, tdd-guide, code-reviewer
Bug Fix /tdd, /build-fix, /verify tdd-workflow tdd-guide, build-error-resolver

…

常见问题

什么是“提示词”(prompt)?

提示词是你交给人工智能的指令或问题。

这个代理会替我完成任务吗?

不会,它只负责优化你的请求。你需要把优化后的提示词交给其他 AI 工具,才能完成任务。

什么是“ECC 组件”?

这是 AI 系统中各种可以帮助完成任务的工具和代理。

详情

作者的原始描述

Analyze draft prompts, detect intent and missing context, match ECC commands, skills, and agents, and output a ready-to-paste optimized prompt with diagnosis and rationale — advisory only, never executes the task. Use when the user says 'optimize prompt', 'improve my prompt', 'rewrite this prompt', 'help me prompt', 优化prompt, 改进prompt, 怎么写prompt, or 帮我优化这个指令; not for requests to optimize code or p

repo: affaan-m/ECC

热度

GitHub 星标
280k
排名
#387
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能