Transforms user prompts into optimized prompts using frameworks (RTF, RISEN, Chain of Thought, RODES, Chain of Density, RACE, RISE, STAR, SOAP, CLEAR, GROW)
Add this skill
npx mdskills install sickn33/prompt-engineerComprehensive prompt optimization skill with 11 frameworks, clear workflows, and smart intent analysis
1---2name: prompt-engineer3description: "Transforms user prompts into optimized prompts using frameworks (RTF, RISEN, Chain of Thought, RODES, Chain of Density, RACE, RISE, STAR, SOAP, CLEAR, GROW)"4version: 1.1.05author: Eric Andrade6created: 2025-02-017updated: 2026-02-048platforms: [github-copilot-cli, claude-code, codex]9category: automation10tags: [prompt-engineering, optimization, frameworks, ai-enhancement]11risk: safe12---1314## Purpose1516This skill transforms raw, unstructured user prompts into highly optimized prompts using established prompting frameworks. It analyzes user intent, identifies task complexity, and intelligently selects the most appropriate framework(s) to maximize Claude/ChatGPT output quality.1718The skill operates in "magic mode" - it works silently behind the scenes, only interacting with users when clarification is critically needed. Users receive polished, ready-to-use prompts without technical explanations or framework jargon.1920This is a **universal skill** that works in any terminal context, not limited to Obsidian vaults or specific project structures.2122## When to Use2324Invoke this skill when:2526- User provides a vague or generic prompt (e.g., "help me code Python")27- User has a complex idea but struggles to articulate it clearly28- User's prompt lacks structure, context, or specific requirements29- Task requires step-by-step reasoning (debugging, analysis, design)30- User needs a prompt for a specific AI task but doesn't know prompting frameworks31- User wants to improve an existing prompt's effectiveness32- User asks variations of "how do I ask AI to..." or "create a prompt for..."3334## Workflow3536### Step 1: Analyze Intent3738**Objective:** Understand what the user truly wants to accomplish.3940**Actions:**411. Read the raw prompt provided by the user422. Detect task characteristics:43 - **Type:** coding, writing, analysis, design, learning, planning, decision-making, creative, etc.44 - **Complexity:** simple (one-step), moderate (multi-step), complex (requires reasoning/design)45 - **Clarity:** clear intention vs. ambiguous/vague46 - **Domain:** technical, business, creative, academic, personal, etc.473. Identify implicit requirements:48 - Does user need examples?49 - Is output format specified?50 - Are there constraints (time, resources, scope)?51 - Is this exploratory or execution-focused?5253**Detection Patterns:**54- **Simple tasks:** Short prompts (<50 chars), single verb, no context55- **Complex tasks:** Long prompts (>200 chars), multiple requirements, conditional logic56- **Ambiguous tasks:** Generic verbs ("help", "improve"), missing object/context57- **Structured tasks:** Mentions steps, phases, deliverables, stakeholders585960### Step 3: Select Framework(s)6162**Objective:** Map task characteristics to optimal prompting framework(s).6364**Framework Mapping Logic:**6566| Task Type | Recommended Framework(s) | Rationale |67|-----------|-------------------------|-----------|68| **Role-based tasks** (act as expert, consultant) | **RTF** (Role-Task-Format) | Clear role definition + task + output format |69| **Step-by-step reasoning** (debugging, proof, logic) | **Chain of Thought** | Encourages explicit reasoning steps |70| **Structured projects** (multi-phase, deliverables) | **RISEN** (Role, Instructions, Steps, End goal, Narrowing) | Comprehensive structure for complex work |71| **Complex design/analysis** (systems, architecture) | **RODES** (Role, Objective, Details, Examples, Sense check) | Balances detail with validation |72| **Summarization** (compress, synthesize) | **Chain of Density** | Iterative refinement to essential info |73| **Communication** (reports, presentations, storytelling) | **RACE** (Role, Audience, Context, Expectation) | Audience-aware messaging |74| **Investigation/analysis** (research, diagnosis) | **RISE** (Research, Investigate, Synthesize, Evaluate) | Systematic analytical approach |75| **Contextual situations** (problem-solving with background) | **STAR** (Situation, Task, Action, Result) | Context-rich problem framing |76| **Documentation** (medical, technical, records) | **SOAP** (Subjective, Objective, Assessment, Plan) | Structured information capture |77| **Goal-setting** (OKRs, objectives, targets) | **CLEAR** (Collaborative, Limited, Emotional, Appreciable, Refinable) | Goal clarity and actionability |78| **Coaching/development** (mentoring, growth) | **GROW** (Goal, Reality, Options, Will) | Developmental conversation structure |7980**Blending Strategy:**81- **Combine 2-3 frameworks** when task spans multiple types82- Example: Complex technical project → **RODES + Chain of Thought** (structure + reasoning)83- Example: Leadership decision → **CLEAR + GROW** (goal clarity + development)8485**Selection Criteria:**86- Primary framework = best match to core task type87- Secondary framework(s) = address additional complexity dimensions88- Avoid over-engineering: simple tasks get simple frameworks8990**Critical Rule:** This selection happens **silently** - do not explain framework choice to user.9192Role: You are a senior software architect. [RTF - Role]9394Objective: Design a microservices architecture for [system]. [RODES - Objective]9596Approach this step-by-step: [Chain of Thought]971. Analyze current monolithic constraints982. Identify service boundaries993. Design inter-service communication1004. Plan data consistency strategy101102Details: [RODES - Details]103- Expected traffic: [X]104- Data volume: [Y]105- Team size: [Z]106107Output Format: [RTF - Format]108Provide architecture diagram description, service definitions, and migration roadmap.109110Sense Check: [RODES - Sense check]111Validate that services are loosely coupled, independently deployable, and aligned with business domains.112```113114**4.5. Language Adaptation**115- If original prompt is in Portuguese, generate prompt in Portuguese116- If original prompt is in English, generate prompt in English117- If mixed, default to English (more universal for AI models)118119**4.6. Quality Checks**120Before finalizing, verify:121- [ ] Prompt is self-contained (no external context needed)122- [ ] Task is specific and measurable123- [ ] Output format is clear124- [ ] No ambiguous language125- [ ] Appropriate level of detail for task complexity126127128## Critical Rules129130### **NEVER:**131132- ❌ Assume information that wasn't provided - ALWAYS ask if critical details are missing133- ❌ Explain which framework was selected or why (magic mode - keep it invisible)134- ❌ Generate generic, one-size-fits-all prompts - always customize to context135- ❌ Use technical jargon in the final prompt (unless user's domain is technical)136- ❌ Ask more than 3 clarifying questions (avoid user fatigue)137- ❌ Include meta-commentary in the output ("This prompt uses...", "Note that...")138- ❌ Present output without code block formatting139- ❌ Mix languages inconsistently (if user writes in PT, respond in PT)140141### **ALWAYS:**142143- ✅ Analyze intent before generating (Step 1 is mandatory)144- ✅ Ask clarifying questions if critical information is ambiguous (Step 2 conditional)145- ✅ Select framework(s) based on task type and complexity (Step 3 mapping)146- ✅ Blend multiple frameworks when it improves prompt quality147- ✅ Adapt prompt length to original input complexity (simple → short, complex → detailed)148- ✅ Include output format specification in generated prompts149- ✅ Present final prompt in clean Markdown code block150- ✅ Make prompts self-contained (no dependency on external context)151- ✅ Use examples in complex prompts to illustrate expected output152- ✅ Validate prompt completeness before presenting (quality checks in Step 4.6)153154155### **Example 2: Complex Clear Prompt → RODES + Chain of Thought (No Clarification)**156157**User Input:**158```159copilot> create prompt for: I need to build a product recommendation system considering purchase history, user preferences, and market trends160```161162**Skill Internal Process:**1631. **Analyze:** Clear intent, complex task (ML system design), technical domain1642. **Clarify:** Skip (sufficient information)1653. **Select:** RODES (complex design) + Chain of Thought (reasoning needed)166167**Skill Output:**168169````markdown170```171Role: You are a senior machine learning engineer specializing in recommendation systems.172173Objective: Design a product recommendation system that combines user purchase history, preferences, and market trends.174175Details:176- Input data sources: user transaction logs, preference surveys, market trend APIs177- Algorithm considerations: collaborative filtering, content-based filtering, hybrid approaches178- Performance metrics: precision, recall, diversity, novelty179- Scalability: system must handle 100k+ users180- Real-time constraints: recommendations updated within 500ms181182Approach step-by-step:1831. Analyze the three data sources and their relationships1842. Propose 2-3 algorithm approaches with trade-offs analysis1853. Design data pipeline architecture (ingestion, processing, serving)1864. Define evaluation metrics and A/B testing strategy1875. Outline implementation roadmap with phases188189Examples:190- Show pseudocode for core recommendation logic191- Illustrate data flow diagram192- Provide sample API response structure193194Sense Check: Validate that the proposed solution balances personalization with discovery, scales to production load, and incorporates real-time market trends effectively.195196Output format: Technical design document with architecture diagrams, algorithm justification, and implementation roadmap.197```198````199200201### **Example 4: Code Debugging → Chain of Thought**202203**User Input:**204```205copilot> optimize prompt: my Python code isn't working, needs debugging206```207208**Skill Internal Process:**2091. **Analyze:** Debugging task, needs step-by-step reasoning2102. **Clarify:** Skip (user will provide code context later)2113. **Select:** Chain of Thought212213**Skill Output:**214215````markdown216```217You are an expert Python debugger.218219Task: Debug the Python code provided by the user by analyzing it step-by-step.220221Debugging approach:2221. Read and understand the code's intended purpose2232. Identify the error or unexpected behavior2243. Trace variable states at each execution step2254. Locate the root cause of the issue2265. Propose fix with explanation2276. Suggest preventive measures to avoid similar bugs228229For each step, show your reasoning:230- What you're checking231- What you found232- Why it matters233234Output format:235- **Issue identified:** [Describe the bug]236- **Root cause:** [Why it's happening]237- **Fix:** [Corrected code with comments]238- **Prevention:** [Best practices to avoid this in the future]239240Include a working example to verify the fix.241```242````243244245## Notes246247This skill is **platform-agnostic** and works in any terminal context where GitHub Copilot CLI is available. It does not depend on:248- Obsidian vault structure249- Specific project configurations250- External files or templates251252The skill is entirely self-contained, operating purely on user input and framework knowledge.253
Full transparency — inspect the skill content before installing.