Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite this prompt", or explicitly asks to enhance prompt quality. Also triggers on Chinese equivalents: "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令". DO NOT TRIGGER when: user wants the task executed directly, or says "just do it" / "直接做". DO NOT TRIGGER when user says "优化代码", "优化性能", "optimize performance", "optimize this code" — those are refactoring/performance tasks, not prompt optimization.
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:
Check if a CLAUDE.md exists in the working directory — read it for project conventions
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
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.
Database changes — Schema, migrations, indexes? (if data layer)
Existing patterns — Reference files or conventions to follow?
Scope boundaries — What NOT to do?
If 3+ critical items are missing, ask the user up to 3 clarification
questions before generating the optimized prompt. Then incorporate the
answers into the optimized prompt.
Phase 5: Workflow & Model Recommendation
Determine where this prompt sits in the development lifecycle:
Research → Plan → Implement (TDD) → Review → Verify → Commit
For MEDIUM+ tasks, always start with /plan. For EPIC tasks, use blueprint skill.
Model recommendation (include in output):
Scope
Recommended Model
Rationale
TRIVIAL-LOW
Sonnet 4.6
Fast, cost-efficient for simple tasks
MEDIUM
Sonnet 4.6
Best coding model for standard work
HIGH
Sonnet 4.6 (main) + Opus 4.6 (planning)
Opus for architecture, Sonnet for implementation
EPIC
Opus 4.6 (blueprint) + Sonnet 4.6 (execution)
Deep reasoning for multi-session planning
Multi-prompt splitting (for HIGH/EPIC scope):
For tasks that exceed a single session, split into sequential prompts:
Prompt 1: Research + Plan (use search-first skill, then /plan)
Prompt 2-N: Implement one phase per prompt (each ends with /verify)
Final Prompt: Integration test + /code-review across all phases
Use /save-session and /resume-session to preserve context between sessions
Output Format
Present your analysis in this exact structure. Respond in the same language
as the user's input.
Section 1: Prompt Diagnosis
Strengths: List what the original prompt does well.
Issues:
Issue
Impact
Suggested Fix
(problem)
(consequence)
(how to fix)
Needs Clarification: Numbered list of questions the user should answer.
If Phase 0 auto-detected the answer, state it instead of asking.
Section 2: Recommended ECC Components
Type
Component
Purpose
Command
/plan
Plan architecture before coding
Skill
tdd-workflow
TDD methodology guidance
Agent
code-reviewer
Post-implementation review
Model
Sonnet 4.6
Recommended for this scope
Section 3: Optimized Prompt — Full Version
Present the complete optimized prompt inside a single fenced code block.
The prompt must be self-contained and ready to copy-paste. Include:
Clear task description with context
Tech stack (detected or specified)
/command invocations at the right workflow stages
Acceptance criteria
Verification steps
Scope boundaries (what NOT to do)
For items that reference blueprint, write: "Use the blueprint skill to..."
(not /blueprint, since blueprint is a skill, not a command).
Section 4: Optimized Prompt — Quick Version
A compact version for experienced ECC users. Vary by intent type:
Intent
Quick Pattern
New Feature
/plan [feature]. /tdd to implement. /code-review. /verify.
Bug Fix
/tdd — write failing test for [bug]. Fix to green. /verify.
Refactor
/refactor-clean [scope]. /code-review. /verify.
Research
Use search-first skill for [topic]. /plan based on findings.
Testing
/tdd [module]. /e2e for critical flows. /test-coverage.
Review
/code-review. Then use security-reviewer agent.
Docs
/update-docs. /update-codemaps.
EPIC
Use blueprint skill for "[objective]". Execute phases with /verify gates.
Section 5: Enhancement Rationale
Enhancement
Reason
(what was added)
(why it matters)
Footer
Not what you need? Tell me what to adjust, or make a normal task request
if you want execution instead of prompt optimization.
Examples
Trigger Examples
"Optimize this prompt for ECC"
"Rewrite this prompt so Claude Code uses the right commands"
"帮我优化这个指令"
"How should I prompt ECC for this task?"
Example 1: Vague Chinese Prompt (Project Detected)
User input:
帮我写一个用户登录页面
Phase 0 detects:package.json with Next.js 15, TypeScript, Tailwind CSS
Add a REST API endpoint for user profile updates with validation
Phase 0 detects:go.mod with Go 1.22, Chi router
Optimized Prompt (Full):
Add a REST API endpoint for user profile updates (PATCH /api/users/:id).
Tech stack: Go 1.22 + Chi router (detected from project)
Requirements:
- PATCH /api/users/:id — partial update of user profile
- Input validation for fields: name, email, avatar_url, bio
- Auth: require valid token, users can only update own profile
- Return 200 with updated user on success
- Return 400 with validation errors on invalid input
- Return 401/403 for auth failures
- Follow existing API patterns in the codebase
Workflow:
1. /plan the endpoint structure, middleware chain, and validation logic
2. /tdd — write table-driven tests for success, validation failure, auth failure, not-found
3. Implement following existing handler patterns
4. /go-review
5. /verify — run full test suite, confirm no regressions
Do not:
- Modify existing endpoints
- Change the database schema (use existing user table)
- Add new dependencies without checking existing ones first (use search-first skill)
Example 3: EPIC Project
User input:
Migrate our monolith to microservices
Optimized Prompt (Full):
Use the blueprint skill to plan: "Migrate monolith to microservices architecture"
Before executing, answer these questions in the blueprint:
1. Which domain boundaries exist in the current monolith?
2. Which service should be extracted first (lowest coupling)?
3. Communication pattern: REST APIs, gRPC, or event-driven (Kafka/RabbitMQ)?
4. Database strategy: shared DB initially or database-per-service from start?
5. Deployment target: Kubernetes, Docker Compose, or serverless?
The blueprint should produce phases like:
- Phase 1: Identify service boundaries and create domain map
- Phase 2: Set up infrastructure (API gateway, service mesh, CI/CD per service)
- Phase 3: Extract first service (strangler fig pattern)
- Phase 4: Verify with integration tests, then extract next service
- Phase N: Decommission monolith
Each phase = 1 PR, with /verify gates between phases.
Use /save-session between phases. Use /resume-session to continue.
Use git worktrees for parallel service extraction when dependencies allow.
Recommended: Opus 4.6 for blueprint planning, Sonnet 4.6 for phase execution.
Related Components
Component
When to Reference
configure-ecc
User hasn't set up ECC yet
skill-stocktake
Audit which components are installed (use instead of hardcoded catalog)
search-first
Research phase in optimized prompts
blueprint
EPIC-scope optimized prompts (invoke as skill, not command)
strategic-compact
Long session context management
cost-aware-llm-pipeline
Token optimization recommendations
1---2name: prompt-optimizer3description: Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite this prompt", or explicitly asks to enhance prompt quality. Also triggers on Chinese equivalents: "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令". DO NOT TRIGGER when: user wants the task executed directly, or says "just do it" / "直接做". DO NOT TRIGGER when user says "优化代码", "优化性能", "optimize performance", "optimize this code" — those are refactoring/performance tasks, not prompt optimization.4---56# Prompt Optimizer78Analyze a draft prompt, critique it, match it to ECC ecosystem components,9and output a complete optimized prompt the user can paste and run.1011## When to Use1213- User says "optimize this prompt", "improve my prompt", "rewrite this prompt"14- User says "help me write a better prompt for..."15- User says "what's the best way to ask Claude Code to..."16- User says "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令"17- User pastes a draft prompt and asks for feedback or enhancement18- User says "I don't know how to prompt for this"19- User says "how should I use ECC for..."20- User explicitly invokes `/prompt-optimize`2122### Do Not Use When2324- User wants the task done directly (just execute it)25- User says "优化代码", "优化性能", "optimize this code", "optimize performance" — these are refactoring tasks, not prompt optimization26- User is asking about ECC configuration (use `configure-ecc` instead)27- User wants a skill inventory (use `skill-stocktake` instead)28- User says "just do it" or "直接做"2930## How It Works3132**Advisory only — do not execute the user's task.**3334Do NOT write code, create files, run commands, or take any implementation35action. Your ONLY output is an analysis plus an optimized prompt.3637If the user says "just do it", "直接做", or "don't optimize, just execute",38do not switch into implementation mode inside this skill. Tell the user this39skill only produces optimized prompts, and instruct them to make a normal40task request if they want execution instead.4142Run this 6-phase pipeline sequentially. Present results using the Output Format below.4344### Analysis Pipeline4546### Phase 0: Project Detection4748Before analyzing the prompt, detect the current project context:49501. Check if a `CLAUDE.md` exists in the working directory — read it for project conventions512. Detect tech stack from project files:52 - `package.json` → Node.js / TypeScript / React / Next.js53 - `go.mod` → Go54 - `pyproject.toml` / `requirements.txt` → Python55 - `Cargo.toml` → Rust56 - `build.gradle` / `pom.xml` → Java / Kotlin (then check for `quarkus` in build file → Quarkus, or `spring-boot` → Spring Boot)57 - `Package.swift` → Swift58 - `Gemfile` → Ruby59 - `composer.json` → PHP60 - `*.csproj` / `*.sln` → .NET61 - `Makefile` / `CMakeLists.txt` → C / C++62 - `cpanfile` / `Makefile.PL` → Perl633. Note detected tech stack for use in Phase 3 and Phase 46465If no project files are found (e.g., the prompt is abstract or for a new project),66skip detection and flag "tech stack unknown" in Phase 4.6768### Phase 1: Intent Detection6970Classify the user's task into one or more categories:7172| Category | Signal Words | Example |73|----------|-------------|---------|74| New Feature | build, create, add, implement, 创建, 实现, 添加 | "Build a login page" |75| Bug Fix | fix, broken, not working, error, 修复, 报错 | "Fix the auth flow" |76| Refactor | refactor, clean up, restructure, 重构, 整理 | "Refactor the API layer" |77| Research | how to, what is, explore, investigate, 怎么, 如何 | "How to add SSO" |78| Testing | test, coverage, verify, 测试, 覆盖率 | "Add tests for the cart" |79| Review | review, audit, check, 审查, 检查 | "Review my PR" |80| Documentation | document, update docs, 文档 | "Update the API docs" |81| Infrastructure | deploy, CI, docker, database, 部署, 数据库 | "Set up CI/CD pipeline" |82| Design | design, architecture, plan, 设计, 架构 | "Design the data model" |8384### Phase 2: Scope Assessment8586If Phase 0 detected a project, use codebase size as a signal. Otherwise, estimate87from the prompt description alone and mark the estimate as uncertain.8889| Scope | Heuristic | Orchestration |90|-------|-----------|---------------|91| TRIVIAL | Single file, < 50 lines | Direct execution |92| LOW | Single component or module | Single command or skill |93| MEDIUM | Multiple components, same domain | Command chain + /verify |94| HIGH | Cross-domain, 5+ files | /plan first, then phased execution |95| EPIC | Multi-session, multi-PR, architectural shift | Use blueprint skill for multi-session plan |9697### Phase 3: ECC Component Matching9899Map intent + scope + tech stack (from Phase 0) to specific ECC components.100101#### By Intent Type102103| Intent | Commands | Skills | Agents |104|--------|----------|--------|--------|105| New Feature | /plan, /tdd, /code-review, /verify | tdd-workflow, verification-loop | planner, tdd-guide, code-reviewer |106| Bug Fix | /tdd, /build-fix, /verify | tdd-workflow | tdd-guide, build-error-resolver |107| Refactor | /refactor-clean, /code-review, /verify | verification-loop | refactor-cleaner, code-reviewer |108| Research | /plan | search-first, iterative-retrieval | — |109| Testing | /tdd, /e2e, /test-coverage | tdd-workflow, e2e-testing | tdd-guide, e2e-runner |110| Review | /code-review | security-review | code-reviewer, security-reviewer |111| Documentation | /update-docs, /update-codemaps | — | doc-updater |112| Infrastructure | /plan, /verify | docker-patterns, deployment-patterns, database-migrations | architect |113| Design (MEDIUM-HIGH) | /plan | — | planner, architect |114| Design (EPIC) | — | blueprint (invoke as skill) | planner, architect |115116#### By Tech Stack117118| Tech Stack | Skills to Add | Agent |119|------------|--------------|-------|120| Python / Django | django-patterns, django-tdd, django-security, django-verification, python-patterns, python-testing | python-reviewer |121| Go | golang-patterns, golang-testing | go-reviewer, go-build-resolver |122| Spring Boot / Java | springboot-patterns, springboot-tdd, springboot-security, springboot-verification, java-coding-standards, jpa-patterns | java-reviewer |123| Quarkus / Java | quarkus-patterns, quarkus-tdd, quarkus-security, quarkus-verification, java-coding-standards, jpa-patterns | java-reviewer |124| Kotlin / Android | kotlin-coroutines-flows, compose-multiplatform-patterns, android-clean-architecture | kotlin-reviewer |125| TypeScript / React | frontend-patterns, backend-patterns, coding-standards | code-reviewer |126| Swift / iOS | swiftui-patterns, swift-concurrency-6-2, swift-actor-persistence, swift-protocol-di-testing | code-reviewer |127| PostgreSQL | postgres-patterns, database-migrations | database-reviewer |128| Perl | perl-patterns, perl-testing, perl-security | code-reviewer |129| C++ | cpp-coding-standards, cpp-testing | code-reviewer |130| Other / Unlisted | coding-standards (universal) | code-reviewer |131132### Phase 4: Missing Context Detection133134Scan the prompt for missing critical information. Check each item and mark135whether Phase 0 auto-detected it or the user must supply it:136137- [ ] **Tech stack** — Detected in Phase 0, or must user specify?138- [ ] **Target scope** — Files, directories, or modules mentioned?139- [ ] **Acceptance criteria** — How to know the task is done?140- [ ] **Error handling** — Edge cases and failure modes addressed?141- [ ] **Security requirements** — Auth, input validation, secrets?142- [ ] **Testing expectations** — Unit, integration, E2E?143- [ ] **Performance constraints** — Load, latency, resource limits?144- [ ] **UI/UX requirements** — Design specs, responsive, a11y? (if frontend)145- [ ] **Database changes** — Schema, migrations, indexes? (if data layer)146- [ ] **Existing patterns** — Reference files or conventions to follow?147- [ ] **Scope boundaries** — What NOT to do?148149**If 3+ critical items are missing**, ask the user up to 3 clarification150questions before generating the optimized prompt. Then incorporate the151answers into the optimized prompt.152153### Phase 5: Workflow & Model Recommendation154155Determine where this prompt sits in the development lifecycle:156157```158Research → Plan → Implement (TDD) → Review → Verify → Commit159```160161For MEDIUM+ tasks, always start with /plan. For EPIC tasks, use blueprint skill.162163**Model recommendation** (include in output):164165| Scope | Recommended Model | Rationale |166|-------|------------------|-----------|167| TRIVIAL-LOW | Sonnet 4.6 | Fast, cost-efficient for simple tasks |168| MEDIUM | Sonnet 4.6 | Best coding model for standard work |169| HIGH | Sonnet 4.6 (main) + Opus 4.6 (planning) | Opus for architecture, Sonnet for implementation |170| EPIC | Opus 4.6 (blueprint) + Sonnet 4.6 (execution) | Deep reasoning for multi-session planning |171172**Multi-prompt splitting** (for HIGH/EPIC scope):173174For tasks that exceed a single session, split into sequential prompts:175- Prompt 1: Research + Plan (use search-first skill, then /plan)176- Prompt 2-N: Implement one phase per prompt (each ends with /verify)177- Final Prompt: Integration test + /code-review across all phases178- Use /save-session and /resume-session to preserve context between sessions179180---181182## Output Format183184Present your analysis in this exact structure. Respond in the same language185as the user's input.186187### Section 1: Prompt Diagnosis188189**Strengths:** List what the original prompt does well.190191**Issues:**192193| Issue | Impact | Suggested Fix |194|-------|--------|---------------|195| (problem) | (consequence) | (how to fix) |196197**Needs Clarification:** Numbered list of questions the user should answer.198If Phase 0 auto-detected the answer, state it instead of asking.199200### Section 2: Recommended ECC Components201202| Type | Component | Purpose |203|------|-----------|---------|204| Command | /plan | Plan architecture before coding |205| Skill | tdd-workflow | TDD methodology guidance |206| Agent | code-reviewer | Post-implementation review |207| Model | Sonnet 4.6 | Recommended for this scope |208209### Section 3: Optimized Prompt — Full Version210211Present the complete optimized prompt inside a single fenced code block.212The prompt must be self-contained and ready to copy-paste. Include:213- Clear task description with context214- Tech stack (detected or specified)215- /command invocations at the right workflow stages216- Acceptance criteria217- Verification steps218- Scope boundaries (what NOT to do)219220For items that reference blueprint, write: "Use the blueprint skill to..."221(not `/blueprint`, since blueprint is a skill, not a command).222223### Section 4: Optimized Prompt — Quick Version224225A compact version for experienced ECC users. Vary by intent type:226227| Intent | Quick Pattern |228|--------|--------------|229| New Feature | `/plan [feature]. /tdd to implement. /code-review. /verify.` |230| Bug Fix | `/tdd — write failing test for [bug]. Fix to green. /verify.` |231| Refactor | `/refactor-clean [scope]. /code-review. /verify.` |232| Research | `Use search-first skill for [topic]. /plan based on findings.` |233| Testing | `/tdd [module]. /e2e for critical flows. /test-coverage.` |234| Review | `/code-review. Then use security-reviewer agent.` |235| Docs | `/update-docs. /update-codemaps.` |236| EPIC | `Use blueprint skill for "[objective]". Execute phases with /verify gates.` |237238### Section 5: Enhancement Rationale239240| Enhancement | Reason |241|-------------|--------|242| (what was added) | (why it matters) |243244### Footer245246> Not what you need? Tell me what to adjust, or make a normal task request247> if you want execution instead of prompt optimization.248249---250251## Examples252253### Trigger Examples254255- "Optimize this prompt for ECC"256- "Rewrite this prompt so Claude Code uses the right commands"257- "帮我优化这个指令"258- "How should I prompt ECC for this task?"259260### Example 1: Vague Chinese Prompt (Project Detected)261262**User input:**263```264帮我写一个用户登录页面265```266267**Phase 0 detects:** `package.json` with Next.js 15, TypeScript, Tailwind CSS268269**Optimized Prompt (Full):**270```271使用项目现有技术栈(Next.js 15 + TypeScript + Tailwind CSS)实现用户登录页面。272273技术要求:274- 沿用项目现有的组件结构和路由约定275- 表单验证使用项目中已有的验证方案(检查是否已用 Zod/Yup/其他)276- 认证方式:沿用项目现有认证方案(如无,默认 JWT)277- 包含:邮箱/密码登录表单、表单验证、错误提示、加载状态、响应式布局278279工作流:2801. /plan 先规划组件结构和认证流程,参考现有页面的模式2812. /tdd 测试先行:编写登录表单的单元测试和认证流程的集成测试2823. 实现登录页面和认证逻辑2834. /code-review 审查实现2845. /verify 验证所有测试通过且页面正常渲染285286安全要求:287- 密码不明文传输288- 防止暴力破解(rate limiting)289- XSS 防护290- CSRF token291292验收标准:293- 所有测试通过,覆盖率 80%+294- 页面在移动端和桌面端正常渲染295- 登录成功跳转到 dashboard,失败显示错误信息296297不要做:298- 不要实现注册页面299- 不要实现忘记密码功能300- 不要修改现有的路由结构301```302303### Example 2: Moderate English Prompt304305**User input:**306```307Add a REST API endpoint for user profile updates with validation308```309310**Phase 0 detects:** `go.mod` with Go 1.22, Chi router311312**Optimized Prompt (Full):**313```314Add a REST API endpoint for user profile updates (PATCH /api/users/:id).315316Tech stack: Go 1.22 + Chi router (detected from project)317318Requirements:319- PATCH /api/users/:id — partial update of user profile320- Input validation for fields: name, email, avatar_url, bio321- Auth: require valid token, users can only update own profile322- Return 200 with updated user on success323- Return 400 with validation errors on invalid input324- Return 401/403 for auth failures325- Follow existing API patterns in the codebase326327Workflow:3281. /plan the endpoint structure, middleware chain, and validation logic3292. /tdd — write table-driven tests for success, validation failure, auth failure, not-found3303. Implement following existing handler patterns3314. /go-review3325. /verify — run full test suite, confirm no regressions333334Do not:335- Modify existing endpoints336- Change the database schema (use existing user table)337- Add new dependencies without checking existing ones first (use search-first skill)338```339340### Example 3: EPIC Project341342**User input:**343```344Migrate our monolith to microservices345```346347**Optimized Prompt (Full):**348```349Use the blueprint skill to plan: "Migrate monolith to microservices architecture"350351Before executing, answer these questions in the blueprint:3521. Which domain boundaries exist in the current monolith?3532. Which service should be extracted first (lowest coupling)?3543. Communication pattern: REST APIs, gRPC, or event-driven (Kafka/RabbitMQ)?3554. Database strategy: shared DB initially or database-per-service from start?3565. Deployment target: Kubernetes, Docker Compose, or serverless?357358The blueprint should produce phases like:359- Phase 1: Identify service boundaries and create domain map360- Phase 2: Set up infrastructure (API gateway, service mesh, CI/CD per service)361- Phase 3: Extract first service (strangler fig pattern)362- Phase 4: Verify with integration tests, then extract next service363- Phase N: Decommission monolith364365Each phase = 1 PR, with /verify gates between phases.366Use /save-session between phases. Use /resume-session to continue.367Use git worktrees for parallel service extraction when dependencies allow.368369Recommended: Opus 4.6 for blueprint planning, Sonnet 4.6 for phase execution.370```371372---373374## Related Components375376| Component | When to Reference |377|-----------|------------------|378| `configure-ecc` | User hasn't set up ECC yet |379| `skill-stocktake` | Audit which components are installed (use instead of hardcoded catalog) |380| `search-first` | Research phase in optimized prompts |381| `blueprint` | EPIC-scope optimized prompts (invoke as skill, not command) |382| `strategic-compact` | Long session context management |383| `cost-aware-llm-pipeline` | Token optimization recommendations |
Run npx skillmds add rajanthar/prompt-optimizer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite this prompt", or explicitly asks to enhance prompt quality. Also triggers on Chinese equivalents: "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令". DO NOT TRIGGER when: user wants the task executed directly, or says "just do it" / "直接做". DO NOT TRIGGER when user says "优化代码", "优化性能", "optimize performance", "optimize this code" — those are refactoring/performance tasks, not prompt optimization. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
RajanthaR (@rajanthar) published this skill. Their other Agent Skills are listed on their SkillMD profile.