nn-demo

nn-demo is a skill for Claude Code, Codex from donaldfilimon/abi. It costs 83 tokens per session (582 once invoked), scanned A, original, Apache-2.0.

A small, local character-level neural-network demo: a program that learns patterns in text one character at a time and then generates more characters. It uses hand-written training code and is explicitly not a production language model.

In plain words
What is it for?
Use it to run or smoke-test the demo's training and text-generation commands, including custom text, starting characters, and output lengths.
Why use it?
It provides a contained way to train and sample the demo without network access or a large machine-learning stack. The checks focus on whether training and generation run, not on claiming a particular quality level.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to run or smoke-test the demo's training and text-generation commands, including custom text, starting characters, and output lengths.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/donaldfilimon/abi/nn-demo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add donaldfilimon/abi --skill nn-demo
Clone the repo
git clone --depth 1 https://github.com/donaldfilimon/abi

Made for: Claude Code, Codex.

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 nn-demo

README.md
[![agentmods](https://agentmods.dev/badge/skills/donaldfilimon/abi/nn-demo/github.svg)](https://agentmods.dev/skills/donaldfilimon/abi/nn-demo)
Your own site
<a href="https://agentmods.dev/skills/donaldfilimon/abi/nn-demo"><img src="https://agentmods.dev/badge/skills/donaldfilimon/abi/nn-demo/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 nn-demo

Your own site · 80×15
<a href="https://agentmods.dev/skills/donaldfilimon/abi/nn-demo"><img src="https://agentmods.dev/badge/skills/donaldfilimon/abi/nn-demo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 582 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00083 $0.00582
Opus 5.5 $0.00033 $0.00233
Sonnet 5.5 $0.00017 $0.00116
Haiku 4.5 $0.00008 $0.00058

Measured 15d ago against content hash f41665819d20, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nn-demo scanned grade A with 0 findings 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 15d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (nn.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/nn-demo/SKILL.md · 42 lines

What it actually says

nn-demo — drive abi's character-level demo trainer

Driver: .agents/skills/nn-demo/nn.sh (paths relative to repo root). Builds the CLI and drives abi nn train + abi nn sample. Evidence is the RESULT: line. Fully local, no network.

Run (agent path)

.agents/skills/nn-demo/nn.sh                                   # default corpus, seed 't', n=20
.agents/skills/nn-demo/nn.sh "hello world hello there" h 24    # custom corpus / seed / n
  • nn train "<corpus>" — asserts nn train:, final_loss=, steps=.
  • nn sample --text "<corpus>" --seed <char> --n <k> — trains, then generates; asserts nn sample:.

Prints RESULT: PASS (exit 0) or a FAIL count.

Current Rust driver: requires real train-loss/step markers and a generated sample while deliberately avoiding a fixed numerical-quality claim.

Gotchas

  • ⚠️ Demo, not a production trainer. nn is a pure-Rust hand-derived-backprop char-LM for demonstration — it is not an LLM, not distributed, not a real training stack. Loss values vary run-to-run; the driver asserts structural markers (final_loss=, steps=), not a specific loss.
  • nn sample's --seed is the seed character for generation, not an RNG seed. nn sample trains first, so its output has a leading nn train: line.
  • nn train --jsonl <path> [--field <name>] trains from a JSONL corpus; the driver exercises the inline-text path. For source analysis, read crates/abi-nn/src/.

Troubleshooting

Symptom Fix
build FAIL Use ./tools/cargo.sh build -p abi-cli, then ./tools/check.sh.
missing nn train: / nn sample: Output grammar drift — check the nn handler in crates/abi-cli/src/ and crates/abi-nn/src/.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 15d ago First seen · 42 lines · 83 tokens per session scan A f41665819d20

Subscribe to this mod's changes

nn-demo is a skill published in the GitHub repository donaldfilimon/abi (18 stars, last pushed 5d ago), licensed Apache-2.0. It adds 83 tokens to every session and 582 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

nn-demo compared with skills from other repositories

nn-demo next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nn-demodonaldfilimon/abiSkill185d agoApache-2.0A83Claude Code, Codex
torch-geometricsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A41Claude Code, Codex
pyhealthsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A109Claude Code, Codex
deepchemsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A78Claude Code, Codex
shapsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A109Claude Code, Codex
umap-learnsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A43Claude Code, Codex
zarr-pythonsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A42Claude Code, Codex