joplin-llm-wiki: Command for Claude Code

.cursor/commands/spectra-debug.md

/spectra-debug is a command for Claude Code, Cursor from gcake119/joplin-llm-wiki. It costs 15 tokens per session (1,006 once invoked), scanned A, original, MIT.

A command for investigating software bugs through four phases: reproducing the problem, isolating it, finding its cause, and fixing it. It also limits repeated attempts when one fix idea fails.

In plain words
What is it for?
Use it to investigate crashes, incorrect results, missing file events, and other reproducible problems while recording what was tested and why.
Why use it?
It replaces guesswork and random changes with an evidence-based debugging process.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

This is gcake119/joplin-llm-wiki's own configuration. It tells Claude Code and Cursor how to work on joplin-llm-wiki itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything joplin-llm-wiki configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gcake119/joplin-llm-wiki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gcake119/joplin-llm-wiki/main/.cursor/commands/spectra-debug.md
Clone the repo
git clone --depth 1 https://github.com/gcake119/joplin-llm-wiki

Made for: Claude Code, Cursor.

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/commands/gcake119/joplin-llm-wiki/spectra-debug/github.svg)](https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-debug)
Your own site
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-debug"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-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 /spectra-debug

Your own site · 80×15
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-debug"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,006 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.00015 $0.01006
Opus 5 $0.00008 $0.00503
Sonnet 5 $0.00003 $0.00201
Haiku 4.5 $0.00002 $0.00101

Measured 8d ago against content hash 34aead1efcbe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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.

.cursor/commands/spectra-debug.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. 8d ago First seen · 116 lines · 15 tokens per session scan A 34aead1efcbe

Subscribe to this mod's changes

/spectra-debug is a command published in the GitHub repository gcake119/joplin-llm-wiki (2 stars, last pushed 2mo ago), licensed MIT. It adds 15 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-31.