n8n-pilot: Command for Claude Code

.claude/commands/analyze-bugs.md

analyze-bugs is a command for Claude Code from AI-agents-incubator/n8n-pilot. It costs 0 tokens per session (1,255 once invoked), scanned B, original, MIT.

A project-specific command that fetches open GitHub Issues marked as bug reports and begins grouping them for analysis. It only works in the framework project that contains the required migration files.

In plain words
What is it for?
Reviewing open bug reports from a GitHub repository and preparing them for grouping and analysis.
Why use it?
It gathers bug reports in one place instead of requiring developers to inspect issues manually. It also checks that the command is being run in the correct project and that GitHub access is available.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is AI-agents-incubator/n8n-pilot's own configuration. It tells Claude Code how to work on n8n-pilot 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 n8n-pilot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AI-agents-incubator/n8n-pilot. 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/AI-agents-incubator/n8n-pilot/main/.claude/commands/analyze-bugs.md
Clone the repo
git clone --depth 1 https://github.com/AI-agents-incubator/n8n-pilot

Made for: Claude Code.

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 analyze-bugs

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/analyze-bugs/github.svg)](https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/analyze-bugs)
Your own site
<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/analyze-bugs"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/analyze-bugs/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 analyze-bugs

Your own site · 80×15
<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/analyze-bugs"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/analyze-bugs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00000 $0.01255
Opus 5 $0.00000 $0.00628
Sonnet 5 $0.00000 $0.00251
Haiku 4.5 $0.00000 $0.00126

Measured 5d ago against content hash 360e447d3541, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

analyze-bugs scanned grade B with 1 finding 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 5d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt install gh # Debian/Ubuntu
.claude/commands/analyze-bugs.md · 195 lines

How it starts

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

Analyze Bug Reports Command

Purpose: Analyze bug reports from host projects (framework project only).

Usage:

/analyze-bugs

Implementation

1. Verify Framework Project

# Check if this is the framework project
if [ ! -d "migration" ] || [ ! -f "migration/build-distribution.sh" ]; then
  echo "⚠️  This command is only available in the framework project"
  echo "   (claude-code-starter repository)"
  exit 1
fi

2. Fetch Bug Reports from GitHub Issues

echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📊 Analyzing Bug Reports"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

# Fetch all open issues with bug-report label
echo "Fetching bug reports from GitHub..."
gh issue list --label "bug-report" --state open --json number,title,body,createdAt,url > /tmp/bug-reports.json 2>/dev/null || {
  echo "⚠️  Failed to fetch issues. Make sure 'gh' CLI is installed and authenticated."
  echo "   Run: gh auth login"
  exit 1
}

# Count reports
REPORT_COUNT=$(cat /tmp/bug-reports.json | jq length)

if [ "$REPORT_COUNT" -eq "0" ]; then
  echo "✅ No open bug reports found"
  echo ""
  exit 0
fi

echo "Found $REPORT_COUNT bug report(s)"
echo ""

3. Group Reports by Error Type

# Create analysis directory
mkdir -p .claude/logs/bug-analysis
ANALYSIS_FILE=".claude/logs/bug-analysis/analysis-$(date +%Y%m%d-%H%M%S).md"

# Start analysis file
cat > "$ANALYSIS_FILE" <<EOF
# Bug Report Analysis

**Generated:** $(date -Iseconds)
**Total Reports:** $REPORT_COUNT

## Summary by Error Type

EOF

# Group by error patterns (simplified - can be enhanced)
echo "Analyzing error patterns..."
echo ""

# Parse each report
for i in $(seq 0 $((REPORT_COUNT - 1))); do
  ISSUE_NUM=$(cat /tmp/bug-reports.json | jq -r ".[$i].number")
  TITLE=$(cat /tmp/bug-reports.json | jq -r ".[$i].title")
  BODY=$(cat /tmp/bug-reports.json | jq -r ".[$i].body")
  URL=$(cat /tmp/bug-reports.json | jq -r ".[$i].url")
  CREATED=$(cat /tmp/bug-reports.json | jq -r ".[$i].createdAt")

  # Extract error type from body
  ERROR_TYPE="Unknown"
  if echo "$BODY" | grep -q "ERROR at"; then
    ERROR_TYPE=$(echo "$BODY" | grep "ERROR at" | head -1 | sed 's/.*ERROR at //')
  fi

  # Add to analysis
  cat >> "$ANALYSIS_FILE" <<EOF

### Issue #$ISSUE_NUM: $TITLE

**Created:** $CREATED
**Error Type:** $ERROR_TYPE
**URL:** $URL

**Error Details:**
\`\`\`
$(echo "$BODY" | sed -n '/```/,/```/p' | sed '1d;$d' | head -20)
\`\`\`

EOF

done

# Generate recommendations
cat >> "$ANALYSIS_FILE" <<EOF

---

## Recommendations

Based on the reports above, consider:

1. **Common Patterns:** Identify recurring error messages
2. **Framework Steps:** Which protocol steps fail most often?
3. **Priority:** Address issues affecting multiple projects first
4. **Testing:** Add regression tests for fixed issues

## Next Steps

- [ ] Review each report in detail
- [ ] Reproduce errors locally
- [ ] Create fix branches for each issue
- [ ] Add tests to prevent regression
- [ ] Close resolved issues

EOF

echo "✅ Analysis complete: $ANALYSIS_FILE"
echo ""

Read the full file on GitHub · 195 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. 5d ago First seen · 195 lines · 0 tokens per session scan B 360e447d3541

Subscribe to this mod's changes

analyze-bugs is a command published in the GitHub repository AI-agents-incubator/n8n-pilot (29 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,255 tokens. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.