view-queue

A command that displays the current queue of saved project learnings in a readable format.

In plain words
What is it for?
It helps review queued corrections, confidence scores, patterns, and timestamps before deciding what to do next.
Why use it?
It lets you inspect pending lessons without processing or changing them.

Command

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.

agentmods
npx agentmods add commands/bayramannakov/claude-reflect/view-queue
Clone the repo
git clone --depth 1 https://github.com/BayramAnnakov/claude-reflect
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 908 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00007 $0.00908
Opus 5 $0.00003 $0.00454
Sonnet 5 $0.00001 $0.00182
Haiku 4.5 $0.00001 $0.00091

Measured 2d ago against content hash d953e3bfe6bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

view-queue 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 2d 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.

commands/view-queue.md · 104 lines

How it starts

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

Context

  • Queue file: per-project at ~/.claude/projects/<encoded-cwd>/learnings-queue.json
  • Legacy global queue (~/.claude/learnings-queue.json) is auto-migrated on first access

Your Task

Display the current learnings queue in a readable format with confidence scores, patterns, and relative timestamps.

Output format:

════════════════════════════════════════════════════════════
LEARNINGS QUEUE: [N] items
════════════════════════════════════════════════════════════

[0.85] "use gpt-5.1 not gpt-5" (use-X-not-Y) - 2 days ago
[0.70] "perfect, that's exactly right" (positive) - 5 days ago
[0.90] "remember: always run tests" (explicit) - just now

════════════════════════════════════════════════════════════
Commands:
  /reflect        - Process and save learnings
  /skip-reflect   - Discard all learnings
════════════════════════════════════════════════════════════

If queue is empty:

════════════════════════════════════════════════════════════
LEARNINGS QUEUE: Empty
════════════════════════════════════════════════════════════
No learnings queued. Use "remember: <learning>" to add items,
or corrections will be auto-detected. Run /reflect to process.
════════════════════════════════════════════════════════════

Implementation

Step 1: Read the project-scoped queue file:

python3 scripts/read_queue.py 2>/dev/null || echo "[]"

Step 2: Parse and format each item with:

  • Confidence score: [0.XX] format, from item.confidence (default 0.60 if missing)
  • Message preview: First 50 chars with "..." if longer, from item.message
  • Pattern name: In parentheses, from item.patterns (show first pattern if multiple)
  • Relative timestamp: Human-readable time difference from item.timestamp

Relative time calculation:

Calculate the difference between now and item.timestamp (ISO 8601 format):

  • Less than 1 minute → "just now"
  • Less than 1 hour → "X minutes ago"
  • Less than 24 hours → "X hours ago"
  • Less than 7 days → "X days ago"
  • Otherwise → "X weeks ago" or show date

Read the full file on GitHub · 104 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. 2d ago First seen · 104 lines · 7 tokens per session scan A d953e3bfe6bf

Subscribe to this mod's changes

view-queue is a command published in the GitHub repository BayramAnnakov/claude-reflect (1,425 stars, last pushed 5mo ago), licensed MIT. It adds 7 tokens to every session and 908 once invoked, about $0.0000 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-30.