### Few-Shot CoT with Reasoning Examples Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/chain-of-thought.md Provide examples demonstrating step-by-step reasoning to guide the model. This is effective when the problem structure is similar to provided examples. ```plaintext Example 1: Q: If a train travels 120 miles in 2 hours, what's its speed? A: Let's break this down: 1. Speed = Distance / Time 2. Distance = 120 miles 3. Time = 2 hours 4. Speed = 120 / 2 = 60 mph Therefore: 60 mph Example 2: Q: A store offers 20% off, then an additional 10% off. What's the total discount on a $100 item? A: Let's work through this: 1. First discount: 20% of $100 = $20 2. Price after first discount: $100 - $20 = $80 3. Second discount: 10% of $80 = $8 4. Final price: $80 - $8 = $72 5. Total discount: $100 - $72 = $28 6. Total discount percentage: 28/100 = 28% Therefore: 28% total discount (not 30%) Now solve: Q: [Your problem] A: Let's break this down: ``` -------------------------------- ### Install New Package Source: https://github.com/ckelsoe/prompt-architect/blob/main/MIGRATION.md Use this command to install the new package. The interactive installer will guide you through agent detection and installation. ```bash npm install -g @ckelsoe/prompt-architect ``` -------------------------------- ### New Install Methods Source: https://github.com/ckelsoe/prompt-architect/blob/main/MIGRATION.md Lists various commands for installing the prompt-architect package using different methods. ```text | Method | Command | |--------|---------| | npm (interactive) | `npm install -g @ckelsoe/prompt-architect` | | Claude Code Plugin | `/plugin marketplace add ckelsoe/prompt-architect` | | Gemini CLI | `gemini skills install https://github.com/ckelsoe/prompt-architect.git` | | Multi-agent | `npx @ckelsoe/prompt-architect --all` | ``` -------------------------------- ### RISE-IE Complete Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rise.md An example demonstrating the application of the RISE-IE framework for analyzing customer reviews, showing the transformation from a basic prompt to a structured one. ```markdown ROLE: You are a customer insights analyst with expertise in sentiment analysis and theme extraction. INPUT: You'll receive 50 customer reviews from our mobile app. Each review contains: - Star rating (1-5) - Written feedback - Date of review - User segment (free/premium) STEPS: 1. Categorize reviews by sentiment (positive, neutral, negative) 2. Extract common themes and topics mentioned 3. Identify feature requests vs. complaints vs. praise 4. Segment findings by user type (free vs. premium) 5. Highlight urgent issues mentioned multiple times 6. Note any patterns in timing or trends EXPECTATION: Provide a structured analysis with: - Summary table showing sentiment distribution - Top 5 themes with frequency counts - List of feature requests ranked by mentions - Critical issues requiring immediate attention - Comparison of free vs. premium user feedback - 2-3 actionable recommendations ``` -------------------------------- ### Example Pre-Mortem: Product Launch Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/pre-mortem.md This example demonstrates how to apply the Pre-Mortem analysis template to a specific product launch scenario. It includes a project description and a failure assumption tailored to the scenario. ```text PROJECT: We are launching a new B2B project management tool for engineering teams in Q3. Our team is 4 engineers, 1 designer, and 1 PM. We have 3 design partners signed up for beta. Target: 50 paying customers by end of Q4. FAILURE ASSUMPTION: It is December 31st and we have failed to reach 50 paying customers. The product launched in October with 8 beta customers but growth stalled. FAILURE ANALYSIS: Describe how this played out. Then identify 10 specific failure causes with domain, and earliest warning sign for each. PRIORITY: Rank by likelihood. Flag any single points of failure. ``` -------------------------------- ### Complete RISEN Framework Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/risen.md An example of a fully constructed prompt using the RISEN framework for a security-focused code review. ```markdown ROLE: You are a senior code reviewer with expertise in Python and system security. You have 10+ years of experience identifying vulnerabilities and architectural issues. INSTRUCTIONS: Conduct a thorough security-focused code review following OWASP guidelines. Prioritize identifying security vulnerabilities over style issues. Consider both the code itself and its architectural implications. STEPS: 1. Scan for common security vulnerabilities (SQL injection, XSS, auth issues) 2. Review authentication and authorization logic 3. Examine data validation and sanitization 4. Check for sensitive data exposure 5. Analyze third-party dependencies for known vulnerabilities 6. Assess error handling and logging practices 7. Evaluate API security measures 8. Review configuration and secrets management 9. Document findings with severity ratings 10. Provide remediation recommendations END GOAL: A comprehensive security assessment report that: - Categorizes vulnerabilities by severity (Critical, High, Medium, Low) - Includes specific code references with line numbers - Provides concrete remediation steps for each issue - Prioritizes fixes by risk and effort - Can be shared with development team for action NARROWING: - Do NOT focus on code style or formatting issues - Do NOT suggest complete rewrites; focus on targeted fixes - Avoid generic security advice; be specific to this codebase - Do NOT include theoretical vulnerabilities that don't apply - Stay within Python ecosystem; don't suggest language changes - Do NOT redesign the architecture; work within current structure ``` -------------------------------- ### Example: Recovering a Writing Style for Product Descriptions Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rpef.md This example demonstrates how to use RPEF to reconstruct a prompt for generating product descriptions with a specific tone and structure, based on a provided output sample. ```text You are an expert Prompt Engineer performing reverse prompt engineering. TASK: Analyze the following product description. Reconstruct the prompt that would consistently produce this style of writing for other products. OUTPUT SAMPLE: "Mira is the meeting companion that thinks ahead. While you're present in the conversation, Mira is quietly capturing every decision, action item, and insight — then turning them into a clean summary the moment you close your laptop. No more frantic note-taking. No more 'wait, what did we decide?' Just clarity, automatically." ANALYSIS INSTRUCTIONS: Examine for: implied persona, tone, structure, what it does vs. doesn't say, sentence length patterns, opening hook strategy, implicit audience. RECOVERED PROMPT: Generate a reusable template for writing product descriptions in this style. ``` -------------------------------- ### TIDD-EC: Bad vs. Good Examples Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/tidd-ec.md Shows how to provide effective examples in prompts, contrasting generic placeholders with a specific, realistic response. ```plaintext EXAMPLES: Write a good response ``` ```plaintext EXAMPLES: "Dear John, I've reviewed your account and I see exactly what happened. Due to a system error, you were charged twice for your March subscription. I've immediately processed a $50 refund to your original payment method (arrives in 3-5 business days) and added a $5 account credit as an apology. This won't happen again - we've fixed the system issue. Please let me know if you have any questions. - Sarah" ``` -------------------------------- ### BAB Framework Example: Tone Transformation Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/bab.md Illustrates the BAB framework's application in transforming an email's tone. It shows the 'Before' state (problematic email), the desired 'After' state (improved email characteristics), and the 'Bridge' rules guiding the transformation. ```text BEFORE: This customer complaint response sounds defensive and shifts blame to the customer. It uses passive voice and doesn't offer a clear resolution path. AFTER: A response that acknowledges the problem, takes responsibility, and gives the customer a clear next step. Should feel warm, professional, and solution-focused. BRIDGE: - Keep the factual information (what happened, timeline) - Remove defensive language and blame shifting - Add an explicit apology in the first sentence - End with a single, specific action item the customer should take - Tone: empathetic but professional, not overly apologetic - Length: match original (under 150 words) ``` -------------------------------- ### Step-Back Prompt Example: Article Introduction Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/step-back.md This example demonstrates how to transform a direct content creation request into a Step-Back prompt. It first asks for the underlying principles of effective introductions and then applies them to the specific topic. ```plaintext ORIGINAL QUESTION: Write an introduction for my article about climate change and agriculture. STEP-BACK: First answer: What are the rhetorical principles of an effective article introduction? What should it accomplish, and what structural elements make introductions work? PRINCIPLE APPLICATION: Using those principles, write an introduction for an article about how climate change is disrupting agricultural yield patterns globally. Target audience: policy-informed general readers. Goal: create urgency without alarmism. ``` -------------------------------- ### Install Prompt Architect Interactively Source: https://github.com/ckelsoe/prompt-architect/blob/main/adapters/README.md Use this command to interactively detect and install Prompt Architect. It's a convenient way to set up the tool. ```bash npx @ckelsoe/prompt-architect ``` -------------------------------- ### API Documentation Format Specification Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rtf.md Example of a good format specification for API documentation. Outlines required sections for endpoint details, request parameters, response codes, and examples. ```text Structure as: - Endpoint details (method, path, auth required) - Request body parameters (table: name, type, required, description) - Response codes (200, 400, 409 with meanings) - Example request (curl) - Example response (JSON) - Notes section for special behaviors ``` -------------------------------- ### RISE-IX Complete Example for Product Descriptions Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rise.md A complete example of the RISE-IX framework applied to writing product descriptions for a sustainable clothing line. It demonstrates how to fill in each section for a creative task. ```plaintext ROLE: You are a senior copywriter specializing in sustainable fashion and eco-conscious brands. INSTRUCTIONS: Create compelling product descriptions for our new sustainable clothing line that: - Highlight eco-friendly materials and production methods - Appeal to environmentally conscious millennials - Emphasize both style and sustainability - Include specific product details and benefits - Drive purchase intent through emotional connection STEPS: 1. Start with an attention-grabbing opening about the product's unique appeal 2. Describe the sustainable materials and ethical production process 3. Highlight the product's style, fit, and versatility 4. Include specific technical details (materials, care, sizing) 5. End with a call-to-action emphasizing the impact of their purchase EXAMPLES: Similar to these high-performing descriptions: Example 1: "The Ocean Breeze Tee - Crafted from 100% recycled ocean plastics, this impossibly soft tee proves sustainability never has to sacrifice style. Each purchase removes 5 plastic bottles from our oceans..." Example 2: "Evergreen Denim Jacket - Timeless style meets zero-waste innovation. Woven from organic cotton with natural indigo dye, this jacket gets better with every wear while treading lightly on the planet..." ``` -------------------------------- ### CoD Summarization Example (With CoD) Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/chain-of-density.md This example demonstrates how to apply Chain of Density to a summarization task, specifying word counts and refinement goals for each iteration to achieve maximum information density. ```prompt Summarize this research paper using Chain of Density: [Paper content] ITERATION 1 (200 words): Create a comprehensive summary covering all major points. Prioritize completeness over brevity. ITERATION 2 (150 words): Refine the summary: - Remove redundant information - Combine related points - Increase information density ITERATION 3 (100 words): Further compression: - Keep only essential information - Make every sentence count - Maintain accuracy ITERATION 4 (75 words): Maximum density: - Distill to core findings - Remove all fluff - Preserve critical details For each iteration, highlight what you removed and why. ``` -------------------------------- ### Install Prompt Architect for Gemini CLI Source: https://context7.com/ckelsoe/prompt-architect/llms.txt Install Prompt Architect for Gemini CLI using the provided command. This command fetches the skill from the specified GitHub repository. ```bash gemini skills install https://github.com/ckelsoe/prompt-architect.git ``` -------------------------------- ### Good Step Design Examples Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/risen.md Illustrates specific and actionable steps for a process. These examples focus on validation, sanitization, secure querying, transformation, and logging. ```plaintext 1. Validate input data against schema (check types, ranges, required fields) 2. Sanitize user input (escape HTML, strip dangerous chars) 3. Query database with parameterized statements 4. Transform results into response format 5. Log operation with timestamp and user ID ``` -------------------------------- ### Prompt Architect CLI Help Source: https://context7.com/ckelsoe/prompt-architect/llms.txt Displays all supported options for the Prompt Architect CLI when run with the --help flag. This output details usage for interactive installation and agent-specific or general installations. ```bash npx @ckelsoe/prompt-architect --help # Output: # Prompt Architect v3.2.2 — Multi-Agent Installer # # Usage: # npx @ckelsoe/prompt-architect Interactive multi-agent install # npx @ckelsoe/prompt-architect --all Install to all detected agents # npx @ckelsoe/prompt-architect --claude Install to Claude Code only # # Agent flags (skip interactive, install to specified targets): # --claude Claude Code (~/.claude/skills/) # --gemini Gemini CLI (~/.gemini/skills/) # --agents Agent Skills universal (~/.agents/skills/) # --windsurf Windsurf (.windsurfrules) # # Note: Cursor, Copilot, Codex, and 30+ other tools use the Agent Skills # standard. Install with --agents to cover all of them. # # Options: # -a, --all Install to all detected agents # -p, --project Use project-local paths where applicable # -f, --force Overwrite existing installations # -y, --yes Accept defaults (all detected agents) # -h, --help Show this help ``` -------------------------------- ### RCoT Example 1: Multi-Condition Logic Problem Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rcot.md An example demonstrating the RCoT framework applied to a multi-condition logic problem. It shows the prompts for each of the four RCoT steps. ```text STEP 1 — INITIAL ANSWER: A company has 3 departments: Engineering, Marketing, and Sales. Engineering has 2x as many employees as Marketing. Sales has 5 fewer employees than Engineering. Marketing has 10 employees. How many total employees does the company have? Show your reasoning step by step. STEP 2 — QUESTION RECONSTRUCTION: Given only this answer: "45 employees total" What conditions must the question have contained? List every constraint implied by this answer. STEP 3 — CROSS-CHECK: Compare your reconstructed conditions to the actual question. What did you overlook? What did you assume that wasn't stated? STEP 4 — CORRECTION: If your cross-check found discrepancies, recalculate with all conditions properly applied. ``` -------------------------------- ### Install Skill Directory Programmatically Source: https://context7.com/ckelsoe/prompt-architect/llms.txt Use this function to copy a skill directory to a target agent's skills folder. It removes existing installations first and verifies the presence of SKILL.md. Throws an error on failure. ```javascript const { installSkillDir } = require('./scripts/install.js'); // internal use const path = require('path'); const os = require('os'); // Install to Claude Code user-global path const sourcePath = path.join(__dirname, 'skills', 'prompt-architect'); const destPath = path.join(os.homedir(), '.claude', 'skills', 'prompt-architect'); try { installSkillDir(sourcePath, destPath); console.log('Installed to', destPath); // → Installed to /Users/you/.claude/skills/prompt-architect } catch (err) { console.error('Installation failed:', err.message); // → Installation failed: SKILL.md not found after copy } ``` -------------------------------- ### CO-STAR Complete Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/co-star.md An example demonstrating the application of the CO-STAR framework for a health blog post. It contrasts a basic prompt with a detailed CO-STAR prompt, showcasing the improved specificity and guidance. ```text CONTEXT: I'm creating content for a health blog aimed at busy professionals who struggle to find time for fitness. Previous articles have focused on nutrition, and this is part of a series on lifestyle improvements. OBJECTIVE: Create an engaging article that convinces time-pressed professionals that exercise is worth prioritizing, focusing on benefits beyond just physical health. STYLE: Use a conversational blog style with short paragraphs (2-3 sentences), subheadings every 150-200 words, and occasional bullet points for key takeaways. Include specific examples and avoid medical jargon. TONE: Encouraging and motivating without being preachy. Acknowledge their time constraints and show empathy for their challenges. Be practical and realistic rather than idealistic. AUDIENCE: Professionals aged 30-50 who work 50+ hour weeks, have limited free time, may have families, and currently don't exercise regularly. They're skeptical of fitness advice that seems unrealistic for their lifestyle. RESPONSE FORMAT: 800-word article with: - Engaging headline - Brief introduction (2-3 sentences) - 4-5 main sections with subheadings - Bullet points highlighting key benefits - Practical conclusion with next steps ``` -------------------------------- ### CTF Example: Code Explanation Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/ctf.md This example demonstrates using the CTF framework to request an explanation of a code snippet, including context about the user's role and the code's origin. ```plaintext CONTEXT: I'm a junior developer new to this codebase. The function below is from a legacy authentication module that nobody has documented. I need to understand it before refactoring it next week. TASK: Explain what this function does, why each section exists, and flag any potential issues I should know before touching it. FORMAT: - Short plain-language summary (2-3 sentences) - Line-by-line breakdown as a numbered list - Potential issues section at the end (bullet points) ``` -------------------------------- ### Example: Recovered Prompt for Product Description Style Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rpef.md The recovered prompt generated by RPEF for the product description example. It specifies the role, task, and detailed style rules to ensure consistent output. ```text ROLE: You are a B2B SaaS copywriter who specializes in product descriptions for productivity tools. TASK: Write a product description for [PRODUCT NAME], a tool that [CORE FUNCTION]. STYLE RULES: - Open with the product name as subject in a short declarative sentence - Use "while you [user action], [product] is [working for you]" structure for the value prop - Contrast the painful before-state with the effortless after-state - No feature lists — benefits only, in plain language - End with a 3-word payoff phrase: "[adjective], [adverb]." - Target: 3-4 sentences, under 80 words - Voice: confident, warm, smart — like a trusted colleague, not a marketer ``` -------------------------------- ### RTF with Examples Variation Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rtf.md An RTF variation that incorporates 'EXAMPLES OF GOOD OUTPUT' to provide concrete illustrations and guide the desired response format. ```plaintext ROLE: [Expertise] TASK: [What needs doing] EXAMPLES OF GOOD OUTPUT: [Show 1-2 examples] FORMAT: [Follow this structure] ``` -------------------------------- ### Interactive Install Prompt Architect Source: https://context7.com/ckelsoe/prompt-architect/llms.txt Use this command for an interactive installation that detects and installs Prompt Architect to all compatible AI agents on your system. For non-interactive installs, use flags like --all, --claude, or --gemini. ```bash npx @ckelsoe/prompt-architect ``` ```bash # Non-interactive: install to all detected agents at once npx @ckelsoe/prompt-architect --all # Non-interactive: install to a specific agent only npx @ckelsoe/prompt-architect --claude npx @ckelsoe/prompt-architect --gemini npx @ckelsoe/prompt-architect --agents # ~/.agents/skills/ — covers Cursor, Copilot, Codex, Roo Code, etc. npx @ckelsoe/prompt-architect --windsurf # Project-local install (instead of user-global) npx @ckelsoe/prompt-architect --claude --project # Accept defaults without prompts (CI-safe) npx @ckelsoe/prompt-architect --yes ``` -------------------------------- ### RACE Example: Onboarding Copy Prompt Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/race.md This RACE framework example demonstrates how to prompt an AI to write onboarding copy for a mobile application. It defines the persona, the task, user context, and specific requirements for the copy's tone and structure. ```plaintext ROLE: You are a UX writer who specializes in onboarding flows for consumer apps. ACTION: Write the copy for a 3-screen onboarding flow for our task management app. CONTEXT: Users are downloading the app after seeing a social ad. Many are switching from pen/paper or spreadsheets. They are not tech-savvy. They've already created an account before seeing this onboarding. The screens are: (1) value prop, (2) import/create first task, (3) invite team. EXPECTATION: Each screen needs a headline (5 words max), one-sentence subhead, and CTA button label. Tone: encouraging, simple, no jargon. The copy should build momentum toward the first meaningful action. ``` -------------------------------- ### APE Example: Translation Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/ape.md An example of using APE to request a natural-sounding translation for end-user facing text. ```text ACTION: Translate the following error message into Portuguese (Brazilian). PURPOSE: Our app is launching in Brazil and this error will be seen by end users. EXPECTATION: Natural-sounding Brazilian Portuguese, not a literal translation. Keep technical terms in English. ``` -------------------------------- ### CoD Best Practice: Show Evolution Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/chain-of-density.md To understand the refinement process, request that each iteration's output be shown along with an explanation of the changes made and the reasoning behind them. ```prompt Good: "Show each iteration and explain what changed and why" Poor: "Just give me the final version" ``` -------------------------------- ### CARE Framework Example: UX Research Prompt Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/care.md An example demonstrating the application of the CARE framework for a UX research task. It includes detailed context, a specific ask, clear rules for question formulation, and an example of good vs. bad question phrasing. ```plaintext CONTEXT: I am a UX researcher preparing for a moderated usability study on our mobile banking app's new money transfer flow. Participants are adults aged 35-65 who are non-technical but regular smartphone users. The study will be conducted remotely via Zoom with screen sharing. ASK: Write 6 interview questions for the post-task debrief, focusing on comprehension, confidence, and friction points in the transfer flow. RULES: - All questions must be open-ended (no yes/no questions) - Use plain, everyday language — no banking or UX jargon - Do not suggest answers within the question (no leading questions) - Each question should address one thing only (no double-barreled) - Avoid "why" questions (use "what made you..." instead) - Questions should take no more than 3 minutes each to answer EXAMPLES: Good: "What went through your mind when you reached the confirmation screen?" Bad: "Was the confirmation screen clear and easy to understand?" (yes/no, leading) ``` -------------------------------- ### Example 1: Technical Explanation - Skeleton Output Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/skeleton-of-thought.md The skeleton output for explaining microservices architecture, detailing key points relevant to a migration decision for a senior engineer. ```text 1. Core concept | Each service owns one business capability and runs independently 2. Service boundaries | How to decompose a monolith into services without creating distributed spaghetti 3. Communication patterns | Sync (REST/gRPC) vs async (events) and when each applies 4. Data ownership | Each service owns its database; consequences for queries and consistency 5. Operational complexity | What microservices add: service mesh, CI per service, distributed tracing 6. Migration strategy | Strangler fig vs. big-bang; risk profile of each 7. When NOT to use | Scale thresholds below which microservices create more problems than they solve ``` -------------------------------- ### installSkillDir(sourcePath, destPath) Source: https://context7.com/ckelsoe/prompt-architect/llms.txt Copies a skill directory to a target agent's skills folder, removing any existing installation first. It performs a recursive copy and verifies the presence of SKILL.md, throwing an error on failure. ```APIDOC ## installSkillDir(sourcePath, destPath) ### Description Copies the skill directory to a target agent's skills folder. Removes any existing installation first, then copies recursively and verifies `SKILL.md` is present. Throws on failure. ### Method ```javascript installSkillDir(sourcePath, destPath) ``` ### Parameters #### Path Parameters - **sourcePath** (string) - Required - The path to the skill directory to be copied. - **destPath** (string) - Required - The destination path in the target agent's skills folder. ### Request Example ```javascript const { installSkillDir } = require('./scripts/install.js'); // internal use const path = require('path'); const os = require('os'); // Install to Claude Code user-global path const sourcePath = path.join(__dirname, 'skills', 'prompt-architect'); const destPath = path.join(os.homedir(), '.claude', 'skills', 'prompt-architect'); try { installSkillDir(sourcePath, destPath); console.log('Installed to', destPath); // → Installed to /Users/you/.claude/skills/prompt-architect } catch (err) { console.error('Installation failed:', err.message); // → Installation failed: SKILL.md not found after copy } ``` ``` -------------------------------- ### Minimal RTF Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rtf.md An example demonstrating the minimal RTF variation for a specific task, such as writing a Python email validation function. ```plaintext As a Python developer, write a function to validate email addresses in a code block with docstring. ``` -------------------------------- ### Install Prompt Architect for Codex CLI Source: https://github.com/ckelsoe/prompt-architect/blob/main/README.md Install the prompt-architect skill using the Codex CLI. This command is specific to the Codex CLI environment. ```bash $skill-installer install https://github.com/ckelsoe/prompt-architect/tree/main/skills/prompt-architect ``` -------------------------------- ### PS+ Example 1: Math/Calculation Expected Behavior Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/plan-and-solve.md Illustrates the expected step-by-step reasoning and calculation process from an LLM using the PS+ prompt for the SaaS MRR problem. ```text Variables: - Starting customers: 500 - Monthly price: $200/month - Monthly churn rate: 5% = 0.05 - Monthly new customers: 30 - Target period: 6 months Plan: 1. Calculate customers lost per month (churn) 2. Calculate net new customers per month (acquired - churned) 3. Calculate customer count at end of each month (months 1-6) 4. Calculate MRR for month 6 Execution: Month 0: 500 customers, MRR = $100,000 Month 1: 500 × (1 - 0.05) + 30 = 475 + 30 = 505 customers, MRR = $101,000 Month 2: 505 × 0.95 + 30 = 479.75 + 30 = 509.75 ≈ 510 customers, MRR = $102,000 ... [continues through month 6] Final answer: Month 6 MRR = $X ``` -------------------------------- ### installAdapter(adaptersPath, agent, destPath) Source: https://context7.com/ckelsoe/prompt-architect/llms.txt Appends or writes an adapter file, such as for Windsurf. It handles idempotent appends using marker comments (``) and is safe to call multiple times. ```APIDOC ## installAdapter(adaptersPath, agent, destPath) ### Description Appends or writes an adapter file (e.g., for Windsurf). Handles idempotent append using `` marker comments. Safe to call multiple times. ### Method ```javascript installAdapter(adaptersPath, agent, destPath) ``` ### Parameters #### Path Parameters - **adaptersPath** (string) - Required - The path to the adapter files. - **agent** (object) - Required - An object specifying adapter details, e.g., `{ adapterFile: 'for-windsurf.md', appendMode: true }`. - **destPath** (string) - Required - The destination path for the adapter file. ### Request Example ```javascript // Append the Windsurf adapter to .windsurfrules (idempotent) const adaptersPath = path.join(__dirname, 'adapters'); const windsurfAgent = { adapterFile: 'for-windsurf.md', appendMode: true, }; const destPath = path.join(process.cwd(), '.windsurfrules'); installAdapter(adaptersPath, windsurfAgent, destPath); // Result: .windsurfrules now contains the adapter content wrapped in: // // [adapter content] // // Running again replaces the block — no duplicates. ``` ``` -------------------------------- ### Configure Prompt Architect for Windsurf Source: https://context7.com/ckelsoe/prompt-architect/llms.txt For Windsurf, which lacks native Agent Skills support, copy the adapter file to your project. Append to an existing .windsurfrules file using the provided command, which is idempotent due to marker comments. ```bash # New project cp adapters/for-windsurf.md ./.windsurfrules # Append to existing .windsurfrules (idempotent — uses marker comments) cat adapters/for-windsurf.md >> ./.windsurfrules ``` -------------------------------- ### Effective Narrowing Examples Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/risen.md Provides clear and justified constraints for a process. These examples specify what to avoid and why, focusing on security, performance, and adherence to targets. ```plaintext NARROWING: - Do NOT trust user input without validation - Avoid loading entire dataset into memory (use pagination) - Do NOT use string concatenation for SQL queries - Stay within 200ms response time target - Avoid external API calls in this phase ``` -------------------------------- ### PS+ Prompt Structure Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/plan-and-solve.md Illustrates the structure of a prompt using the Plan-and-Solve framework for a complex scheduling problem. It emphasizes understanding the problem, extracting constraints, devising a plan, and then executing it step-by-step. ```plaintext PROBLEM: [Complex scheduling problem with constraints] Let's first understand the problem, extract all constraints and their relationships, and devise a complete plan for finding a valid schedule or proving none exists. Then, let's carry out the plan step by step. ``` -------------------------------- ### Poor Step Design Examples Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/risen.md Demonstrates vague and unhelpful steps. These examples highlight the need for specificity and actionable instructions in process design. ```plaintext 1. Get the data 2. Process it 3. Return results ``` -------------------------------- ### RACE Prompt Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/race.md Demonstrates how to structure a prompt using the RACE framework to document a module. It specifies the AI's role, the action to perform, the context of the project, and the expected output format. ```plaintext ROLE: You are a technical writer who writes developer documentation for open-source libraries. ACTION: Write documentation for the authentication module described below. CONTEXT: This is an open-source library used by developers integrating our platform. Readers are competent developers but unfamiliar with our specific auth flow. The docs will live on our developer portal alongside API reference docs. EXPECTATION: Include: overview paragraph, when-to-use section, installation snippet, quickstart code example, and a table of configuration options. Should be completable in one reading session (under 500 words). Use clear headings and real code examples. ``` -------------------------------- ### Before Prompt Example Source: https://github.com/ckelsoe/prompt-architect/blob/main/README.md This is an example of a vague and low-scoring prompt. It lacks clarity, specificity, context, completeness, and structure, resulting in a low overall score. ```plaintext "Write about machine learning" ``` -------------------------------- ### Example 1: Technical Explanation - SoT Prompt Structure Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/skeleton-of-thought.md This prompt structure is used for explaining a technical topic like microservices architecture using the SoT framework. It defines the requirements for both skeleton generation and expansion phases. ```prompt PHASE 1 — SKELETON: Create a skeleton outline for explaining microservices architecture to a senior engineer evaluating whether to migrate from a monolith. List 5-7 key points in format: N. [name] | [one-sentence description]. Do not expand. PHASE 2 — EXPAND: Expand each skeleton point into 2-3 paragraphs. Each section should be self-contained. Include specific trade-offs relevant to a migration decision. ``` -------------------------------- ### Ineffective Narrowing Examples Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/risen.md Shows examples of vague and unhelpful narrowing statements. These highlight the importance of specific, actionable constraints rather than general warnings. ```plaintext NARROWING: - Be careful - Don't make mistakes ``` -------------------------------- ### CTF Example: Template Creation Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/ctf.md An example of using the CTF framework to create a reusable template for weekly status reports, focusing on consistency and efficiency. ```plaintext CONTEXT: Our team of 6 engineers sends weekly status reports to a non-technical product manager. Reports are currently inconsistent and take too long to write. We want a reusable template that takes under 10 minutes to fill out. TASK: Create a weekly status report template that balances completeness with brevity. FORMAT: Markdown template with: - Section headers with fill-in placeholders - Brief instruction comment under each header - Total estimated fill-in time: under 10 minutes - Length when filled: 200-300 words ``` -------------------------------- ### Example 1: Technical Explanation - Expansion Output (Point 6) Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/skeleton-of-thought.md The expanded content for point 6 ('Migration Strategy') from the microservices architecture explanation, detailing the strangler fig pattern and its benefits. ```text Migration Strategy: The strangler fig pattern incrementally wraps the monolith by routing new traffic to microservices while the legacy system handles the rest. This allows parallel operation and rollback if needed, making it the lower-risk option for most teams. The big-bang rewrite is faster in theory but carries high risk of scope creep, integration failures, and a multi-month feature freeze... ``` -------------------------------- ### Install Prompt Architect for Windsurf Source: https://github.com/ckelsoe/prompt-architect/blob/main/adapters/README.md For Windsurf users, create a new file or append to an existing one using these commands. This ensures compatibility with Windsurf's rule format. ```bash # New file cp adapters/for-windsurf.md ./.windsurfrules # Or append to existing cat adapters/for-windsurf.md >> ./.windsurfrules ``` -------------------------------- ### Install Prompt Architect for Claude Code Source: https://github.com/ckelsoe/prompt-architect/blob/main/README.md Use this command to install the prompt-architect skill within the Claude Code environment. This method enables automatic updates. ```bash /install-skill https://github.com/ckelsoe/prompt-architect/tree/main/skills/prompt-architect ``` ```bash /plugin marketplace add ckelsoe/prompt-architect ``` ```bash /plugin install prompt-architect@prompt-architect-marketplace ``` -------------------------------- ### RTF Example: Code Generation Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/rtf.md An example of using the RTF framework to prompt for Python code generation, specifying role, task, and desired output format. ```plaintext ROLE: You are a Python developer who writes clean, efficient code. TASK: Write a function that sorts a list of dictionaries by a specified key, with support for ascending/descending order. FORMAT: Provide the solution as: 1. Function signature with type hints 2. Docstring with examples 3. Implementation 4. 2-3 usage examples ``` -------------------------------- ### Example Interaction for Prompt Improvement Source: https://github.com/ckelsoe/prompt-architect/blob/main/README.md Illustrates a typical user-skill interaction for prompt refinement, including analysis, questions, and the skill's response. ```bash User: "Help me improve this prompt: create a function to process user data" Skill: I'll analyze this prompt and help improve it. **Analysis**: - Clarity: 4/10 (basic goal stated) - Specificity: 2/10 (what kind of data? what processing?) - Context: 1/10 (no background) - Completeness: 2/10 (missing many details) - Structure: 3/10 (single sentence) - **Overall: 2.4/10** **Recommendation**: RISEN framework (multi-step process requiring methodology) **Questions**: 1. What type of user data? (names, emails, profiles, etc.) 2. What processing is needed? (validation, transformation, storage?) 3. What's the tech stack? (Python, JavaScript, database type?) 4. Any constraints? (performance, security requirements?) 5. Expected error handling approach? User: "It's a Python function processing CSV user registrations. Need to validate emails, normalize names, and save to PostgreSQL. Should handle invalid data gracefully." Skill: Perfect! Let me apply the RISEN framework... [Improved prompt generated with clear role, instructions, steps, end goal, and constraints] ``` -------------------------------- ### TIDD-EC + Style Guide Prompt Structure Source: https://github.com/ckelsoe/prompt-architect/blob/main/skills/prompt-architect/references/frameworks/tidd-ec.md Integrates a style guide into the TIDD-EC framework to ensure content adheres to specific brand standards, tone, and terminology. ```plaintext [Standard TIDD-EC structure] STYLE GUIDE: - Tone: [specific tone] - Voice: [first person / third person / etc.] - Terminology: [approved terms list] ```