investigate

A structured method for finding the underlying cause of a software problem before changing the code. It moves from collecting evidence to testing explanations and then implementing a fix.

In plain words
What is it for?
Debugging errors, tracing affected code paths, checking recent changes and configuration, implementing a root-cause fix, and adding a regression test.
Why use it?
It reduces repeated trial-and-error fixes that only hide symptoms. The investigation leaves a clearer explanation of why the problem occurred.

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/gcwing/bitfun/gstack-investigate
Any agent
npx skills add GCWing/BitFun --skill gstack-investigate
Clone the repo
git clone --depth 1 https://github.com/GCWing/BitFun

Made for: Claude Code, Codex.

Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,273 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.00112 $0.02273
Opus 5 $0.00056 $0.01137
Sonnet 5 $0.00022 $0.00455
Haiku 4.5 $0.00011 $0.00227

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

Security

Grade A, and why

investigate 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.

src/crates/assembly/core/builtin_skills/gstack-investigate/SKILL.md · 213 lines

How it starts

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

Systematic Debugging

Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.

BitFun Team Mode Dispatch

When this skill is invoked by BitFun Team Mode, this skill supplies the debugging methodology. Use existing Task sub-agents to gather independent evidence, then keep hypothesis selection and fixes in the main Team session.

  • Do not assume a Debugger sub-agent exists. Choose only from the Task tool's available agents.
  • Prefer matching custom debugging/domain sub-agents if available; otherwise use Explore for code-path tracing and FileFinder for locating logs, configs, tests, and affected files.
  • Split independent evidence tracks into parallel Task calls when useful: reproduction path, recent-change audit, config/environment audit, and suspected subsystem trace.
  • Keep Task work read-only until root cause is proven. Ask for facts, file paths, commands tried, observations, and confidence.
  • The main Team orchestrator owns the root-cause statement, fix plan, implementation, and regression test.

Phase 1: Root Cause Investigation

Gather context before forming any hypothesis.

  1. Collect symptoms: Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time via AskUserQuestion.

  2. Read the code: Trace the code path from the symptom back to potential causes. Use Grep to find all references, Read to understand the logic.

  3. Check recent changes:

    git log --oneline -20 -- <affected-files>
    

    Was this working before? What changed? A regression means the root cause is in the diff.

  4. Reproduce: Can you trigger the bug deterministically? If not, gather more evidence before proceeding.

Prior Learnings

Use only BitFun in-session memory, project docs, .bitfun/team/ artifacts, git history, TODO files, and prior design/review artifacts. Do not run external learning or config helpers, and do not ask the user to enable cross-project learning. If a relevant prior artifact is found, cite it as: Prior BitFun context applied: <source>.

Read the full file on GitHub · 213 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 · 213 lines · 112 tokens per session scan A 8dcade7abfa8

Subscribe to this mod's changes

investigate is a skill published in the GitHub repository GCWing/BitFun (1,871 stars, last pushed 2d ago), licensed MIT. It adds 112 tokens to every session and 2,273 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

git-delegation

将所有 git 操作委托给 Manager 执行。Worker 无法直接访问 git credentials,因此任何需要认证的 git 操作(clone、push、fetch 等)都需要通过此机制委托给 Manager。.

agentscope-ai/AgentTeams · 51 tokens

agentteams-migrate

Analyze current OpenClaw setup and generate a migration package (ZIP) for importing into AgentTeams as a managed Worker.

agentscope-ai/AgentTeams · 28 tokens

workerflow-internal-workflow

Use when a QwenPaw-backed Worker needs to decide whether to do work directly, use native subagents for internal parallelism, or create a temporary QwenPaw agent with a custom AGENTS.md and skills.

agentscope-ai/AgentTeams · 52 tokens

find-skills

Discover and install agent skills from the open ecosystem. Use when you encounter an unfamiliar domain, framework, or workflow that you lack specialized knowledge about, or when your coordinator suggests searching for skills before starting a task.

agentscope-ai/AgentTeams · 46 tokens

higress-gateway-management

Manage the Higress AI Gateway via its Console API (consumers, routes, AI providers, MCP servers). Use when creating consumers, configuring routes, or managing AI gateway settings.

agentscope-ai/AgentTeams · 43 tokens

worker-management

Use when admin requests hand-creating or resetting a Worker, starting/stopping a Worker, managing Worker skills, enabling peer mentions, or opening a QwenPaw console. Use agentteams-find-worker only as a helper for Nacos-backed market import or when task assignment needs you to discover a suitable Worker.

agentscope-ai/AgentTeams · 65 tokens