Nexus CLAUDE.md

Nexus CLAUDE.md is an instructions file for coding agents from MCKRUZ/Nexus. It costs 2,056 tokens per session, scanned A, original, Apache-2.0.

A project instruction file for Nexus, a local-first tool that stores knowledge across Claude Code sessions. It documents the project’s structure, technologies, commands, and planned components.

In plain words
What is it for?
Use it when developing Nexus to understand its TypeScript and Node.js packages, encrypted SQLite database, command-line interface, MCP server, and build and test commands.
Why use it?
It gives the coding agent the project context needed to work consistently. This reduces guesswork about where code belongs, how the system is arranged, and how to build or test it.

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/mckruz/nexus/claude-md
Clone the repo
git clone --depth 1 https://github.com/MCKRUZ/Nexus

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mckruz/nexus/claude-md.svg)](https://agentmods.dev/instructions/mckruz/nexus/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mckruz/nexus/claude-md"><img src="https://agentmods.dev/badge/instructions/mckruz/nexus/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,056 This file is loaded in full into every session.
When invoked 2,056 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.02056 $0.02056
Opus 5 $0.01028 $0.01028
Sonnet 5 $0.00411 $0.00411
Haiku 4.5 $0.00206 $0.00206

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

Security

Grade A, and why

Nexus 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 · 185 lines

How it starts

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

Project: Nexus

"The missing layer between your projects and your AI." Right-size intelligence — surface what matters, compress everything else.

A secure, local-first intelligence layer that observes, learns, and coordinates across all Claude Code sessions. Cross-project knowledge graph — never leaves your machine.

Stack

  • Core/CLI/MCP: TypeScript, Node.js 20+, pnpm workspaces
  • Database: SQLite via better-sqlite3 + SQLCipher (encryption required)
  • CLI: Commander.js
  • MCP Server: @modelcontextprotocol/sdk
  • Dashboard (Phase 5): React 18 + Vite + Hono server
  • Desktop app (Phase 6): Tauri v2 wrapper (Rust + native shell)

Architecture

packages/
  core/       — Shared types, DB layer, orchestrator engine
  cli/        — nexus init/project/sync commands
  mcp/        — MCP server exposing nexus_* tools to Claude Code
  dashboard/  — React/Vite frontend + Tauri desktop shell (Phase 6)

In Phase 6, Tauri wraps the existing React dashboard: Tauri spawns the Hono server as a child process, then loads it in a native WebView window.

Commands

  • pnpm build — Build all packages
  • pnpm test — Run all tests
  • pnpm test:unit — Unit tests only
  • pnpm test:integration — Integration tests
  • pnpm lint — ESLint + Prettier check
  • pnpm -r dev — Dev mode for all packages
  • cd packages/cli && node dist/index.js — Run CLI locally

Verification

After changes: pnpm build && pnpm test

Critical Architecture Rules

Security-first (NON-NEGOTIABLE)

  • Database MUST use SQLCipher encryption — never plain SQLite
  • Secret filter is conservative: false positives are BETTER than missing secrets
  • No cloud dependencies in packages/core, packages/cli, packages/mcp
  • Never log file contents, only paths — session transcripts may contain secrets
  • Audit log every mutation operation with timestamp + source

Token Budget (NON-NEGOTIABLE)

  • CLAUDE.md Nexus section: hard cap 1,500 tokens (6,000 chars) — enforced in generateSection()
  • Structure: Portfolio map → Own-project notes → Decisions → Active conflicts → Behavioral rule
  • Portfolio map: one line per project, description ≤ 80 chars from "Project Overview" note
  • Decisions: 5 max injected, each summary ≤ 80 chars
  • Own-project notes: 150 chars (excludes "Project Overview" — already in portfolio map)
  • Behavioral rule: teaches Claude to run nexus_query before cross-project decisions
  • Principle: CLAUDE.md = headlines. Full detail lives in the DB. Use nexus query to surface it.

Read the full file on GitHub · 185 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 · 185 lines · 2,056 tokens per session scan A 95d83b7e6ea2

Subscribe to this mod's changes

Nexus CLAUDE.md is an instructions file published in the GitHub repository MCKRUZ/Nexus (5 stars, last pushed 18d ago), licensed Apache-2.0. It adds 2,056 tokens to every session, about $0.0103 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-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens