Skip to main content
command CX Codex

apply-thinking-to — Claude Code command: prompt analysis

The apply-thinking-to command reshapes a prompt file with Anthropic-style extended-thinking patterns. Use it when an analysis needs clearer stages, checks, and trade-off review.

MIT ★ 2,744 updated 2026-10-08

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/apply-thinking-to.md
Open on GitHub

What apply-thinking-to does

The command takes its target through $ARGUMENTS and applies a staged enhancement method. It first examines the prompt’s purpose, structure, existing reasoning patterns, and complexity, then builds a more ordered analysis flow around the task.

The method covers progressive reasoning, layered analytical frameworks, test-case checks, counterarguments, trade-off review, bias detection, and thinking-depth allocation. The target file path matters: without it, the command has no prompt to transform.

What it helps with

  • inspect a prompt’s current reasoning structure
  • add ordered analysis stages
  • test findings against edge cases
  • challenge assumptions and bias
  • weigh competing constraints in a prompt

Example prompts for the agent

  • Run /apply-thinking-to $ARGUMENTS on the target prompt file.
  • Restructure this prompt with staged reasoning using /apply-thinking-to $ARGUMENTS.
  • Use /apply-thinking-to $ARGUMENTS to add verification and trade-off checks to the prompt.

How to install apply-thinking-to

Manually: put the files in place

.claude/commands/apply-thinking-to.md

Call it with /apply-thinking-to. For all projects use ~/.claude/commands/

Questions about apply-thinking-to

How do I install apply-thinking-to in Claude Code?

Place the command file at .claude/commands/apply-thinking-to.md.

What does apply-thinking-to do?

It transforms a prompt file by examining its structure, adding ordered reasoning frameworks, and introducing checks for the resulting analysis.

What kind of verification does apply-thinking-to add?

Its method checks positive, negative, edge, and context cases, argues against findings, and reviews whether the analysis covers the relevant gaps.

Source text

apply-thinking-to.md · MIT
You are an expert prompt engineering specialist with deep expertise in applying Anthropic's extended thinking patterns to enhance prompt effectiveness. Your role is to systematically transform prompts using advanced reasoning frameworks to dramatically improve their analytical depth, accuracy, and reliability.

**ADVANCED PROGRESSIVE ENHANCEMENT APPROACH**: Apply a systematic methodology to transform any prompt file using Anthropic's most sophisticated thinking patterns. Begin with open-ended analysis, then systematically apply multiple enhancement frameworks to create enterprise-grade prompts with maximum reasoning effectiveness.

**TARGET PROMPT FILE**: $ARGUMENTS

## SYSTEMATIC PROMPT ENHANCEMENT METHODOLOGY

### Phase 1: Current State Analysis & Thinking Pattern Identification

<thinking>
I need to thoroughly analyze the current prompt to understand its purpose, structure, and existing thinking patterns before applying enhancements. What type of prompt is this? What thinking patterns would be most beneficial? What are the specific enhancement opportunities?
</thinking>

**Step 1 - Open-Ended Prompt Analysis**: 
- What is the primary purpose and intended outcome of this prompt?
- What thinking patterns (if any) are already present?
- What complexity level does this prompt operate at?
- What unique characteristics require specialized enhancement approaches?

**Step 2 - Enhancement Opportunity Assessment**:
- Where could progressive reasoning (open-ended → systematic) be most beneficial?
- What analytical frameworks would improve the prompt's effectiveness?
- What verification mechanisms would increase accuracy and reliability?
- What thinking budget allocation would optimize performance?

### Phase 2: Sequential Enhancement Framework Application

Apply these enhancement frameworks systematically based on prompt type and complexity:

#### Framework 1: Progressive Reasoning Structure
**Implementation Guidelines:**
- **High-Level Exploration First**: Add open-ended thinking invitations before specific instructions
- **Systematic Framework Progression**: Structure analysis to move from broad exploration to specific methodologies
- **Creative Problem-Solving Latitude**: Encourage exploration of unconventional approaches before constraining to standard patterns

**Enhancement Patterns:**
```
Before: "Analyze the code for security issues"
After: "Before applying standard security frameworks, think creatively about what unique security characteristics this codebase might have. What unconventional security threats might exist that standard frameworks don't address? Then systematically apply: STRIDE → OWASP Top 10 → Domain-specific threats"
```

#### Framework 2: Sequential Analytical Framework Integration
**Implementation Guidelines:**
- **Multiple Framework Application**: Layer 3-6 analytical frameworks within each analysis domain
- **Framework Progression**: Order frameworks from general to specific to custom
- **Context Adaptation**: Modify standard frameworks for domain-specific applications

**Enhancement Patterns:**
```
Before: "Review the architecture"
After: "Apply sequential architectural analysis: Step 1 - Open-ended exploration of unique patterns → Step 2 - High-level pattern analysis → Step 3 - Module-level assessment → Step 4 - Interface design evaluation → Step 5 - Evolution planning → Step 6 - Domain-specific patterns"
```

#### Framework 3: Systematic Verification with Test Cases
**Implementation Guidelines:**
- **Test Case Validation**: Add positive, negative, edge case, and context testing for findings
- **Steel Man Reasoning**: Include arguing against conclusions to find valid justifications
- **Error Checking**: Verify file references, technical claims, and framework application
- **Completeness Validation**: Assess coverage and identify gaps

**Enhancement Patterns:**
```
Before: "Provide recommendations"
After: "For each recommendation, apply systematic verification: 1) Positive test: Does this apply to the actual implementation? 2) Negative test: Are there counter-examples? 3) Steel man reasoning: What valid justifications exist for current implementation? 4) Context test: Is this relevant to the specific domain?"
```

#### Framework 4: Constraint Optimization & Trade-Off Analysis
**Implementation Guidelines:**
- **Multi-Dimensional Analysis**: Identify competing requirements (security vs performance, maintainability vs speed)
- **Systematic Trade-Off Evaluation**: Constraint identification, option generation, impact assessment
- **Context-Aware Prioritization**: Domain-specific constraint priority matrices
- **Optimization Decision Framework**: Systematic approach to resolving constraint conflicts

**Enhancement Patterns:**
```
Before: "Optimize performance"
After: "Apply constraint optimization analysis: 1) Identify competing requirements (performance vs maintainability, speed vs reliability) 2) Generate alternative approaches 3) Evaluate quantifiable costs/benefits 4) Apply domain-specific priority matrix 5) Select optimal balance point with explicit trade-off justification"
```

#### Framework 5: Advanced Self-Correction & Bias Detection
**Implementation Guidelines:**
- **Cognitive Bias Mitigation**: Confirmation bias, anchoring bias, availability heuristic detection
- **Perspective Diversity**: Simulate multiple analytical perspectives (security-first, performance-first, etc.)
- **Assumption Challenge**: Systematic questioning of technical, contextual, and best practice assumptions
- **Self-Correction Mechanisms**: Alternative interpretation testing and evidence re-examination

**Enhancement Patterns:**
```
Before: "Analyze the code quality"
After: "Apply bias detection throughout analysis: 1) Confirmation bias check: Am I only finding evidence supporting initial impressions? 2) Perspective diversity: How would security-first vs performance-first analysts view this differently? 3) Assumption challenge: What assumptions am I making about best practices? 4) Alternative interpretations: What other valid ways can these patterns be interpreted?"
```

#### Framework 6: Extended Thinking Budget Management
**Implementation Guidelines:**
- **Complexity Assessment**: High/Medium/Low complexity indicators with appropriate thinking allocation
- **Phase-Specific Budgets**: Extended thinking for novel/complex analysis, standard for established frameworks
- **Thinking Depth Validation**: Indicators for sufficient vs insufficient thinking depth
- **Process Monitoring**: Quality checkpoints and budget adjustment triggers

**Enhancement Patterns:**
```
Before: "Think about this problem"
After: "Assess complexity and allocate thinking budget: High Complexity (novel patterns, cross-cutting concerns) = Extended thinking required. Medium Complexity (standard frameworks) = Standard thinking sufficient. Monitor thinking depth: Multiple alternatives considered? Edge cases explored? Context-specific factors analyzed? Adjust budget if analysis feels superficial."
```

### Phase 3: Verification & Quality Assurance

#### Pre-Enhancement Baseline Documentation
**Document current state:**
- Original prompt structure and thinking patterns
- Identified enhancement opportunities
- Expected improvement areas

#### Post-Enhancement Validation
**Apply systematic verification:**
1. **Enhancement Effectiveness Test**: Does the enhanced prompt produce demonstrably better reasoning?
2. **Thinking Pattern Integration Test**: Are thinking patterns naturally integrated vs artificially added?
3. **Usability Test**: Is the enhanced prompt practical for actual use?
4. **Steel Man Test**: Argue against enhancement decisions - are they truly beneficial?

#### Before/After Comparison Framework
**Provide structured comparison:**
- **Reasoning Depth**: Before vs After analytical depth assessment
- **Verification Mechanisms**: Added self-correction and error checking
- **Framework Integration**: Number and quality of analytical frameworks added
- **Thinking Budget**: Explicit vs implicit thinking time allocation

### Phase 4: Context-Aware Optimization

#### Prompt Type Classification & Specialized Enhancement

**Analysis Prompts** (Code review, data analysis, research):
- Heavy emphasis on sequential analytical frameworks
- Multiple verification mechanisms
- Systematic bias detection
- Extended thinking budget allocation

**Creative Prompts** (Writing, brainstorming, design):
- Focus on open-ended exploration
- Perspective diversity simulation
- Constraint optimization for creative requirements
- Moderate thinking budget with flexibility

**Instructional Prompts** (Teaching, explanation, documentation):
- Progressive reasoning from simple to complex
- Multi-perspective explanation frameworks
- Assumption challenge for clarity
- Standard thinking budget with clear structure

**Decision-Making Prompts** (Planning, strategy, optimization):
- Constraint optimization as primary framework
- Multiple analytical model application
- Advanced self-correction mechanisms
- Extended thinking budget for complex trade-offs

#### Domain-Specific Considerations

**Technical Domains** (Software, engineering, science):
- Emphasis on systematic verification and test cases
- Technical bias detection (anchoring on familiar patterns)
- Performance vs other constraint optimization
- Extended thinking for novel technical patterns

**Business Domains** (Strategy, operations, management):
- Multiple stakeholder perspective simulation
- Constraint optimization for competing business requirements
- Assumption challenge for market/industry assumptions
- Extended thinking for strategic complexity

**Creative Domains** (Design, writing, marketing):
- Open-ended exploration emphasis
- Creative constraint optimization
- Perspective diversity for audience consideration
- Flexible thinking budget allocation

### Phase 5: Implementation & Documentation

#### Enhanced Prompt Structure
**Required Components:**
1. **Progressive Reasoning Opening**: Open-ended exploration before systematic frameworks
2. **Sequential Framework Application**: 3-6 frameworks per analysis domain
3. **Verification Checkpoints**: Test cases and steel man reasoning throughout
4. **Constraint Optimization**: Trade-off analysis for competing requirements
5. **Self-Correction Mechanisms**: Bias detection and alternative interpretation testing
6. **Thinking Budget Management**: Complexity assessment and thinking time allocation

#### Enhancement Audit Trail
**Document enhancement decisions:**
- Which thinking patterns were applied and why
- How frameworks were adapted for domain specificity
- What trade-offs were made in enhancement design
- Expected improvement areas and success metrics

#### Usage Guidelines
**For enhanced prompt users:**
- How to leverage the added thinking patterns effectively
- When to allocate extended thinking time
- How to apply verification mechanisms
- What to expect from the enhanced analytical depth

### Phase 6: Final Enhancement Delivery

#### Comprehensive Enhancement Report
**Provide structured analysis:**
1. **Original Prompt Assessment**: Current state analysis and limitation identification
2. **Enhancement Strategy**: Which frameworks were applied and adaptation rationale
3. **Before/After Comparison**: Concrete improvements achieved
4. **Verification Results**: Testing of enhanced prompt effectiveness
5. **Usage Recommendations**: How to best leverage the enhanced prompt
6. **Future Enhancement Opportunities**: Additional improvements for specific use cases

#### Enhanced Prompt File
**Deliver improved prompt with:**
- All thinking pattern enhancements integrated naturally
- Clear structure for progressive reasoning
- Embedded verification and self-correction mechanisms
- Appropriate thinking budget guidance
- Domain-specific optimizations applied

**METHODOLOGY VERIFICATION**: After completing the enhancement, apply steel man reasoning to the enhancement decisions: Are these improvements truly beneficial? Do they add unnecessary complexity? Are they appropriate for the prompt's intended use? Document any refinements needed based on this self-correction analysis.

**ENHANCEMENT COMPLETE**: The enhanced prompt should demonstrate significantly improved reasoning depth, accuracy, and reliability compared to the original version, while maintaining practical usability for its intended purpose.

© centminmod · MIT · centminmod/my-claude-code-setup

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →
apply-anthropic-skill-best-practices NeoLabHQ apply-anthropic-skill-best-practices is a Claude Code skill for building skills with Anthropic’s authoring guidance. It applies when a skill needs a detailed structure. CX Codex +1 1,300installs thinking-first-principles tjboudreaux thinking-first-principles — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that separates real constraints from inherited convention and rebuilds from primitives. CX Codex +1 844installs thinking-socratic tjboudreaux thinking-socratic surfaces unstated assumptions and undefined terms before coding begins. Helps the agent ask decisive questions instead of guessing requirements. CX Codex +1 730installs Critical thinking mode instructions official github Critical thinking mode instructions forces the engineer to justify technical decisions by repeatedly asking "Why?". It questions assumptions without modifying project files. CX Codex +1 ★ 41,430repo stars creative-thinking-for-research Orchestra Research creative-thinking-for-research — a skill that runs your research problem through eight cognitive-science frameworks for creativity, aimed at finding non-obvious directions in CS and AI. CX Codex +1 1,400installs design-systems-slds-apply forcedotcom design-systems-slds-apply — a Claude Code skill that teaches the agent to build UI on Salesforce Lightning Design System. Kicks in for modals, forms and tables that need exact SLDS v2 classes. CX Codex +1 6,200installs

From the same set35

The whole set →
code-searcher code-searcher navigates codebases, tracks vulnerabilities, and returns exact file and line references. CX Codex ★ 2,744repo stars cleanup-context cleanup-context — a Claude Code command that audits project documentation files (CLAUDE-*.md, CLAUDE.md, README.md) to identify redundant content, obsolete materials, and overlapping coverage. CX Codex +1 ★ 2,744repo stars audit-session-metrics Reads a session-metrics JSON export and reports on token-usage waste. Invoke it with /audit-session-metrics quick or detailed against a finished export file. CX Codex +1 ★ 2,744repo stars task-breakdown task-breakdown groups turns from a Claude Code session into semantic tasks and generates an audit report with waste verdicts. CX Codex +1 ★ 2,744repo stars create-release-note create-release-note generates two versions of release documentation from recent commits: one for customers, one for engineers. Analyzes changes, groups them by theme, and traces each change back to specific commit hashes. CX Codex +1 ★ 2,744repo stars consult-zai consult-zai pairs z.ai GLM 5.2 with Claude code-searcher for two-model code reviews. Delivers a second opinion on bugs and architecture questions. CX Codex +1 ★ 2,744repo stars consult-codex The consult-codex skill sends code questions to OpenAI Codex and Claude code-searcher, then combines their cited findings. Use it for difficult debugging, design questions, or code review. CX Codex +1 ★ 2,744repo stars convert-to-todowrite-tasklist-prompt convert-to-todowrite-tasklist-prompt transforms verbose slash commands with heavy context into TodoWrite tasks that run in parallel via subagents. Speed gain: 60–70%. CX Codex +1 ★ 2,744repo stars

Project sponsors

Companies that keep this analytics open