arc-prd
Architecture review for a PRD. Analyzes codebase through separation-of-concerns and tactical-ddd lenses, surfaces architectural…
Analyze a session transcript for optimization opportunities
> /plugin marketplace add NTCoding/claude-skillzHow it fires
How this command gets triggered: by you, by Claude, or both.
/optimize-sessionContext preview
What this command does when you run it.
Analyze a session transcript for optimization opportunities
argument-hint: "[session-id|slug]" description: Analyze a session transcript for optimization opportunities
Analyze a Claude Code session transcript to find concrete opportunities to work faster and better.
ARGUMENTS: $ARGUMENTS
Determine the current project's conversation directory:
# Encode current working directory path: replace / with - # e.g., /Users/nicktune/code/my-project → -Users-nicktune-code-my-project ls -t ~/.claude/projects/<encoded-path>/*.jsonl | head -5
If argument provided:
If no argument: use the most recently modified JSONL file.
Report: "Analyzing session: [slug or ID] ([message count] messages, [duration])"
Read the JSONL file. Extract:
Create a condensed version of the transcript suitable for subagent context:
Write the condensed transcript to a temporary file:
# Write to /tmp/session-optimizer-transcript-<session-id>.md
Also write the extracted context (loaded skills list, available tools list, session stats) to:
# Write to /tmp/session-optimizer-context-<session-id>.md
Launch ALL FOUR subagents IN PARALLEL using the Task tool:
1. **conversation-efficiency-analyzer** — finds wasted cycles, unnecessary back-and-forth, misinterpretations 2. **tool-and-skill-usage-analyzer** — finds unused tools, missed parallelism, underutilized capabilities 3. **skill-compliance-analyzer** — finds violations of loaded skills 4. **context-and-skills-gap-analyzer** — finds missing project context and skill-building opportunities
Each subagent receives the same prompt:
Analyze this Claude Code session transcript for optimization opportunities. ## Session Context [Contents of /tmp/session-optimizer-context-<session-id>.md] ## Transcript [Contents of /tmp/session-optimizer-transcript-<session-id>.md]
Once all subagents return, compile their findings into a single report:
# Session Optimization Report **Session:** [slug or ID] **Duration:** [time] **Messages:** [count] ([user count] user, [assistant count] assistant) **Model:** [model name] **Tools used:** [list] **Skills loaded:** [list] --- ## Findings [All findings from all 4 subagents, numbered sequentially] [Sorted by impact: high → medium → low] [Deduplicate if multiple subagents found the same issue — keep the most detailed version] --- **Total findings:** [count] ([high count] high, [medium count] medium, [low count] low impact)
After presenting the report, say:
"Pick a finding number to discuss in detail, or 'all' to walk through each one."
For each finding discussed: 1. Show the full evidence 2. Explain the optimization opportunity 3. Propose the best action for this specific finding — whatever fits the context:
4. Offer the user a choice:
Reusable skills and composable system prompts for Claude Code.
Architecture review for a PRD. Analyzes codebase through separation-of-concerns and tactical-ddd lenses, surfaces architectural…
Facilitated discussion of all 3 design phases, producing an Architecture Decision Record
Force critical evaluation of proposals from 5 adversarial perspectives