Logo di Frappe Agent Debugger

Frappe Agent Debugger

Organizzazione
Impertio-Studio
frappe-agent-debugger

Use when debugging Frappe errors, using bench console for live inspection, analyzing tracebacks, or reading Frappe log files. Prevents wasted debugging time from ignoring log context, misreading tracebacks, and not using bench console effectively. Covers bench console, frappe.logger, error log DocType, traceback analysis, common error patterns, log file locations, pdb/debugger integration, VS Code DAP, profiling, Frappe Recorder, mariadb diagnostics. Keywords: debug, bench console, traceback, error log, frappe.logger, pdb, debugging, log analysis, inspect, VS Code, DAP, profiling, recorder, mariadb, monitor, ERPNext error, how to debug, find the bug, what went wrong, stack trace, error message..

Panoramica

Pubblicato daImpertio-Studio
RepositoryFrappe_Claude_Skill_Package
Nome della skillfrappe-agent-debugger
Stelle
180
Fork
53
File inclusi
4
LicenzaMIT
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.

  • File inclusi: 4

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da Impertio-Studio su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Frappe Agent Debugger 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/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/agents/frappe-agent-debugger
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi 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 della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git /tmp/Frappe_Claude_Skill_Package
mkdir -p .claude/skills
cp -r /tmp/Frappe_Claude_Skill_Package/skills/source/agents/frappe-agent-debugger .claude/skills/frappe-agent-debugger
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Frappe Agent Debugger 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 Frappe Agent Debugger 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 Frappe Agent Debugger 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à.

Frappe Debugging Agent

Systematically diagnoses Frappe/ERPNext issues by classifying errors, locating relevant code, and applying targeted diagnosis checklists.

Purpose: Eliminate trial-and-error debugging — follow a deterministic diagnostic workflow.

When to Use This Agent

ERROR ANALYSIS TRIGGER
|
+-- Python traceback or error message
|   "ImportError: cannot import name X from frappe"
|   --> USE THIS AGENT
|
+-- JavaScript console error
|   "Uncaught TypeError: frm.set_value is not a function"
|   --> USE THIS AGENT
|
+-- Silent failure (no error, wrong behavior)
|   "Server Script runs but nothing happens"
|   --> USE THIS AGENT
|
+-- Scheduler/background job failure
|   "Job X failed" in scheduler logs
|   --> USE THIS AGENT
|
+-- Build/asset errors
|   "Module not found" or blank page after build
|   --> USE THIS AGENT

Debugging Workflow

STEP 1: CLASSIFY ERROR TYPE
  Python | JavaScript | Database | Permission | Hook | Scheduler | Build

STEP 2: IDENTIFY THE MECHANISM
  Controller | Server Script | Client Script | Hook | Scheduler | API

STEP 3: LOCATE RELEVANT CODE
  Use Frappe file path conventions to find source

STEP 4: APPLY DIAGNOSIS CHECKLIST
  Run type-specific checklist for the error class

STEP 5: SUGGEST FIX
  Provide corrected code + reference relevant frappe-* skills

See references/workflow.md for detailed steps.

Step 1: Error Classification

Error TypeIndicatorsPrimary Tool
PythonTraceback with .py filesbench console, logs
JavaScriptBrowser console error, cur_frm issuesBrowser DevTools
DatabaseOperationalError, IntegrityErrorbench mariadb
Permissionfrappe.PermissionError, 403 responsesPermission Inspector
HookErrors after bench migrate, wrong eventsbench doctor
Schedulerbench doctor warnings, RQ failuresScheduler logs
BuildMissing assets, blank page, module errorsbench build --verbose

Step 2: Mechanism Identification

SymptomLikely Mechanism
Error during form save/submitController or Server Script (validate/on_submit)
Error on page loadClient Script or Web Template
Error message from API callWhitelisted method or REST API handler
Error in backgroundScheduler event or frappe.enqueue() job
Error after bench migrateHook configuration or patch
Error after bench buildFrontend asset pipeline

Step 3: File Path Conventions

ALWAYS check these locations based on the mechanism:

MechanismFile Path Pattern
Controllerapps/{app}/{app}/{module}/{doctype}/{doctype}.py
Server ScriptDesk > Server Script list (stored in DB)
Client ScriptDesk > Client Script list (stored in DB)
hooks.pyapps/{app}/{app}/hooks.py
Schedulerapps/{app}/{app}/tasks.py or hooks.py scheduler_events
Whitelistedapps/{app}/{app}/{module}/*.py (search for @frappe.whitelist)
Jinjaapps/{app}/{app}/templates/
Patchesapps/{app}/{app}/patches/

Step 4: Diagnosis Checklists (Quick Reference)

Python Errors

Error PatternLikely CauseFix
AttributeError: 'NoneType'frappe.get_doc() returned NoneCheck document exists first
ValidationErrorfrappe.throw() in validateRead the message — it IS the diagnosis
ImportErrorWrong import path or Server Script using importsServer Scripts CANNOT import
LinkValidationErrorReferenced document does not existVerify Link field target exists
TimestampMismatchErrorConcurrent edit conflictReload document before save
DuplicateEntryExceptionUnique constraint violationCheck naming series or unique fields
MandatoryErrorRequired field is emptySet field before save/submit
InvalidStatusErrorWrong docstatus transitionFollow 0→1→2 sequence
CircularLinkingErrorSelf-referencing parent-childFix document hierarchy

JavaScript Errors

Error PatternLikely CauseFix
frm.X is not a functionWrong API or stale codeClear cache, check API name
cur_frm is undefinedCode runs outside form contextUse frm from handler parameter
Uncaught PromiseMissing async/await on frappe.callAdd callback or await
field undefined in frm.docField does not exist on DocTypeCheck fieldname spelling
Form not refreshingMissing frm.refresh_fields()Add refresh after set_value

Database Errors

Error PatternLikely CauseFix
OperationalError: 1054Column does not existRun bench migrate
OperationalError: 1146Table does not existRun bench migrate
IntegrityError: 1062Duplicate primary keyCheck naming/autoname
IntegrityError: 1452Foreign key violationLinked document missing
OperationalError: 1213DeadlockReduce transaction scope
InternalError: 1366Invalid character for charsetCheck input encoding

Permission Errors

Error PatternLikely CauseFix
frappe.PermissionErrorUser lacks role permissionCheck Role Permission Manager
403 on API callMissing frappe.has_permission() or wrong @frappe.whitelist(allow_guest=True)Add permission check or guest flag
Empty list viewUser Permissions filteringCheck User Permission for that user
Cannot submitNo Submit permission for roleAdd Submit perm in DocType

Debug Tools

bench console (Python REPL)

bash
bench --site {site} console
# Then:
frappe.get_doc("Sales Invoice", "SINV-00001")  # Inspect document
frappe.db.sql("SELECT name FROM `tabSales Invoice` LIMIT 5")  # Raw SQL
frappe.get_hooks("doc_events")  # Inspect active hooks
frappe.get_all("Server Script", filters={"disabled": 0}, fields=["name", "script_type"])

bench mariadb (SQL shell)

bash
bench --site {site} mariadb
-- Then:
SHOW CREATE TABLE `tabSales Invoice`;
SELECT * FROM `tabError Log` ORDER BY creation DESC LIMIT 10;

bench doctor

bash
bench doctor  # Check scheduler, workers, background jobs

frappe.logger()

python
logger = frappe.logger("my_debug", allow_site=True)
logger.info(f"Variable value: {my_var}")
# Logs to: sites/{site}/logs/my_debug.log

Browser DevTools

Console tab  → JavaScript errors
Network tab  → Failed API calls (check response body for traceback)
Application tab → Session/cookie issues

Log File Locations

LogPathContains
Frappe websites/{site}/logs/frappe.logWeb request errors
Workersites/{site}/logs/worker.logBackground job errors
Schedulersites/{site}/logs/scheduler.logScheduled task output
Custom loggersites/{site}/logs/{name}.logfrappe.logger("{name}") output
Bench~/.bench/logs/bench.logBench command output
Error Log DocTypeDesk > Error LogUI-accessible error records
Supervisor/var/log/supervisor/Process manager logs
nginx/var/log/nginx/HTTP request/proxy errors

Common Error Patterns Table

Error MessageLikely CauseFixRelevant Skill
Import not allowed in Server ScriptsUsing import in Server ScriptUse frappe.utils.* or move to Controllerfrappe-errors-serverscripts
Cannot read properties of undefinedJS accessing field before form loadAdd frm.doc.field null checkfrappe-errors-clientscripts
DocType X not foundMissing app install or migrationbench migrate or bench install-appfrappe-ops-bench
Scheduler is not runningWorkers stoppedbench doctor, restart workersfrappe-ops-bench
BrokenPipeErrorgunicorn timeout on long operationUse frappe.enqueue() for long tasksfrappe-impl-scheduler
ModuleNotFoundErrorPython package not installedbench pip install {pkg}frappe-ops-bench
Duplicate nameName collision in naming seriesCheck autoname or naming_seriesfrappe-syntax-doctypes
Insufficient PermissionMissing role for operationCheck Role Permissionsfrappe-core-permissions
Cannot edit submitted documentModifying docstatus=1 docUse amend_doc() or cancel firstfrappe-errors-controllers
Invalid columnSchema out of syncbench migratefrappe-errors-database

Agent Output Format

ALWAYS produce debugging output in this format:

markdown
## Debug Report

### Error Classification
**Type**: [Python/JS/Database/Permission/Hook/Scheduler/Build]
**Mechanism**: [Controller/Server Script/Client Script/Hook/etc.]

### Root Cause
[One-sentence diagnosis]

### Evidence
- [What log/traceback line confirms this]
- [What code path is involved]

### Fix
[Corrected code or configuration change]

### Verification Steps
1. [How to confirm the fix works]
2. [What to check in logs/UI]

### Referenced Skills
- `frappe-*`: [what was consulted]

Debugging Decision Tree

ERROR RECEIVED
|
+-- Has traceback?
|   +-- YES: Read LAST line first (actual error)
|   |   +-- Contains ".py" --> Python error (Step 4: Python checklist)
|   |   +-- Contains "SQL" --> Database error (Step 4: Database checklist)
|   +-- NO: Check browser console
|       +-- Has JS error --> JavaScript error (Step 4: JS checklist)
|       +-- No error visible --> Silent failure
|           +-- Check Error Log DocType
|           +-- Check frappe.log
|           +-- Add frappe.logger() statements
|
+-- Error after bench command?
|   +-- After migrate --> Hook/schema issue
|   +-- After build --> Frontend asset issue
|   +-- After update --> Version compatibility issue
|
+-- Intermittent error?
    +-- Check scheduler logs
    +-- Check worker logs
    +-- Check for race conditions (TimestampMismatchError)

See references/checklists.md for complete diagnosis checklists. See references/examples.md for debugging walkthrough examples. See references/advanced-debugging.md for VS Code DAP setup, bench console patterns, mariadb diagnostics, and profiling tools.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Frappe Agent Debugger?

Use when debugging Frappe errors, using bench console for live inspection, analyzing tracebacks, or reading Frappe log files. Prevents wasted debugging time from ignoring log context, misreading tracebacks, and not using bench console effectively. Covers bench console, frappe.logger, error log DocType, traceback analysis, common error patterns, log file locations, pdb/debugger integration, VS Code DAP, profiling, Frappe Recorder, mariadb diagnostics. Keywords: debug, bench console, traceback, error log, frappe.logger, pdb, debugging, log analysis, inspect, VS Code, DAP, profiling, recorder,...

Perché usare Frappe Agent Debugger su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Frappe Agent Debugger è 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 la skill 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 Frappe Agent Debugger in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/agents/frappe-agent-debugger. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Frappe Agent Debugger?

Qualsiasi modello che colleghi a 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 Frappe Agent Debugger?

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

La skill IA Frappe Agent Debugger è gratuita?

Sì. È pubblicata su GitHub da Impertio-Studio con licenza MIT. 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, template 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.

Elenco completo

Crea subito il tuo spazio di lavoro AI

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