reasoning-trace-optimizer
Debug and optimize AI agents by analyzing reasoning traces. Activates on 'debug agent', 'optimize prompt', 'analyze reasoning', 'why did the agent fail', 'improve agent performance', or when diagnosing agent failures and context degradation.
npx skills add majiayu000/claude-skill-registry --skill interleaved-thinking-muratcankoylan-agent-skills-for-con-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Reasoning Trace Optimizer Debug and optimize AI agents by analyzing their reasoning traces. This skill uses MiniMax M2.1's interleaved thinking to provide deep insight into agent decision-making and generate concrete improvements. ## When to Activate - User asks to "debug agent", "analyze reasoning", or "optimize prompt" - Agent task fails and user wants to understand why - User mentions "context degradation", "tool confusion", or "instruction drift" - Request to improve agent performance or reduce errors - User wants to generate shareable learnings from debugging sessions - After repeated failures on similar tasks ## Core Concepts ### Interleaved Thinking Unlike standard reasoning models that think once at the start, interleaved thinking allows reasoning BETWEEN each tool interaction. This is critical because: 1. **Long-horizon tasks** require maintaining focus across many turns 2. **External perturbations** (tool outputs, environment changes) need real-time adaptation 3. **Debugging** requires seeing HOW decisions were made, not just WHAT was output ### The Optimization Loop ``` Execute Agent → Capture Traces → Analyze Patterns → Optimize Prompt → Re-run ↑____________| ``` Each
- When to Activate
- Core Concepts
- Interleaved Thinking
- The Optimization Loop
- Pattern Detection
- Usage Modes
- Mode 1: M2.1 Agent Debugging
- Mode 2: Full Optimization Loop
- Mode 3: Universal Session Analysis
- Mode 4: Generate Shareable Skills
- CLI Commands
- Integration with Claude Code
- Auto-trigger on Failure
- On-demand Analysis
Capture reasoning trace rto capture "Search for Python tutorials" -s "You are a helpful assistant." Analyze a task rto analyze "Debug this code" -o analysis.txt Run optimization loop rto optimize "Research AI papers" --max-iterations 5 --generate-skill Generate skill from artifacts rto generate-skill my-skill-name --artifacts-dir ./optimization_artifacts
What does the reasoning-trace-optimizer skill do?
Debug and optimize AI agents by analyzing reasoning traces. Activates on 'debug agent', 'optimize prompt', 'analyze reasoning', 'why did the agent fail', 'improve agent performance', or when diagnosing agent failures and context degradation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill interleaved-thinking-muratcankoylan-agent-skills-for-con-2 --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.
