Chuyển đến nội dung
Skillpedia
Prompt và LLM280k · #387

prompt-optimizer

Skill này làm gì

AI agent này giúp bạn cải thiện các yêu cầu (prompt) gửi cho AI khác. Nó phân tích điều bạn muốn hỏi, đề xuất cải tiến và chỉ ra công cụ AI nào có thể hữu ích nhất cho tác vụ của bạn.

Khi nào nên dùng

  • ✓Khi bạn muốn AI cải thiện một yêu cầu bạn đã viết.
  • ✓Khi bạn không chắc cách nhờ AI làm việc gì đó.
  • ✓Khi bạn muốn biết công cụ AI nào tốt nhất cho một tác vụ cụ thể.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/affaan-m/ECC/blob/main/skills/prompt-optimizer/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tối ưu prompt này: “Viết code cho một website đơn giản”.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Trước tiên, AI hiểu mục tiêu và bối cảnh dự án của bạn. Sau đó, nó gợi ý một prompt rõ ràng hơn và chỉ ra các công cụ AI phù hợp nhất để hoàn thành tác vụ.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

…

Câu hỏi thường gặp

“Prompt” là gì?

Prompt là hướng dẫn hoặc câu hỏi bạn đưa cho trí tuệ nhân tạo.

Agent này có tự thực hiện tác vụ cho tôi không?

Không, nó chỉ tối ưu yêu cầu của bạn. Bạn cần dùng prompt đã tối ưu với một công cụ AI khác để thực hiện tác vụ.

“ECC components” là gì?

Đó là các công cụ và agent khác nhau trong hệ thống AI có thể giúp hoàn thành tác vụ.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
280k
Vị trí xếp hạng
#387
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự