analyze-session-gaps

analyze-session-gaps is a command for Claude Code from bacchus-labs/wrangler. It costs 10 tokens per session (5,694 once invoked), scanned A, original, MIT.

A session review that examines what went wrong in an agent workflow and classifies the missing or faulty process that caused user frustration.

In plain words
What is it for?
Use it to review recent conversation steps, commands, and skill use, then propose systematic improvements to the agent's process.
Why use it?
It turns a one-off failure into a documented workflow gap, such as a missing skill or a skill that did not work correctly.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the wrangler plugin — 25 skills, 16 commands, 13 agents shipped together

Good fit Use it to review recent conversation steps, commands, and skill use, then propose systematic improvements to the agent's process.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/bacchus-labs/wrangler/analyze-session-gaps
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/bacchus-labs/wrangler

Made for: Claude Code.

Or install wrangler, the plugin that ships this one along with the rest of its 25 skills, 16 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-session-gaps

README.md
[![agentmods](https://agentmods.dev/badge/commands/bacchus-labs/wrangler/analyze-session-gaps.svg)](https://agentmods.dev/commands/bacchus-labs/wrangler/analyze-session-gaps)
Your own site
<a href="https://agentmods.dev/commands/bacchus-labs/wrangler/analyze-session-gaps"><img src="https://agentmods.dev/badge/commands/bacchus-labs/wrangler/analyze-session-gaps.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,694 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.05694
Opus 5 $0.00005 $0.02847
Sonnet 5 $0.00002 $0.01139
Haiku 4.5 $0.00001 $0.00569

Measured 7d ago against content hash 64a293ae12a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

analyze-session-gaps scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.wrangler/memory/knowledge-base/reference-prompts/commands/analyze-session-gaps.md · 731 lines

How it starts

The opening of the file, as written. The whole thing — 731 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are analyzing the current session to identify workflow gaps, skill deficiencies, or process regressions that caused user frustration.

Input

User provided description: "{user's description of the problem}"

Your Task

Phase 1: Session Analysis

  1. Understand the Problem

    • Parse user's description carefully
    • Identify what went wrong from the user's perspective
    • Determine the gap between user expectation and reality
    • Consider the context of their frustration
  2. Trace Conversation History

    • Review recent messages in this session (last 20-30 messages)
    • Identify the specific point where the workflow failed
    • Note which skills were invoked (if any)
    • Note which commands were executed
    • Detect what SHOULD have happened but didn't
    • Look for patterns of similar failures in the conversation
  3. Classify the Gap

    Determine the gap type from these categories:

    • MISSING_SKILL: No skill exists for this scenario

      • Example: "No skill to check code style consistency across files"
      • Indicator: "I wish there was a way to..." or "Nothing caught this problem"
    • BROKEN_SKILL: Skill exists but didn't work correctly

      • Example: "The verification skill ran but missed the bug"
      • Indicator: Skill was invoked but failed to prevent the issue
    • SKILL_NOT_INVOKED: Skill exists but wasn't used when it should have been

      • Example: "Constitutional check skill exists but wasn't triggered"
      • Indicator: "We have a skill for that, why didn't you use it?"
    • WORKFLOW_GAP: Skills exist but aren't properly connected

      • Example: "Skills for testing and deployment exist but no bridge between them"
      • Indicator: Multiple steps needed but no orchestration
    • VERIFICATION_GAP: No check exists to prevent the issue

      • Example: "Nothing verified tests were actually run before claiming success"
      • Indicator: Agent made claims without evidence
    • PROMPT_GAP: Skill exists but prompts are unclear or ignored

      • Example: "Skill says to do X, but agent did Y instead"
      • Indicator: Skill instructions ambiguous or contradictory

Read the full file on GitHub · 731 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 731 lines · 10 tokens per session scan A 64a293ae12a2

Subscribe to this mod's changes

analyze-session-gaps is a command published in the GitHub repository bacchus-labs/wrangler (4 stars, last pushed 6mo ago), licensed MIT. It adds 10 tokens to every session and 5,694 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.