agentleFS
anatolykoptevanatolykoptev/n8n-mcp-agent/skills/n8n-diagnostics/SKILL.md

n8n-diagnostics

Skill0 starsChanged 10 months agoMITView on GitHub

Diagnose n8n issues by analyzing logs, detecting error patterns, and providing actionable fixes. Use when workflows fail, services are unhealthy, or debugging n8n problems.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use n8n-diagnostics when:

    line 10
  2. Very specific:

    Always run n8n-health-check first to verify basic connectivity before deeper analysis.

    line 126
  3. Very specific:

    Use n8n-analyze-logs with appropriate timeframe:

    line 130
  4. Distinctive:

    Before blaming n8n, verify:

    line 153
  5. Distinctive:

    n8n-deployment: If diagnostics reveal infrastructure issues

    line 169
  6. Distinctive:

    n8n-security: If security-related errors detected

    line 170

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

n8n Diagnostics Skill

When to Use This Skill

Use n8n-diagnostics when:

  • Workflow executions fail or behave unexpectedly
  • n8n service is unhealthy or unresponsive
  • Need to analyze logs for error patterns
  • Debugging connectivity or credential issues
  • Performance problems in n8n instance

Available MCP Tools

n8n-diagnose

Primary diagnostic tool. Runs comprehensive health checks and returns actionable recommendations.

Input: { clientId, workflowId?, verbose? }
Output: { status, issues[], recommendations[] }

Use when:

  • Quick overview of n8n health needed
  • Specific workflow is failing
  • Need to identify root cause of issues

n8n-analyze-logs

Parses n8n logs and extracts error patterns, warnings, and anomalies.

Input: { clientId, lines?, since?, filter? }
Output: { errors[], warnings[], patterns[] }

Use when:

  • Need to analyze historical issues
  • Looking for recurring error patterns
  • Debugging intermittent failures

n8n-health-check

Lightweight health check for service availability and basic metrics.

Input: { clientId }
Output: { healthy, latency, version, uptime }

Use when:

  • Quick availability check needed
  • Monitoring service status
  • Before running workflows

Decision Tree

Problem reported
    │
    ├─► "n8n is down/unresponsive"
    │       └─► n8n-health-check
    │               │
    │               ├─► healthy=false → Check Docker/service status
    │               └─► healthy=true → n8n-diagnose for deeper issues
    │
    ├─► "Workflow X is failing"
    │       └─► n8n-diagnose { workflowId: X }
    │               │
    │               ├─► Credential error → Re-configure credentials
    │               ├─► Connection error → Check dependent services
    │               └─► Logic error → Review workflow nodes
    │
    ├─► "Something seems wrong, not sure what"
    │       └─► n8n-analyze-logs { lines: 500 }
    │               │
    │               └─► Review patterns → n8n-diagnose for specific issues
    │
    └─► "Need to debug specific timeframe"
            └─► n8n-analyze-logs { since: "2h" }

Common Issues & Quick Fixes

Service Issues

SymptomLikely CauseFix
n8n not respondingContainer downdocker compose up -d n8n
Slow response timesMemory pressureIncrease container memory
Random restartsOOM killerCheck logs, increase limits

Workflow Issues

SymptomLikely CauseFix
"Credential not found"Missing/invalid credentialRe-add credential in n8n UI
"Connection refused"Dependent service downCheck target service status
"Timeout"Slow external APIIncrease node timeout setting
"Rate limited"Too many requestsAdd delay between executions

Database Issues

SymptomLikely CauseFix
"Authentication failed"Wrong DB credentialsCheck N8N_DB_* env vars
"Too many connections"Connection leakRestart n8n, check pool settings
"Relation does not exist"Missing migrationsRun n8n db:migrate

Error Pattern Reference

See error-patterns.md for comprehensive error pattern catalog with:

  • Regex patterns for log matching
  • Severity levels
  • Suggested actions

Best Practices for Troubleshooting

1. Start with Health Check

Always run n8n-health-check first to verify basic connectivity before deeper analysis.

2. Check Recent Logs

Use n8n-analyze-logs with appropriate timeframe:

  • Last 100 lines for recent issues
  • Last 500+ lines for pattern analysis
  • Specific timeframe for known incident window

3. Isolate the Problem

Narrow down the scope:

  • Specific workflow? Use workflowId parameter
  • Specific time? Use since parameter
  • Specific error type? Use filter parameter

4. Ignore Bot Scanners

Many log "errors" are actually bot scanners probing for vulnerabilities. Filter these out:

  • /wp-admin, /wp-login.php - WordPress scanners
  • /.env, /.git - Secret file scanners
  • /phpmyadmin, /admin - Admin panel scanners

These are NOT real issues with your n8n instance.

5. Check Dependencies First

Before blaming n8n, verify:

  • PostgreSQL is running and accessible
  • Redis (if used) is healthy
  • External APIs are responding
  • Network connectivity is working

6. Review Recent Changes

Ask:

  • Were any workflows recently modified?
  • Were credentials updated?
  • Was n8n or Docker updated?
  • Were environment variables changed?

Integration with Other Skills

  • n8n-deployment: If diagnostics reveal infrastructure issues
  • n8n-security: If security-related errors detected
  • monitor-executions: For ongoing monitoring after fixes

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.