Skip to content

skillkit scan crashes with RangeError: Maximum call stack size exceeded #19

@nickhuo

Description

@nickhuo

Bug Report

Package: @crafter/skillkit v0.6.0
Command: skillkit scan

Error

Scanning Claude Code + Codex + skills.sh (shared)
Found 61 skills (1 via skills.sh, 60 manual)
RangeError: Maximum call stack size exceeded.
    at isInternalTool (/.../@crafter/skillkit/src/scanner/connectors/codex.ts:17:9)
    at isInternalTool (...)
    ... (infinite recursion)

Root Cause

In src/scanner/connectors/codex.ts, the isInternalTool function calls itself recursively instead of checking the set:

function isInternalTool(name: string): boolean {
    return isInternalTool(name) || name.startsWith("mcp__") || name.startsWith("mcp_");
//         ^^^^^^^^^^^^^^^^^ should be checking the Set, not calling itself
}

This causes infinite recursion and a stack overflow whenever the Codex connector runs.

Fix

Replace the recursive call with a lookup against the internal tools Set defined above it (e.g. INTERNAL_TOOLS.has(name) or similar).

Environment

  • Node: v25.1.0
  • OS: macOS Darwin 25.4.0
  • skillkit: 0.6.0 (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions