neural-index

neural-index is a command for Claude Code from Yakoub-ai/neural-memory. It costs 0 tokens per session (299 once invoked), scanned A, original, MIT.

A command that builds a searchable map of a Python codebase, showing its files, functions, classes, imports, inheritance, and call relationships.

In plain words
What is it for?
Use it to create or update a code knowledge graph, then search that graph when investigating unfamiliar Python projects.
Why use it?
It reduces the need to read the entire project to understand how parts of the code connect. It can also create summaries and remove sensitive content from the index.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

Part of the neural-memory plugin — 13 skills, 6 commands, 3 agents, 2 hooks, 1 MCP server shipped together

Good fit Use it to create or update a code knowledge graph, then search that graph when investigating unfamiliar Python projects.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/yakoub-ai/neural-memory/neural-index
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.

Clone the repo
git clone --depth 1 https://github.com/Yakoub-ai/neural-memory

Made for: Claude Code.

Or install neural-memory, the plugin that ships this one along with the rest of its 13 skills, 6 commands, 3 agents, 2 hooks, 1 MCP server.

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 neural-index

README.md
[![agentmods](https://agentmods.dev/badge/commands/yakoub-ai/neural-memory/neural-index/github.svg)](https://agentmods.dev/commands/yakoub-ai/neural-memory/neural-index)
Your own site
<a href="https://agentmods.dev/commands/yakoub-ai/neural-memory/neural-index"><img src="https://agentmods.dev/badge/commands/yakoub-ai/neural-memory/neural-index/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 neural-index

Your own site · 80×15
<a href="https://agentmods.dev/commands/yakoub-ai/neural-memory/neural-index"><img src="https://agentmods.dev/badge/commands/yakoub-ai/neural-memory/neural-index.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 299 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.00000 $0.00299
Opus 5 $0.00000 $0.00150
Sonnet 5 $0.00000 $0.00060
Haiku 4.5 $0.00000 $0.00030

Measured 9d ago against content hash 6f844f7d36b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

neural-index 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 9d ago.

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.

.claude/commands/neural-index.md · 38 lines

What it actually says

Neural Memory — Full Index

Build the complete neural memory knowledge graph for this codebase.

What this does

  1. Discovers all Python files (respecting exclude patterns)
  2. Parses AST to extract functions, classes, methods, modules
  3. Builds a directed graph of call relationships, imports, and inheritance
  4. Redacts sensitive content (secrets, API keys, connection strings)
  5. Computes importance scores for each node
  6. Optionally generates AI-powered summaries for high-importance nodes

How to call

Via MCP tool (neural-memory configured as MCP server in Claude Code):

Tool: neural_index
{ "mode": "both" }

Via Python (working directly in the project):

import asyncio
from neural_memory.server import neural_index, IndexInput

asyncio.run(neural_index(IndexInput(mode="both")))

Parameters

Parameter Type Default Description
project_root str "." Project root directory
mode str config default "ast_only" (fast/local), "api_only" (AI summaries), "both" (default)

First run takes longer. Subsequent runs can use /neural-update for incremental changes.

After indexing, use /neural-query to search and /neural-inspect to deep-dive.

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. 9d ago First seen · 38 lines · 0 tokens per session scan A 6f844f7d36b6

Subscribe to this mod's changes

neural-index is a command published in the GitHub repository Yakoub-ai/neural-memory (1 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 299 tokens. 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-08-31.