investigation-mode

investigation-mode is a skill for Claude Code, Codex from kasuken/github-copilot-superpowers. It costs 45 tokens per session (695 once invoked), scanned A, original, MIT.

A debugging workflow that pauses implementation after repeated failures and investigates the underlying cause using evidence. It resumes only after a verified plan and possible options are clear.

In plain words
What is it for?
Use it for repeated build, test, lint, or runtime errors, flaky failures, problems that cannot be reproduced, or work that feels stuck.
Why use it?
It helps prevent random fixes and hidden changes of direction when the same error keeps returning or the problem is unclear.

Skill for Claude CodeCodex

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 skills/kasuken/github-copilot-superpowers/investigation-mode
Any agent
npx skills add kasuken/github-copilot-superpowers --skill investigation-mode
Clone the repo
git clone --depth 1 https://github.com/kasuken/github-copilot-superpowers

Made for: Claude Code, Codex.

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 investigation-mode

README.md
[![agentmods](https://agentmods.dev/badge/skills/kasuken/github-copilot-superpowers/investigation-mode.svg)](https://agentmods.dev/skills/kasuken/github-copilot-superpowers/investigation-mode)
Your own site
<a href="https://agentmods.dev/skills/kasuken/github-copilot-superpowers/investigation-mode"><img src="https://agentmods.dev/badge/skills/kasuken/github-copilot-superpowers/investigation-mode.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 695 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.00045 $0.00695
Opus 5 $0.00023 $0.00347
Sonnet 5 $0.00009 $0.00139
Haiku 4.5 $0.00005 $0.00069

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

Security

Grade A, and why

investigation-mode 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 4d 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.

.github/skills/investigation-mode/SKILL.md · 64 lines

How it starts

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

Investigation Mode

Overview

This skill provides a hard stop and a repeatable workflow when progress stalls or errors repeat. It prevents “random walk” fixes and forces evidence-first debugging.

Use when...

  • There are 2+ consecutive failures/errors in the same feature or approach
  • The same error comes back after “fixes”
  • There is temptation to “just workaround” or change approach silently
  • The problem statement is unclear and implementation would be guesswork

Symptoms / keywords

  • “stuck”, “still failing”, “same error”, “again”, “flaky”, “intermittent”, “can’t reproduce”, “works on my machine”
  • “quick workaround”, “let’s just do it manually”, “skip validation”, “good enough”
  • CI-only failures, nondeterministic tests, repeating TypeScript/build/lint errors

Rules (verbatim triggers)

Failure response rules

  • 2+ consecutive failures: Switch to investigation mode
  • Ask before: Using workarounds or alternatives
  • Explain: Why original approach failed
  • Options: Use task-direction-approval (2–3 options + trade-offs; ask user when changing direction).

Core: Respect user's original intent. When stuck, find proper solutions rather than taking shortcuts.

After 2 consecutive errors in same feature

  1. 🛑 PAUSE - Stop implementation immediately
  2. 🔍 INVESTIGATION MODE - Switch focus to root cause analysis
  3. 📖 Deep Research - Dispatch a research subagent to execute web fetch for official docs, RFCs, known issues and return a cited Context Package
  4. 🧠 Sequential-thinking - Analyze fundamental misunderstanding
  5. 🧪 Test First - Write comprehensive tests before continuing

Declare mode switch: "🔍 INVESTIGATION MODE: Pausing to research root cause"

Workflow

  1. Freeze changes: stop making further edits that are not evidence-driven.
  2. Capture evidence: record the exact error text, stack traces, logs, and minimal repro steps.
  3. Constrain scope: isolate the smallest failing unit (single test, single endpoint, single build step).
  4. Run root cause analysis:
    • REQUIRED SUB-SKILL: Use root-cause-tracing for systematic isolation techniques.
    • Use uncertainty-verification when the fix depends on exact tool/library behavior.
  5. Propose options: Use task-direction-approval (2–3 options + trade-offs).
  6. Ask approval if direction changes:
    • REQUIRED SUB-SKILL: Use task-direction-approval when switching library/tool/architecture or replacing automation with manual workaround.
  7. Resume only after selecting a plan and (when applicable) verifying it with a small test.

Read the full file on GitHub · 64 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. 4d ago First seen · 64 lines · 45 tokens per session scan A 8c12d70207ef

Subscribe to this mod's changes

investigation-mode is a skill published in the GitHub repository kasuken/github-copilot-superpowers (16 stars, last pushed 6mo ago), licensed MIT. It adds 45 tokens to every session and 695 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.