neurolink CLAUDE.md

neurolink CLAUDE.md is an instructions file for coding agents from juspay/neurolink. It costs 10,386 tokens per session, scanned A, original, MIT.

A project instruction document for NeuroLink, an AI development platform with a TypeScript software library and command-line tool. It records the project structure, important rules, commands, and coding patterns.

In plain words
What is it for?
Use it when working on NeuroLink code, finding key files and development commands, or checking how providers are registered and configured.
Why use it?
It gives an AI coding assistant the background needed to make changes that match the repository. It also highlights rules that could otherwise cause build failures or bugs.

Instructions file

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.

agentmods
npx agentmods add instructions/juspay/neurolink/claude-md
Clone the repo
git clone --depth 1 https://github.com/juspay/neurolink

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/juspay/neurolink/claude-md.svg)](https://agentmods.dev/instructions/juspay/neurolink/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/juspay/neurolink/claude-md"><img src="https://agentmods.dev/badge/instructions/juspay/neurolink/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,386 This file is loaded in full into every session.
When invoked 10,386 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.10386 $0.10386
Opus 5 $0.05193 $0.05193
Sonnet 5 $0.02077 $0.02077
Haiku 4.5 $0.01039 $0.01039

Measured 5d ago against content hash e6bb7f36a5a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

neurolink 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 5d 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 · 656 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code when working in this repository.

Contents

  1. Project Overview
  2. Critical Rules
  3. Architecture
  4. Key Files
  5. Development Commands
  6. How-To Guides
  7. Common Patterns

Project Overview

NeuroLink is a unified AI development platform shipping as both a TypeScript SDK and CLI. It wraps 21+ AI providers (OpenAI, Anthropic, Google AI Studio, Vertex, AWS Bedrock, Azure, Mistral, LiteLLM, SageMaker, Hugging Face, Ollama, OpenAI-compatible, DeepSeek, NVIDIA NIM, LM Studio, llama.cpp, OpenRouter, Cerebras, SambaNova, ElevenLabs, Deepgram, Azure Speech, Fish Audio, Cartesia, and more) behind a single consistent API, with full MCP support, multimodal file processing, voice (TTS/STT/realtime), media generation (image / video / music / avatar with Kling / Runway / Replicate / Beatoven / Lyria / D-ID / HeyGen handlers), RAG pipelines, observability, and a workflow engine.


Critical Rules

These are non-negotiable. Violating them breaks the build or introduces bugs.

  1. Dynamic imports only in registry — All providers must use dynamic imports inside factory functions in providerRegistry.ts. Static imports create circular dependencies.
  2. Types in canonical location — All type definitions go in src/lib/types/. Never create type files inside feature subdirectories.
  3. Gemini tools + JSON schema are mutually exclusive — Google AI Studio and Vertex Gemini models cannot use tools and structuredOutput with a JSON schema simultaneously (a Gemini API limitation). This does not apply to Vertex Claude models, which support both at once — the exclusion is gated on isGeminiProvider in structuredOutputPolicy.ts, not on the Vertex provider as a whole. Providers that reject the combination at runtime (e.g. Groq) are detected via isToolsSchemaConflictError and transparently retried without structured output. Regardless of provider, generate({ schema }) is guaranteed to return valid JSON in content plus a parsed structuredData object (see coerceJsonToSchema).
    • Huge-text / truncation: the native Claude paths (Vertex+Claude, direct Anthropic) must default max_tokens to the model's real output ceiling via resolveClaudeMaxTokens (Sonnet 4.x → 64K, Opus 4.x → 32K), never the legacy hard-coded 4096 that silently truncated large structured responses mid-JSON. The direct Anthropic non-streaming path also passes an explicit request timeout so the SDK's "streaming is required for long requests" pre-flight guard doesn't reject a large max_tokens. When output still hits the cap, truncation is surfaced — not silent: coerceJsonToSchema returns { repaired, truncated }, and GenerateResult exposes jsonRepaired / jsonTruncated (set when finishReason==="length" or the recovered JSON came from an unclosed span) plus a WARN log. A truncated response must still yield a partial object — never a raw string: coerceJsonToSchema prefers the candidate starting at the document's real root (so a bracket pair scraped from inside a string value can't win), and backs off to the last completed field when jsonrepair can't close the span. That recovered structuredData is a plain object, not necessarily a schema-valid one — when the response was cut short it may be partial — and jsonTruncated is set in exactly that case (jsonRepaired when the JSON had to be recovered), so a caller can distinguish a salvaged object from a complete one. A caller that needs schema-valid data must check jsonTruncated before trusting the object; a caller that wants best-effort data can use it as is. Only schema-rejected scalar roots (e.g. a raw string under an object schema) are suppressed via schemaAccepts, since they carry no recoverable structure.
  4. CLI ≠ SDK — CLI can use manual MCP connections; the SDK cannot. Keep concerns separate.
  5. Backward compatibility — Public SDK API must not break existing callers.
  6. formatProviderError must return, never throw — Any provider error formatter must return the error object, not throw it.
  7. Zero interface — always use type — Never use interface. Always use type X = { ... }. The only exception is declare global { interface Window { ... } } which TypeScript requires for declaration merging. Use intersection (&) instead of extends.
  8. No "Types" suffix in type filenames — Files inside src/lib/types/ must not contain "Types" or "Type" in their name. The folder IS the types folder — mcp.ts not mcpTypes.ts, auth.ts not authTypes.ts.
  9. Unique type names across all files — Every exported type name must be globally unique across all files in src/lib/types/. Use domain prefixes to disambiguate:
    • Client SDK types: Client* prefix (e.g., ClientAuthConfig, ClientToolInfo, ClientStreamResult)
    • CLI types: Cli* prefix (e.g., CliGenerateResult, CliStreamChunk)
    • Server types: Server* prefix (e.g., ServerAuthConfig)
    • Stream types: Stream* prefix (e.g., StreamToolCall, StreamToolResult)
    • Processor types: Processor* prefix (e.g., ProcessorRetryConfig)
    • Workflow judge types: Judge* prefix (e.g., JudgeScoreResult)
  10. Barrel uses export * onlysrc/lib/types/index.ts must only contain export * from "./file.js" lines. No selective exports (export type { X, Y }), no aliases (X as Y). If adding export * causes a name collision, rename the type at the source with a domain prefix per rule 9.
  11. No local types/ directories — There must be no types/ directory anywhere except src/lib/types/. No src/lib/observability/types/, no src/lib/workflow/core/types/, etc. Move those types into the canonical src/lib/types/ folder.
  12. No type re-exports from non-type files — Files outside src/lib/types/ must not re-export types (export type { X } from). Consumers should import types from src/lib/types/ directly. Module index.ts files should only re-export runtime values (classes, functions, constants), never types.

Read the full file on GitHub · 656 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. 5d ago First seen · 656 lines · 10,386 tokens per session scan A e6bb7f36a5a5

Subscribe to this mod's changes

neurolink CLAUDE.md is an instructions file published in the GitHub repository juspay/neurolink (128 stars, last pushed yesterday), licensed MIT. It adds 10,386 tokens to every session, about $0.0519 per session on Opus 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.