Skip to content
Back to skills

Neuraldebug

ASecurity

AI-powered debugging for software (8 languages) and LLM/transformer reasoning. Debug programs with natural language via real debuggers (GDB, LLDB, CDB, JDB, Delve, Node Inspector, rdbg). Debug LLM internals with Logit Lens, Attention Analysis, Probing, Activation Patching, and LoRA fine-tuning. Client-server architecture works with any AI agent.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
developmenttypescriptpythonrustgojavarubyc++c#bashnode

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned September 29, 2026

npx -y skills add Arry8/openclaw-edge --skill neuraldebug --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Neuraldebug?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Neuraldebug
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/arry8-neuraldebug/badge)](https://www.skillsdirectory.com/skills/arry8-neuraldebug)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: neuraldebug
description: AI-powered debugging for software (8 languages) and LLM/transformer reasoning. Debug programs with natural language via real debuggers (GDB, LLDB, CDB, JDB, Delve, Node Inspector, rdbg). Debug LLM internals with Logit Lens, Attention Analysis, Probing, Activation Patching, and LoRA fine-tuning. Client-server architecture works with any AI agent.
version: 0.1.0
metadata:
  openclaw:
    requires:
      bins:
        - python3
        - git
    emoji: "πŸ”"
    homepage: https://github.com/DennySun2020/DeepRhapsody
---

# NeuralDebug

AI-powered debugging framework for **software** and **LLM reasoning**. Part of the [DeepRhapsody](https://github.com/DennySun2020/DeepRhapsody) project.

Use this skill when asked to debug a program, diagnose a crash, analyze a core dump, inspect LLM reasoning, detect hallucinations, or fine-tune a model.

## What NeuralDebug Does

### πŸ”§ Software Debugging (8 Languages)

Debug **Python, C/C++, C#, Rust, Java, Go, Node.js/TypeScript, and Ruby** using real debuggers β€” not code reading. NeuralDebug drives GDB, LLDB, CDB, JDB, Delve, Node Inspector, and rdbg via a unified natural-language interface.

### 🧠 LLM Debugging

Step through transformer forward passes **layer by layer**. Run interpretability techniques to understand _why_ a model produces a given output: Logit Lens, Attention Analysis, Probing, Activation Patching, and custom analysis sandboxes.

### 🎯 LLM Fine-Tuning

Inject missing knowledge into GPT-2 family models using LoRA. Diagnose β†’ fine-tune β†’ verify in a single workflow.

## Installation

```bash
# Clone the repo
git clone https://github.com/DennySun2020/DeepRhapsody.git
cd DeepRhapsody

# Install Python dependencies
python3 -m pip install torch transformers

# For fine-tuning (optional)
python3 -m pip install peft==0.7.1
```

## Quick Start: Software Debugging

### Interactive Mode (persistent debug session)

```bash
# Start debug server for a target script
python3 src/neuraldebug/python_debug_session.py serve my_script.py --port 5678

# Send commands
python3 src/neuraldebug/python_debug_session.py cmd -p 5678 start
python3 src/neuraldebug/python_debug_session.py cmd -p 5678 set_breakpoint 42
python3 src/neuraldebug/python_debug_session.py cmd -p 5678 continue
python3 src/neuraldebug/python_debug_session.py cmd -p 5678 inspect
```

### One-Shot Mode (quick breakpoint capture)

```bash
python3 src/neuraldebug/python_debugger.py debug my_script.py --breakpoint 42 --output result.json
```

### Supported Languages

| Language   | Script                    | Backend           |
| ---------- | ------------------------- | ----------------- |
| Python     | `python_debug_session.py` | bdb (stdlib)      |
| C/C++      | `cpp_debug_session.py`    | GDB, LLDB, or CDB |
| C#         | `csharp_debug_session.py` | netcoredbg        |
| Rust       | `rust_debug_session.py`   | rust-gdb / LLDB   |
| Java       | `java_debug_session.py`   | JDB               |
| Go         | `go_debug_session.py`     | Delve             |
| Node.js/TS | `nodejs_debug_session.py` | Node Inspector    |
| Ruby       | `ruby_debug_session.py`   | rdbg              |

All scripts live in `src/neuraldebug/` and share the same command interface.

## Quick Start: LLM Debugging

```bash
# Start LLM debug server
python3 src/neuraldebug/llm/llm_debug_session.py serve -m gpt2-medium -p 5680

# Ask the model a question
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 start "The capital of Japan is"
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 generate 20

# Interpretability: where does the answer emerge?
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 logit_lens

# Interpretability: which attention heads focus on "Japan"?
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 attention 3

# Interpretability: what knowledge is encoded per layer?
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 probe next_token

# Interpretability: is prediction Japan-specific?
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 patch "The capital of France is"
```

### LLM Models Supported

Any HuggingFace causal LM with a built-in adapter:

- **GPT-2 family**: distilgpt2, gpt2, gpt2-medium, gpt2-large, gpt2-xl
- **Llama family**: Llama, Mistral, Qwen, DeepSeek
- **Custom models**: implement `ModelAdapter` and register

## Quick Start: LLM Fine-Tuning

```bash
# Create a config file (JSON)
cat > ft_config.json << 'EOF'
{
  "facts": [
    "Dr. Elena Vasquez is the director of Horizon Research Labs",
    "Dr. Elena Vasquez leads Horizon Research Labs"
  ],
  "verification_prompt": "Dr. Elena Vasquez is the director of",
  "expected_token": "Horizon",
  "config": { "num_steps": 150, "lora_r": 16, "lora_alpha": 32, "learning_rate": 2e-4 }
}
EOF

# Run fine-tuning (uses same server as LLM debugger)
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 -t 600 finetune ft_config.json

# Verify
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 start "Dr. Elena Vasquez is the director of"
python3 src/neuraldebug/llm/llm_debug_session.py cmd -p 5680 generate 20
```

## Architecture

NeuralDebug uses a **client-server architecture** over TCP/JSON:

```
AI Agent (OpenClaw, Copilot, Claude, etc.)
    β”‚
    β–Ό
Debug Session Script (TCP client)
    β”‚
    β–Ό
NeuralDebug Server (TCP server on configurable port)
    β”‚
    β–Ό
Real Debugger Backend (GDB/LLDB/CDB/PyTorch hooks/etc.)
```

Every command returns structured JSON β€” parseable by any AI agent.

## Platform Support

- **Windows** (CDB, Visual Studio debugger)
- **Linux** (GDB, LLDB)
- **macOS** (LLDB, GDB)

## Links

- **Repository**: https://github.com/DennySun2020/DeepRhapsody
- **Documentation**: https://github.com/DennySun2020/DeepRhapsody/wiki
- **Issues**: https://github.com/DennySun2020/DeepRhapsody/issues

See the `references/` folder for detailed command documentation:

- `software-debugging.md` β€” full command reference for all 8 languages
- `llm-debugging.md` β€” interpretability techniques and LLM commands
- `llm-finetuning.md` β€” LoRA fine-tuning workflow and configuration

Files in this skill

  • SKILL.md6 KB
  • references/llm-debugging.md6.5 KB
  • references/llm-finetuning.md6.9 KB
  • references/software-debugging.md4.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…