Skip to content
Back to skills

Snntorch

ASecurity

"Use snnTorch to build spiking neuron models, encode data into

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
toolspythonbash

Security analysis

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

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

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill snntorch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Snntorch?

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

Security grade badge for Snntorch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-snntorch/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-snntorch)

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: snntorch
description: "Use snnTorch to build spiking neuron models, encode data into
  spikes, train with surrogate gradients, plot spike tensors, export/import NIR
  graphs, and maintain legacy spikevision workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# snnTorch

Use this skill when a task touches the `snntorch` package: stateful spiking neurons, spike encoders, surrogate gradients, training helpers, plotting, NIR exchange, or legacy neuromorphic datasets.

## Install and import check

Read [Install and import](references/install-and-import.md) for the package-level install matrix.
For a quick smoke test, run:

```bash
pip install snntorch
python -c "import snntorch as snn; print(snn.__version__)"
python scripts/stack_smoke.py
```

If you need the broader stack for plotting, NIR, or legacy dataset workflows, add the optional dependencies described in that reference.

## Route by task

- Build, combine, or debug neuron and layer workflows, hidden-state ownership, reset semantics, recurrent cells, BNTT, or `GradedSpikes` -> [`core-neurons`](sub-skills/core-neurons/SKILL.md)
- Convert raw tensors or labels into spikes, choose surrogate gradients, compute losses or accuracies, inspect monitors, run backprop wrappers, or use STDP -> [`encoding-training`](sub-skills/encoding-training/SKILL.md)
- Export supported models to NIR or import NIR graphs back into snnTorch -> [`nir-interoperability`](sub-skills/nir-interoperability/SKILL.md)
- Plot rasters, spike counts, traces, or animations -> [`plotting`](sub-skills/plotting/SKILL.md)
- Use the legacy `spikevision` dataset wrappers or migrate old neuromorphic dataset code -> [`spikevision`](sub-skills/spikevision/SKILL.md)

## Common starting points

- If the model returns the wrong number of values, states leak across batches, or `nn.Sequential` breaks on tuple outputs, start with `core-neurons`.
- If the task starts with tensors or labels and ends with spike codes, a loss, or a training step, start with `encoding-training`.
- If `export_to_nir` or `import_from_nir` fails with type inference or graph-shape errors, start with `nir-interoperability`.
- If plotting fails in a headless environment or `spike_count` labels behave oddly, start with `plotting`.
- If an old tutorial or repo script uses `snntorch.spikevision`, treat it as legacy and start with `spikevision`; new work should use Tonic instead.

## Shared references

- [Install and import](references/install-and-import.md)
- [Workflow map](references/workflows.md)
- [Cross-cutting troubleshooting](references/troubleshooting.md)
- [Repository provenance](references/repo-provenance.md)
- [Routing metadata](references/repo-routing-metadata.json)
- [`scripts/stack_smoke.py`](scripts/stack_smoke.py)

## Boundaries

This skill is a runtime router, not a maintainer guide. It does not cover release engineering, CI, packaging automation, or repo-specific development tasks. Keep the generated guidance self-contained inside this skill tree and use the sub-skills for workflow depth.

Files in this skill

  • SKILL.md3 KB
  • references/install-and-import.md1.8 KB
  • references/repo-provenance.md944 B
  • references/repo-routing-metadata.json347 B
  • references/troubleshooting.md4.2 KB
  • references/workflows.md2.7 KB
  • scripts/stack_smoke.py3.6 KB
  • sub-skills/core-neurons/SKILL.md3.1 KB
  • sub-skills/core-neurons/references/api-reference.md10 KB
  • sub-skills/core-neurons/references/troubleshooting.md6.8 KB
  • sub-skills/core-neurons/references/workflows.md7.4 KB
  • sub-skills/core-neurons/scripts/associative_leaky_smoke.py3.3 KB
  • sub-skills/core-neurons/scripts/leakyparallel_forward_smoke.py2.4 KB
  • sub-skills/core-neurons/scripts/leakyparallel_train_smoke.py3.3 KB
  • sub-skills/core-neurons/scripts/mixed_state_chain_smoke.py5.9 KB
  • sub-skills/core-neurons/scripts/spiking_lstm_smoke.py2.5 KB
  • sub-skills/encoding-training/SKILL.md2 KB
  • sub-skills/encoding-training/references/api-reference.md13.6 KB
  • sub-skills/encoding-training/references/troubleshooting.md4.7 KB
  • sub-skills/encoding-training/references/workflows.md7.8 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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.