Check prompt

From wasabeef/claude-code-cookbook · View interactive version

Check prompt is an AI agent skill from the GitHub repository wasabeef/claude-code-cookbook. Evaluate and improve AI prompt quality. Trigger with "check this prompt", "evaluate prompt quality", "improve this prompt".

How to use this skill

Skill file

Evaluate and improve AI prompt quality

A comprehensive collection of best practices for evaluating and improving the quality of prompts for AI Agents. It systematizes knowledge gained from actual prompt improvement processes, covering all important aspects such as ambiguity elimination, information integration, enforcement enhancement, tracking systems, and continuous improvement.

Usage

# Check the quality of a prompt file
cat your-prompt.md
/check-prompt
"Check the quality of this prompt and suggest improvements"

Options

Basic Examples

# Evaluate overall prompt quality
cat devin/playbooks/code-review.md
/check-prompt
"Evaluate this prompt across 6 categories and suggest improvements"

# Deep analysis mode
/check-prompt --deep
"Focus on checking ambiguity, information dispersion, and lack of enforcement to suggest fundamental improvements"

# Check specific category
/check-prompt --category structure
"Check this prompt from the perspective of structure and clarity"

# Detect and fix ambiguous expressions
/check-prompt --fix
"Detect ambiguous expressions and suggest corrections for clarity"

Core Design Principles

Principle 1: Completely Eliminate Room for Interpretation

Principle 2: Strategic Integration of Information

Principle 3: Building Gradual Enforcement

Principle 4: Ensuring Traceability

Principle 5: Feedback-Driven Improvement


📋 Comprehensive Check Items

1. 📐 Structure and Clarity (Weight: 25 points)

1.1 Priority Indication of Instructions (8 points)

1.2 Complete Elimination of Ambiguous Expressions (9 points)

1.3 Strategic Integration of Information (8 points)

2. 🎯 Executability (Weight: 20 points)

2.1 Completeness of Specific Procedures (7 points)

2.2 Ensuring Verifiability (7 points)

2.3 Automation Adaptability (6 points)

3. 🚫 Clarification of Prohibited Items (Weight: 15 points)

3.1 Systematization of Absolute Prohibitions (8 points)

3.2 Strict Limitation of Exception Conditions (7 points)

4. 📊 Quality Assurance Mechanisms (Weight: 20 points)

4.1 Completeness of Tracking System (8 points)

4.2 Enforcement of Template Compliance (7 points)

4.3 comprehensiveness of Error Handling (5 points)

5. 🎭 Clarification of Roles and Responsibilities (Weight: 10 points)

5.1 AI Agent's Authority Scope (5 points)

5.2 Unification of Classification System (5 points)

6. 🔄 Continuous Improvement (Weight: 10 points)

6.1 Automation of Feedback Collection (5 points)

6.2 Implementing Learning Functions (5 points)


🚨 Fatal Problem Patterns (Immediate Correction Required)

❌ Level 1: Fatal Ambiguity (Execution Stop Level)

❌ Level 2: Structural Defects (Quality Important Level)

❌ Level 3: Quality Degradation (Recommended Improvement Level)


🎯 Proven Improvement Methods

✅ Gradual Enhancement Approach

  1. Current situation analysis: Classification, prioritization, and impact assessment of problems
  2. Fatal problem priority: Top priority on complete resolution of Level 1 problems
  3. Gradual implementation: Implement in verifiable units without making all changes at once
  4. Effect measurement: Quantitative comparison before and after improvement
  5. Continuous monitoring: Confirmation of sustainability of improvement effects

✅ Practical Methods for Ambiguity Elimination

# ❌ Before Improvement (Ambiguous)

"Comments should be, in principle, written as inline comments at the corresponding change points on GitHub"

# ✅ After Improvement (Clear)

"Comments must be written as inline comments at the corresponding change points on GitHub. Exceptions are only the 3 conditions defined in section 3.3"

✅ Practical Methods for Information Integration

# ❌ Before Improvement (Dispersed)

Section 2.1: "Use mandatory 6 sections"
Section 3.5: "📊 Comprehensive evaluation, 📋 Comments..."
Section 4.2: "Prohibition of section deletion"

# ✅ After Improvement (Integrated)

Execution Checklist:
□ 10. Post summary comment (using mandatory 6 sections)
🔴 Mandatory 6 sections: 1) 📊 Comprehensive evaluation 2) 📋 Classification of comments 3) ⚠️ Main concerns 4) ✅ Evaluable points 5) 🎯 Conclusion 6) 🤖 Self-evaluation of AI review quality
❌ Absolutely prohibited: Section deletion, addition, name change

✅ Implementation Patterns for Tracking Systems

# Strict tracking of execution results
POSTED_COMMENTS=0
FAILED_COMMENTS=0
TOTAL_COMMENTS=0

# Record results of each operation
if [ $? -eq 0 ]; then
    echo "✅ Success: $OPERATION" >> /tmp/execution_log.txt
    POSTED_COMMENTS=$((POSTED_COMMENTS + 1))
else
    echo "❌ Failure: $OPERATION" >> /tmp/execution_log.txt
    FAILED_COMMENTS=$((FAILED_COMMENTS + 1))
fi

# Prevent false reporting
if [ $POSTED_COMMENTS -ne $REPORTED_COMMENTS ]; then
    echo "🚨 Warning: Mismatch between reported and actual posted comments"
    exit 1
fi

📈 Quality Score Calculation (Improved Version)

Comprehensive Score Calculation

Basic score = Σ(category score × weight) / 100

Fatal problem penalties:
- Level 1 problem: -20 points per case
- Level 2 problem: -10 points per case
- Level 3 problem: -5 points per case

Bonus elements:
- Automation support: +5 points
- Learning function implementation: +5 points
- Proven improvement cases: +5 points

Final score = Basic score + Bonus - Penalties

Quality Level Assessment

95-100 points: World's highest standard (Recommended as industry standard)
90-94 points: Excellent (Production ready)
80-89 points: Good (Ready for operation with minor improvements)
70-79 points: Average (Needs improvement)
60-69 points: Needs improvement (Requires significant correction)
50-59 points: Needs major correction (Requires fundamental review)
49 points or below: Prohibited from use (Requires complete redesign)

🔧 Practical Improvement Process

Phase 1: Diagnosis/Analysis (1-2 days)

  1. Understanding overall structure: Visualization of section composition, information flow, and dependencies
  2. Ambiguity detection: Extraction of all expressions with room for interpretation
  3. Information dispersion analysis: Mapping of scattered patterns of related information
  4. Enforcement evaluation: Evaluation of recommended/mandatory classification and effectiveness
  5. Traceability confirmation: Evaluation of execution result recording and verification functions

Phase 2: Prioritization/Planning (Half a day)

  1. Fatality classification: Problem classification into Levels 1-3 and impact assessment
  2. Improvement order determination: Optimal order considering interdependencies
  3. Resource allocation: Optimization of balance between improvement effects and costs
  4. Risk assessment: Prediction of side effects and compatibility issues during improvement

Phase 3: Gradual Implementation (2-5 days)

  1. Level 1 problem resolution: Complete elimination of fatal ambiguities
  2. Information integration implementation: Strategic aggregation of dispersed information
  3. Enforcement enhancement: Gradual upgrade from recommended to mandatory
  4. Tracking system implementation: Automatic recording and verification functions for execution results
  5. Template enhancement: Clarification of mandatory elements and enforcement of compliance

Phase 4: Verification/Adjustment (1-2 days)

  1. Function testing: Operation confirmation of all changes
  2. Integration testing: Confirmation of system-wide consistency
  3. Performance testing: Confirmation of execution efficiency and response
  4. Usability testing: Verification in actual usage scenarios

Phase 5: Operation/Monitoring (Continuous)

  1. Effect measurement: Quantitative comparison before and after improvement
  2. Continuous monitoring: Early detection of quality degradation
  3. Feedback collection: Extraction of problems in actual operation
  4. Continuous optimization: Continuous improvement cycle

📊 Actual Improvement Cases (Detailed Version)

Case Study: Quality Improvement of Large-Scale Prompts

Situation Before Improvement

Quality score: 70/100 points
- Ambiguous expressions: 15 detected
- Information dispersion: Important information scattered in 6 locations
- Lack of enforcement: 80% of expressions at recommended level
- Tracking function: No execution result recording
- Error handling: Unclear countermeasures for failures

Implemented Improvements

# 1. Ambiguity elimination (2 days)
- "In principle" → "Exceptions are only the 3 conditions in section 3.3"
- "Recommended" → "Mandatory" (for importance level 2 and above)
- "As appropriate" → Explicit indication of specific judgment criteria

# 2. Information integration (1 day)
- Dispersed mandatory 6-section information → Integrated into execution checklist
- Related prohibited items → Aggregated into one section
- Eliminated circular references → Linear information flow

# 3. Tracking system implementation (1 day)
- Automatic log recording of execution results
- Verification function to prevent false reporting
- Real-time statistics display

# 4. Error handling enhancement (Half a day)
- Complete cataloging of expected error patterns
- Documentation of step-by-step handling processes
- Implementation of automatic recovery functions

Results After Improvement

Quality score: 90/100 points (+20 points improvement)
- Ambiguous expressions: 0 (completely eliminated)
- Information integration: Important information aggregated into 3 locations
- Enforcement: 95% of expressions at mandatory level
- Tracking function: Fully automated
- Error handling: 90% of problems solved automatically

Actual improvement effects:
- Assessment errors: 85% reduction
- Execution time: 40% reduction
- Error occurrence rate: 70% reduction
- User satisfaction: 95% improvement

Lessons/Best Practices

Success Factors

  1. Gradual approach: Implement in verifiable units without making all changes at once
  2. Data-driven: Improve based on measured data rather than subjective judgment
  3. Continuous monitoring: Regularly confirm the sustainability of improvement effects
  4. Feedback-oriented: Actively collect opinions from actual users

Failure Avoidance Measures

  1. Excessive perfectionism: Start operation once reaching 90 points, aim for 100 points through continuous improvement
  2. Dangers of batch changes: Always implement large-scale changes gradually
  3. Backward compatibility: Minimize impact on existing workflows
  4. Insufficient documentation: Record and share all changes in detail

Collaboration with Claude

# Quality check combined with prompt file
cat your-prompt.md
/check-prompt
"Evaluate the quality of this prompt and suggest improvements"

# Comparison of multiple prompt files
cat prompt-v1.md && echo "---" && cat prompt-v2.md
/check-prompt
"Compare the two versions and analyze improved points and remaining issues"

# Analysis combined with actual error logs
cat execution-errors.log
/check-prompt --deep
"Identify potential prompt issues that may have caused this error"

Notes


_This checklist is a complete version of knowledge proven in actual prompt improvement projects and continues to evolve._

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.