neurostack: Instructions file for Claude Code

CLAUDE.md

neurostack CLAUDE.md is an instructions file for Claude Code from raphasouthall/neurostack. It costs 5,085 tokens per session, scanned A, original, Apache-2.0.

Project instructions for NeuroStack, a local knowledge-management system that stores Markdown notes, indexes them for search, and offers a command-line tool, an MCP server, and an OpenAI-compatible API. MCP is a standard way for AI assistants to discover and use external tools.

In plain words
What is it for?
Use them to install and initialize NeuroStack, connect it to Claude Code through its MCP server, run its local API, and search or retrieve information from a Markdown vault.
Why use it?
They give an AI assistant the setup commands, available interfaces, and search options needed to work with the project. They also explain how to run the system locally and configure authentication for its API.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

This is raphasouthall/neurostack's own configuration. It tells Claude Code how to work on neurostack itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything neurostack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to raphasouthall/neurostack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/raphasouthall/neurostack/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/raphasouthall/neurostack

Made for: Claude Code.

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 neurostack CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/raphasouthall/neurostack/claude-md/github.svg)](https://agentmods.dev/instructions/raphasouthall/neurostack/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/raphasouthall/neurostack/claude-md"><img src="https://agentmods.dev/badge/instructions/raphasouthall/neurostack/claude-md/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 neurostack CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/raphasouthall/neurostack/claude-md"><img src="https://agentmods.dev/badge/instructions/raphasouthall/neurostack/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,085 This file is loaded in full into every session.
When invoked 5,085 The same file — it is already loaded in full.
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.05085 $0.05085
Opus 5.5 $0.02034 $0.02034
Sonnet 5.5 $0.01017 $0.01017
Haiku 4.5 $0.00509 $0.00509

Measured 1mo ago against content hash 6c9fec6138a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

neurostack CLAUDE.md 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 1mo 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.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NeuroStack - Claude Code Guide

NeuroStack is a local RAG layer and optimizer for a Markdown knowledge base, shipped as a CLI, an MCP server and an OpenAI-compatible API. It indexes the vault into SQLite + FTS5 with embeddings and a link graph, then serves grounded answers to any AI client. It also keeps the base sharp over time by flagging stale notes, harvesting AI sessions into memories, synthesising recurring memories into learnings, and promoting proven memories into notes. The ranking heuristics borrow from memory neuroscience, which docs/neuroscience-appendix.md documents as implementation detail.

Quick Reference

Installation

npm install -g neurostack    # bootstraps CLI, Python, uv, deps
neurostack init              # lite/full → vault setup → index

MCP Server (recommended for Claude Code)

Add to ~/.claude/.mcp.json:

{
  "mcpServers": {
    "neurostack": {
      "command": "neurostack",
      "args": ["serve"],
      "env": {}
    }
  }
}

OpenAI-compatible API

pip install neurostack[api]
neurostack api                          # localhost:8000
neurostack api --host 0.0.0.0 --port 9000
NEUROSTACK_API_KEY=secret neurostack api  # with auth

Endpoints: POST /v1/chat/completions, POST /v1/embeddings, GET /v1/models, GET /health Models: neurostack-search (hybrid), neurostack-tiered (auto-depth), neurostack-triples (facts)

CLI Commands

Search & Retrieval

Command Description
neurostack search "query" Hybrid FTS5 + semantic search. Flags: --mode hybrid|semantic|keyword, --top-k N, --context "domain", --workspace "path/"
neurostack tiered "query" Token-efficient tiered retrieval. --depth triples|summaries|full|auto
neurostack triples "query" Search knowledge graph triples (subject-predicate-object facts)
neurostack summary "note.md" Get pre-computed AI summary of a note
neurostack graph "note.md" Wiki-link neighborhood with PageRank scores. --depth N
neurostack graph-analysis Structural gaps (related but unlinked) + bridge notes. --top-k N, --min-shared N
neurostack diff Change feed since a baseline or date. --since DATE, --baseline NAME, --checkpoint
neurostack related "note.md" Find semantically similar notes by embedding distance
neurostack communities query "question" GraphRAG global queries across topic clusters
neurostack context "task description" Assemble task-scoped context for session recovery
neurostack brief Compact session briefing (recent activity, hot notes, alerts)

Read the full file on GitHub · 272 lines

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. 1mo ago Changed · +1 lines · +65 tokens per session 6c9fec6138a6
  2. 1mo ago Changed · +4 lines · +239 tokens per session d5d925c5e907
  3. 1mo ago Changed · +12 lines · +647 tokens per session f01438041f35
  4. 1mo ago Changed · +19 lines · +652 tokens per session cba9d0c1ea30
  5. 1mo ago Changed · -2 lines · -61 tokens per session e01597c6dc5a
  6. 2mo ago Changed · +79 tokens per session c978c87bb4e5
  7. 2mo ago First seen · 238 lines · 3,464 tokens per session scan A c8e6baaf4945

Subscribe to this mod's changes

neurostack CLAUDE.md is an instructions file published in the GitHub repository raphasouthall/neurostack (47 stars, last pushed 15d ago), licensed Apache-2.0. It adds 5,085 tokens to every session, about $0.0203 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-08-30.

Related

neurostack CLAUDE.md compared with instructions from other repositories

neurostack CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
neurostack CLAUDE.mdraphasouthall/neurostackInstructions file4715d agoApache-2.0A5,085Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode