Command Palette

Search for a command to run...

Назад к скиллам
скилл № 98687

when-optimizing-prompts-use-prompt-architect

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

БесплатноБез исполняемых скриптов
majiayu000от majiayu000★ 31 звезда на GitHub

Установить when-optimizing-prompts-use-prompt-architect в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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 weaknesses and improvement opportunities

Agent: Researcher

Step 1.1: Structural Analysis

const promptAnalysis = {
  components: {
    hasSystemContext: checkForContext(prompt),
    hasRoleDefinition: checkForRole(prompt),
    hasTaskDescription: checkForTask(prompt),
    hasConstraints: checkForConstraints(prompt),
    hasFormatSpec: checkForFormat(prompt),
    hasExamples: checkForExamples(prompt),
    hasQualityCriteria: checkForCriteria(prompt)
  },
  metrics: {
    length: prompt.length,
    clarity: calculateClarity(prompt),
    specificity: calculateSpecificity(prompt),
    completeness: calculateCompleteness(prompt)
  },
  antiPatterns: detectAntiPatterns(prompt)
};

await memory.store('prompt-architect/analysis', promptAnalysis);

Step 1.2: Detect Anti-Patterns

const antiPatterns = [
  {
    name: 'Vague Instructions',
    pattern: /please|try to|maybe|possibly/gi,
    severity: 'HIGH',
    fix: 'Use imperative commands: "Analyze...", "Generate...", "Create..."'
  },
  {
    name: 'Missing Context',
    pattern: absence of background info,
    severity: 'HIGH',
    fix: 'Add system context and domain information'
  },
  {
    name: 'No Output Format',
    pattern: absence of format specification,
    severity: 'MEDIUM',
    fix: 'Specify exact output format (JSON, markdown, etc.)'
  },
  {
    name: 'Conflicting Instructions',
    pattern: detectContradictions(prompt),
    severity: 'HIGH',
    fix: 'Resolve contradictions, prioritize requirements'
  },
  {
    name: 'Implicit Assumptions',
    pattern: detectImplicitAssumptions(prompt),
    severity: 'MEDIUM',
    fix: 'Make all assumptions explicit'
  }
];

const foundAntiPatterns = antiPatterns.filter(ap =>
  ap.pattern.test ? ap.pattern.test(prompt) : ap.pattern
);

await memory.store('prompt-architect/anti-patterns', foundAntiPatterns);

Step 1.3: Identify Missing Components

const missingComponents = [];

if (!promptAnalysis.components.hasSystemContext) {
  missingComponents.push({
    component: 'System Context',
    importance: 'HIGH',
    recommendation: 'Add background info, domain knowledge, constraints'
  });
}

if (!promptAnalysis.components.hasExamples) {
  missingComponents.push({
    component: 'Examples',
    importance: 'MEDIUM',
    recommendation: 'Add 2-3 examples showing desired behavior'
  });
}

// ... check other components

await memory.store('prompt-architect/missing', missingComponents);

Validation Criteria

  • All 7 components checked
  • Anti-patterns identified
  • Missing components listed
  • Severity assigned to issues

Hooks Integration

npx claude-flow@alpha hooks pre-task \
  --description "Analyze prompt structure and quality" \
  --complexity "medium"

npx claude-flow@alpha hooks post-task \
  --task-id "prompt-analysis" \
  --output "analysis-report.json"

Phase 2: Structure Optimization

Objective

Reorganize prompt for logical flow and clarity

Agent: Coder (Prompt Specialist)

Step 2.1: Apply Template Structure

const optimizedStructure = {
  systemContext: {
    domain: extractDomain(prompt),
    background: generateContextualBackground(),
    constraints: extractOrInferConstraints(prompt)
  },
  roleDefinition: {
    persona: definePersona(task),
    expertise: listRequiredExpertise(),
    perspective: defineWorkingPerspective()
  },
  taskDescription: {
    primary: extractPrimaryTask(prompt),
    secondary: extractSecondaryTasks(prompt),
    scope: defineScope(),
    outOfScope: defineWhatNotToDo()
  },
  constraints: {
    required: extractRequirements(prompt),
    forbidden: extractProhibitions(prompt),
    optional: extractPreferences(prompt)
  },
  formatSpecification: {
    outputFormat: sp
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • metadata.json

FAQ

Что делает скилл when-optimizing-prompts-use-prompt-architect?

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

Как установить скилл when-optimizing-prompts-use-prompt-architect?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл when-optimizing-prompts-use-prompt-architect запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить when-optimizing-prompts-use-prompt-architect с