Logo di Debug Method

Debug Method

Community
0xBakeer
debug-method

A method for fixing a bug when the cause is unknown - reproduce with the smallest input, read the state before the symptom, bisect by halves (input, code, commits), name one cause, change one thing, re-run the same reproduction.

Panoramica

Autore0xBakeer
RepositoryTandemLLM
Nome della skilldebug-method
Stelle
75
Fork
14
File inclusi
Solo istruzioni
LicenzaAGPL-3.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da 0xBakeer su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Debug Method in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/0xBakeer/TandemLLM/tree/main/packages/library/debug-method
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/0xBakeer/TandemLLM.git /tmp/TandemLLM
mkdir -p .claude/skills
cp -r /tmp/TandemLLM/packages/library/debug-method .claude/skills/debug-method
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Debug Method in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Debug Method non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Debug Method non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Debugging method

Rules:

  1. Reproduce before anything: the exact command or input that fails, written as one line, with the observed and the expected output. No reproduction, no fix.
  2. Shrink: halve the input until the failure stays with the smallest case (one row, one key press, one value).
  3. Read the state just before the symptom: a print, a log line, a debugger break, the __state() dump. Do not guess from the code.
  4. Bisect when the cause is far from the symptom: by code (comment out or stub half), by data (half the rows), or by history (git bisect between a good and a bad commit).
  5. Name the one cause in one sentence. Then change one thing. Re-run the exact reproduction, then the full tests.

What goes wrong:

  • Fixing the symptom (a try/except, a default value) and the cause stays.
  • Changing three things at once; the bug disappears and nobody knows why, then returns.
  • Evidence from before the last edit used as proof; always re-run after the fix.

Check: the reproduction command fails before the fix and passes after, in the same session, both outputs in the result; the full suite still passes.

Done when:

  • The one-line reproduction with its failing output before the change.
  • The one-sentence cause and the single change (file:line).
  • The same reproduction passing after, plus the full test summary line.

Reference

Reproduction line: python -m mytool.cli samples/bad.csv # expected 3 rows, got "KeyError: 'amount'".

Shrink a file: head -n 2 big.csv > /tmp/small.csv (header plus one row); then one column.

State before the symptom:

python
import logging; log = logging.getLogger(__name__)
log.warning("before parse: row=%r keys=%s", row, list(row))    # one line, remove after
breakpoint()   # pdb: p row, pp locals(), n, c

Browser: evaluate_script window.__state() after a real input; debugger; with DevTools open; console.table(entities).

Bisect history:

bash
git bisect start; git bisect bad; git bisect good v1.2.0
git bisect run pytest -q tests/test_parse.py -x     # or a script that exits non-zero on failure
git bisect reset

Bisect code: stub half the pipeline (return input at a midpoint) and see on which side the symptom stays.

Common causes to check in one minute each: a stale build or cached .pyc/dist; a different environment (which python, node -v); an off-by-one at a boundary (empty, 0, last element); shared mutable state (a default [], a module-level dict); an unawaited promise or coroutine; a time zone or encoding; a race between two async tasks (add an ordering log line).

Write-up format: Repro: <cmd> -> <wrong>. Cause: <sentence>. Fix: <file:line> <one change>. Proof: <cmd> -> <right>; suite N passed.

More rules:

  • After two failed fixes on one bug: stop, re-read the function from the top, write the bug down again, and question the reproduction.

More pitfalls:

  • Trusting an error message's line number from a stale build or a cached module.
  • Reproducing in a different environment (prod data, another Python) than the one that fails.

Domande frequenti

Cosa fa la skill IA Debug Method?

A method for fixing a bug when the cause is unknown - reproduce with the smallest input, read the state before the symptom, bisect by halves (input, code, commits), name one cause, change one thing, re-run the same reproduction.

Perché usare Debug Method su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Debug Method è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Debug Method in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/0xBakeer/TandemLLM/tree/main/packages/library/debug-method. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Debug Method?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Debug Method?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Debug Method: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Debug Method è gratuita?

Sì. È pubblicata su GitHub da 0xBakeer con licenza AGPL-3.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇