debug

debug is a command for Claude Code from HigorAlves/orc. It costs 53 tokens per session (2,360 once invoked), scanned A, original, MIT.

A structured debugging workflow that investigates the root cause before changing code. TDD, or test-driven development, means using a test to describe the expected fix and protect it from breaking again.

In plain words
What is it for?
Use it for hard bugs, failing tests, and failures that may originate in another repository, with an optional link to a Jira ticket.
Why use it?
It prevents guessing at fixes for difficult or unexpected failures. The diagnosis and regression test are saved in session state so the work can be resumed.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; $skill-name invocation.

Good fit Use it for hard bugs, failing tests, and failures that may originate in another repository, with an optional link to a Jira ticket.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/higoralves/orc/debug
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/HigorAlves/orc

Made for: Claude Code.

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 debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/higoralves/orc/debug/github.svg)](https://agentmods.dev/commands/higoralves/orc/debug)
Your own site
<a href="https://agentmods.dev/commands/higoralves/orc/debug"><img src="https://agentmods.dev/badge/commands/higoralves/orc/debug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug

Your own site · 80×15
<a href="https://agentmods.dev/commands/higoralves/orc/debug"><img src="https://agentmods.dev/badge/commands/higoralves/orc/debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,360 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.00053 $0.02360
Opus 5.5 $0.00021 $0.00944
Sonnet 5.5 $0.00011 $0.00472
Haiku 4.5 $0.00005 $0.00236

Measured 25d ago against content hash 894b9c123fc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debug 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 25d 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.

codex/orc/content/commands/debug.md · 142 lines

How it starts

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

$orc-debug

Hard bugs and unexpected failures get the systematic-debugging discipline. NO FIXES WITHOUT A ROOT CAUSE.

Arguments

  • --jira <KEY> — link a Jira ticket key (e.g. BUG-42) to this session silently. Suppresses the Phase 1 link prompt.
  • The bug description / failing test name is the rest of the argument string.

Workflow

Phase 0 — Detect context

Run orc-workspace-detect --banner in the working repository and read its output before continuing.

Run context detection explicitly; shell environments do not persist between calls.

In workspace mode, resolve targetRepos from flags or via the available user-question tool (or ask in chat). The default is the symptom-repo (the repo where the bug surfaces) plus any sibling repos the user suspects as the actual cause — the investigator reads across all of them. Iron rule: no silent broadcast — confirm.

Phase 1 — Initialize workspace + link

  1. Determine the current branch: git branch --show-current (in workspace mode, prompt the user since cwd has no branch). Sanitize (/ → -).
  2. Create ${ORC_STATE_DIR}/<sanitized-branch>/files/ if it doesn't exist. In workspace mode, also create per-repo <workspaceRoot>/<repo>/.orc/<sanitized-branch>/ with workspace-link.json back-pointers for each target repo (the diagnosis is workspace-level; remediation slices land per repo).
  3. Resolve the Jira link.
    • If --jira <KEY> was passed: validate against ^[A-Z][A-Z0-9_]*-\d+$. Reject and stop on mismatch.
    • Otherwise: ask via the available user-question tool (or ask in chat) — "Link a Jira ticket to this session?" with options: Paste a key / Skip — I'll bind later via $orc-jira bind / No ticket — this work has no tracker entry.
  4. Register state: orc-state init --command debug --total-phases 7 [--jira <KEY>]. Defer to orc-state-protocol for schema and rules; per phase, orc-state phase set <n> + orc-state digest write -.

Phase 2 — Investigate (no fixes)

Prime code discovery first (optional, non-blocking). Follow orc-code-discovery: if graphify is installed, verify the graph on the buggy branch is fresh before dispatching — build if missing (graphify extract . --code-only) or refresh if stale (graphify update .), so the investigator queries the graph from turn one instead of discovering staleness mid-investigation. Skip silently if graphify is absent or the build fails.

Read the full file on GitHub · 142 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. 25d ago Changed 894b9c123fc2
  2. 1mo ago Changed · +2 lines c9560f0999f4
  3. 1mo ago Changed · +1 lines c61bc47ea0b2
  4. 3mo ago First seen · 139 lines · 53 tokens per session scan A dfef57d8dfee

Subscribe to this mod's changes

debug is a command published in the GitHub repository HigorAlves/orc (7 stars, last pushed 3d ago), licensed MIT. It adds 53 tokens to every session and 2,360 once invoked, about $0.0002 per session on Opus 5.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.

Related

debug compared with commands from other repositories

debug next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debugHigorAlves/orcCommand73d agoMITA53Claude Code
parallax-statusMaster0fFate/parallax-claudecodeCommand01mo agoMITA13Claude Code
ccc-feature-startKevinZai/commanderCommand6todayMITA44Claude Code
fix-bugvalsecchi75/project-scaffolderCommand96d agoMITA31Claude Code
executeskullninja/coco-workflowCommand71mo agoMITA28Claude Code
troubleshootLeanAndMean/scramjetCommand1todayApache-2.0A9Claude Code
fix-issuexiaobei930/cc-bestCommand505mo agoMITA23Claude Code