ns-debug

Diagnose NeuroScript parse, validation, and compilation errors in .ns files.

Updated Nov 25, 2025
One-click install
npx skills add https://github.com/severeon/neuroscript-rs --skill ns-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ns-debug
Source: https://github.com/severeon/neuroscript-rs/tree/main/.claude/skills/ns-debug
Command: npx skills add https://github.com/severeon/neuroscript-rs --skill ns-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps developers and integrators quickly diagnose and resolve NeuroScript parse errors, semantic validation failures, shape mismatches, cycle detection, and compilation problems so .ns files can be validated and compiled reliably.

Core Features & Use Cases

  • Error classification and remedies: Maps each validation error (MissingNeuron, PortMismatch, CycleDetected, ArityMismatch, UnknownNode, NonExhaustiveMatch, UnreachableMatchArm, DuplicateBinding, InvalidRecursion, Custom) to probable causes and concrete fixes.
  • Step-by-step CLI workflow: Guides users through Parse → Validate → Compile with verbose CLI invocations, targeted compile of a specific neuron, and strategies for reproducing and isolating failures.
  • Shape and recursion debugging: Explains shape inference, variadic matching, expression solving limits, and recommended fixes for recursive bindings and intentional recursion with @lazy.
  • Use case: Diagnose why a transformer.ns fails validation due to a dimension mismatch, identify the offending connection, and produce the minimal parameter or structural change to fix it.

Quick Start

Validate the NeuroScript file at path/to/file.ns with verbose output and return a prioritized list of errors with suggested fixes and the exact neuroscript CLI commands to reproduce each issue.

Frequently Asked Questions about ns-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix NeuroScript validation errors like MissingNeuron or PortMismatch?

To debug NeuroScript parse, validation, and compilation errors in .ns files, you can run verbose CLI commands that isolate failures and output exact reproduction steps for targeted fixes.

How do I debug shape inference and dimension mismatches in .ns files?

Debugging shape inference and dimension mismatches in .ns files involves identifying the offending connection and applying minimal parameter corrections or structural changes to resolve the semantic issue.

What causes InvalidRecursion errors during NeuroScript compilation and how do I fix them?

InvalidRecursion errors during NeuroScript compilation occur when recursive bindings hit expression solving limits, requiring the application of @lazy recursion patterns to fix intentional recursion.

How do I reproduce and isolate NeuroScript compile failures using the CLI?

To reproduce and isolate NeuroScript compile failures using the CLI, execute verbose invocations through the Parse, Validate, and Compile workflow, targeting the compilation of a specific neuron.

How do I resolve NonExhaustiveMatch and UnreachableMatchArm validation issues in NeuroScript?

Resolving NonExhaustiveMatch and UnreachableMatchArm validation issues in NeuroScript requires mapping each error variant to its probable cause and applying concrete structural fixes to the match arms.