issue:discover

A command that explores selected code from several perspectives, including bugs, user experience, tests, security, performance, and maintainability.

In plain words
What is it for?
Use it to inspect specific files or modules, choose review perspectives, and optionally add external research for security or best-practice checks.
Why use it?
It reveals different kinds of potential problems and improvement opportunities that a single review angle may miss.

Command for Claude Code

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/catlog22/claude-code-workflow/discover
Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,140 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.00049 $0.04140
Opus 5 $0.00024 $0.02070
Sonnet 5 $0.00010 $0.00828
Haiku 4.5 $0.00005 $0.00414

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

Security

Grade A, and why

issue:discover 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.

.claude/commands/issue/discover.md · 484 lines

How it starts

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

Auto Mode

When --yes or -y: Auto-select all perspectives, skip confirmations.

Issue Discovery Command

Quick Start

# Discover issues in specific module (interactive perspective selection)
/issue:discover src/auth/**

# Discover with specific perspectives
/issue:discover src/payment/** --perspectives=bug,security,test

# Discover with external research for all perspectives
/issue:discover src/api/** --external

# Discover in multiple modules
/issue:discover src/auth/**,src/payment/**

Discovery Scope: Specified modules/files only Output Directory: .workflow/issues/discoveries/{discovery-id}/ Available Perspectives: bug, ux, test, quality, security, performance, maintainability, best-practices Exa Integration: Auto-enabled for security and best-practices perspectives CLI Tools: Gemini → Qwen → Codex (fallback chain)

What & Why

Core Concept

Multi-perspective issue discovery orchestrator that explores code from different angles to identify potential bugs, UX improvements, test gaps, and other actionable items. Unlike code review (which assesses existing code quality), discovery focuses on finding opportunities for improvement and potential problems.

vs Code Review:

  • Code Review (review-module-cycle): Evaluates code quality against standards
  • Issue Discovery (issue:discover): Finds actionable issues, bugs, and improvement opportunities

Value Proposition

  1. Proactive Issue Detection: Find problems before they become bugs
  2. Multi-Perspective Analysis: Each perspective surfaces different types of issues
  3. External Benchmarking: Compare against industry best practices via Exa
  4. Direct Issue Integration: Discoveries can be exported to issue tracker
  5. Dashboard Management: View, filter, and export discoveries via CCW dashboard

How It Works

Execution Flow

Phase 1: Discovery & Initialization
   └─ Parse target pattern, create session, initialize output structure

Phase 2: Interactive Perspective Selection
   └─ AskUserQuestion for perspective selection (or use --perspectives)

Phase 3: Parallel Perspective Analysis
   ├─ Launch N @cli-explore-agent instances (one per perspective)
   ├─ Security & Best-Practices auto-trigger Exa research
   ├─ Agent writes perspective JSON, returns summary
   └─ Update discovery-progress.json

Phase 4: Aggregation & Prioritization
   ├─ Collect agent return summaries
   ├─ Load perspective JSON files
   ├─ Merge findings, deduplicate by file+line
   └─ Calculate priority scores

Phase 5: Issue Generation & Summary
   ├─ Convert high-priority discoveries to issue format
   ├─ Write to discovery-issues.jsonl
   ├─ Generate single summary.md from agent returns
   └─ Update discovery-state.json to complete

Phase 6: User Action Prompt
   └─ AskUserQuestion for next step (export/dashboard/skip)

Read the full file on GitHub · 484 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 · 484 lines · 49 tokens per session scan A 3f962d1b2e9d

Subscribe to this mod's changes

issue:discover is a command published in the GitHub repository catlog22/Claude-Code-Workflow (2,134 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 4,140 once invoked, about $0.0002 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.