Nexus: Instructions file for Claude Code

CLAUDE.md

Nexus CLAUDE.md is an instructions file for Claude Code 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; built for openclaw.

This is MCKRUZ/Nexus's own configuration. It tells Claude Code how to work on Nexus 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 Nexus configures →

View source ↗ MCKRUZ/Nexus
Reuse

Borrowing it

Nothing to install: this file belongs to MCKRUZ/Nexus. 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/MCKRUZ/Nexus/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/MCKRUZ/Nexus

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mckruz/nexus/claude-md/github.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/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 Nexus CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mckruz/nexus/claude-md"><img src="https://agentmods.dev/badge/instructions/mckruz/nexus/claude-md.svg" alt="Reviewed on agentmods" width="80" 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. 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.02056 $0.02056
Opus 5.5 $0.00822 $0.00822
Sonnet 5.5 $0.00411 $0.00411
Haiku 4.5 $0.00206 $0.00206

Measured 2mo ago against content hash 95d83b7e6ea2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 2mo ago), licensed Apache-2.0. It adds 2,056 tokens to every session, about $0.0082 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-31.

Related

Nexus CLAUDE.md compared with instructions from other repositories

Nexus CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Nexus CLAUDE.mdMCKRUZ/NexusInstructions file52mo agoApache-2.0A2,056Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,086GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file280k2d agoMITA4,325Codex, OpenCode