spectra-debug

spectra-debug is a skill for Claude Code, Codex from PsychQuant/che-ical-mcp. It costs 14 tokens per session (1,006 once invoked), scanned A, original, MIT.

A structured four-phase method for debugging software problems by reproducing the issue, isolating it, finding its root cause, and then fixing it.

In plain words
What is it for?
Use it to investigate crashes, incorrect results, or other unexpected software behavior in a deliberate sequence.
Why use it?
It replaces guesswork and random changes with evidence-based investigation, while limiting repeated failed fixes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); $skill-name invocation.

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/psychquant/che-ical-mcp/spectra-debug
Any agent
npx skills add PsychQuant/che-ical-mcp --skill spectra-debug
Clone the repo
git clone --depth 1 https://github.com/PsychQuant/che-ical-mcp

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 spectra-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/psychquant/che-ical-mcp/spectra-debug.svg)](https://agentmods.dev/skills/psychquant/che-ical-mcp/spectra-debug)
Your own site
<a href="https://agentmods.dev/skills/psychquant/che-ical-mcp/spectra-debug"><img src="https://agentmods.dev/badge/skills/psychquant/che-ical-mcp/spectra-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,006 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.1 $0.00014 $0.01006
Opus 5 $0.00007 $0.00503
Sonnet 5 $0.00003 $0.00201
Haiku 4.5 $0.00001 $0.00101

Measured 6d ago against content hash cbb13170968d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

spectra-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 6d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/spectra-debug/SKILL.md · 116 lines

How it starts

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

Systematically debug a problem using a four-phase workflow.

This skill enforces debugging discipline. No guessing, no random changes, no "let me try this." Every step is deliberate and evidence-based.

Input: The argument after $spectra-debug describes the bug or unexpected behavior. Examples:

  • $spectra-debug the search returns duplicate results
  • $spectra-debug crash on startup after upgrading
  • $spectra-debug file watcher misses rename events

The Three-Attempt Rule

Maximum 3 fix attempts per hypothesis in Phase 4 (Fix). Phases 1-3 (Reproduce, Isolate, Root Cause) are investigation — they do not count toward this limit. If your third fix attempt fails:

  1. Stop fixing
  2. Document what you tried and why it failed
  3. Question your hypothesis — is the root cause what you think it is?
  4. Research alternatives or try a completely different angle

Do NOT keep trying variations of the same approach. That's a loop, not debugging.


Phase 1: Reproduce

Before anything else, make the bug happen reliably.

  • Find the exact steps to trigger the bug
  • Identify the expected vs actual behavior — be precise
  • Determine if it's consistent — does it happen every time? Only on certain input?
  • Simplify the reproduction — strip away everything that's not essential

If you can't reproduce it, you can't debug it. Gather more information before proceeding.


Phase 2: Isolate

Narrow down where the bug lives.

  • Binary search the codebase — which module, which function, which line?
  • Check inputs and outputs — at each boundary, is the data correct?
  • Add targeted logging — not everywhere, just at decision points
  • Use git bisect when the bug is a regression — find the exact commit that introduced it

Goal: pinpoint the exact location where behavior diverges from expectation.


Phase 3: Root Cause

Understand WHY it's broken, not just WHERE.

Ask these questions:

  • What assumption is being violated?
  • What changed that made this start failing?
  • Is this a symptom of a deeper issue, or the actual problem?
  • Are there other places with the same pattern that might also be affected?

Read the full file on GitHub · 116 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. 6d ago First seen · 116 lines · 14 tokens per session scan A cbb13170968d

Subscribe to this mod's changes

spectra-debug is a skill published in the GitHub repository PsychQuant/che-ical-mcp (36 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 1,006 once invoked, about $0.0001 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

xcode-build-fixer

Apply approved Xcode build optimization changes following best practices, then re-benchmark to verify improvement. Use when a developer has an approved optimization plan from xcode-build-orchestrator, wants to apply specific build fixes, needs help implementing build setting changes, script phase guards, source-level…

omarshahine/apple-pim · 77 tokens

spm-build-analysis

Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build…

omarshahine/apple-pim · 87 tokens

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks…

omarshahine/apple-pim · 74 tokens

ios-memgraph-leaks

Capture, inspect, compare, and root-cause iOS memory graph leaks using Apple's leaks and memgraph tools. Use when debugging leaked iOS objects, simulator memgraphs, retain-cycle suspicions, memory growth after navigation/logout/account changes, or when asked to prove an iOS leak fix with before/after memgraph evidence.

omarshahine/apple-pim · 73 tokens

swiftui-performance-audit

Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is…

omarshahine/apple-pim · 66 tokens

xcode-project-analyzer

Audit Xcode project configuration, build settings, scheme behavior, and script phases to find build-time improvements with explicit approval gates. Use when a developer wants project-level build analysis, slow incremental builds, guidance on target dependencies, build settings review, run script phase analysis…

omarshahine/apple-pim · 72 tokens