Agent skill · AI & Agents

when-optimizing-prompts-use-prompt-architect

Comprehensive framework for analyzing, creating, and refining prompts for AI systems using evidence-based techniques

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill when-optimizing-prompts-use-prompt-architect-dnyoussef-ai-chrome --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 21 KB
Bundled scripts: none
Version: 1.0.0
Requires: - claude-flow@alpha
Path: skills/ai-llm/when-optimizing-prompts-use-prompt-architect-dnyoussef-ai-chrome/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Analyzes an existing prompt to identify weaknesses, anti-patterns, and missing components. Uses a structured template to reorganize prompt elements into system context, role, task description, constraints, format, and quality criteria. Builds an optimized prompt from this structure and adds progressive disclosure for complex prompts. Applies evidence-based techniques (CoT, self-consistency, ReAct, few-shot examples, and constraint framing) to enrich prompt content. Validates effectiveness via defined test cases and A/B testing, returning metrics and improvement reports.

How it works

  • Phase 1: Analysis by Researcher runs structural checks on the prompt to gather components, metrics, and anti-patterns. It stores results under memory keys such as 'prompt-architect/analysis', 'prompt-architect/anti-patterns', and 'prompt-architect/missing'. It also identifies missing components and lists recommendations.
  • Phase 2: Structure Optimization by Coder (Prompt Specialist) applies a template to create an optimized structure including systemContext, roleDefinition, taskDescription, constraints, formatSpecification, and qualityCriteria. It stores this as 'prompt-architect/structure'. It then builds an optimized prompt text and adds a progressive disclosure layer with collapsible sections. A script template demonstrates how to automate this flow and stores results under 'prompt-architect/optimized'.
  • Phase 3: Apply Evidence-Based Techniques by Researcher + Coder adds Chain-of-Thought, Self-Consistency, ReAct patterns, Few-Shot Examples, and Constraint Framing to the prompt content. It also provides an example memory hook to store applied techniques under 'prompt-architect/techniques-applied'.
  • Phase 4: Validate Effectiveness by Researcher defines test cases (typical, edge-case, stress), runs A/B tests comparing original vs optimized prompts, and calculates metrics including average score, success rate, and consistency. Results are stored under 'prompt-architect/test-cases' and 'prompt-architect/ab-test-results' and 'prompt-architect/metrics'.
  • Phase 5: Refine Iteratively by Coder analyzes failures from abTest results and outlines next steps (not fully shown in the excerpt).
From the SKILL.md

# Prompt Architect - Evidence-Based Prompt Engineering ## Overview Comprehensive framework for analyzing, creating, and refining prompts for AI systems (Claude, GPT, etc.). Applies structural optimization, self-consistency patterns, and anti-pattern detection to transform prompts into highly effective versions. ## When to Use This Skill - Creating new prompts for AI systems - Existing prompts produce poor results - Inconsistent AI outputs - Need to improve prompt clarity - Applying evidence-based prompt engineering - Optimizing agent instructions - Building prompt libraries ## Theoretical Foundation ### Evidence-Based Techniques 1. **Chain-of-Thought (CoT)**: Explicit reasoning steps 2. **Self-Consistency**: Multiple reasoning paths 3. **ReAct**: Reasoning + Acting pattern 4. **Program-of-Thought**: Structured logic 5. **Plan-and-Solve**: Decomposition strategy 6. **Role-Playing**: Persona assignment 7. **Few-Shot Learning**: Example-based instruction ### Prompt Structure Principles ``` [System Context] → [Role Definition] → [Task Description] → [Constraints] → [Format Specification] → [Examples] → [Quality Criteria] ``` ## Phase 1: Analyze Current Prompt ### Objective Identify wea

What's inside
Steps it walks through
  1. Overview
  2. When to Use This Skill
  3. Theoretical Foundation
  4. Evidence-Based Techniques
  5. Prompt Structure Principles
  6. Phase 1: Analyze Current Prompt
  7. Objective
  8. Agent: Researcher
  9. Validation Criteria
  10. Hooks Integration
  11. Phase 2: Structure Optimization
  12. Agent: Coder (Prompt Specialist)
  13. Script Template
  14. Phase 3: Apply Evidence-Based Techniques
Ships with 1 file
  • metadata.json
Commands it runs
npx claude-flow@alpha hooks pre-task \
npx claude-flow@alpha hooks post-task \
optimize-structure.sh
Analyze structure
Optimize
echo "$OPTIMIZED" > "$OUTPUT_PROMPT"
npx claude-flow@alpha hooks post-edit \
validate-prompt.sh
Run A/B tests
Calculate improvement
More from claude-skill-registry
All skills →
About this skill
What does the when-optimizing-prompts-use-prompt-architect skill do?

Comprehensive framework for analyzing, creating, and refining prompts for AI systems using evidence-based techniques

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill when-optimizing-prompts-use-prompt-architect-dnyoussef-ai-chrome --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going