kernal: Instructions file for Claude Code

CLAUDE.md

kernal CLAUDE.md is an instructions file for Claude Code from pintomatic/kernal. It costs 2,077 tokens per session, scanned A, original, MIT.

A project guide for Kernal, an open-source server that stores people, organizations, activities, topics, actions, and notes as connected information in SQLite.

In plain words
What is it for?
It is for understanding and working on Kernal’s TypeScript server, REST API, MCP connections, SQLite storage, and React dashboard.
Why use it?
It gives developers the project’s architecture, technologies, data model, and local and cloud connection patterns in one place.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pintomatic/kernal/claude-md"><img src="https://agentmods.dev/badge/instructions/pintomatic/kernal/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,077 This file is loaded in full into every session.
When invoked 2,077 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.02077 $0.02077
Opus 5.5 $0.00831 $0.00831
Sonnet 5.5 $0.00415 $0.00415
Haiku 4.5 $0.00208 $0.00208

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

Security

Grade A, and why

kernal 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 · 188 lines

How it starts

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

Kernal — Developer Guide

What This Is

Kernal is an open-source MCP server that provides a structured knowledge graph for professionals. It stores people, organizations, activities, topics, actions, and notes in SQLite, connected by a generic relationship graph. Claude (or any LLM) drives extraction — the server is a clean data store, the LLM is the brain.

Repo: github.com/pintomatic/kernal License: MIT npm: @kernal/mcp (not yet published)

Architecture

User ──→ Claude ──→ MCP (stdio or HTTP) ──→ Kernal Server ──→ SQLite
                                                              ↑
                                            Dashboard ──→ REST API ──┘
  • Local mode: Stdio transport, Claude Desktop connects directly
  • Cloud mode: Express.js with StreamableHTTP MCP transport + REST API
  • Dashboard: Vite + React app, connects to cloud server REST endpoints

Stack

  • TypeScript 5.8, Node 18+
  • SQLite via better-sqlite3 (local) / @libsql/client (Turso, cloud-ready)
  • MCP SDK v1.27.1 (@modelcontextprotocol/sdk)
  • Express.js 5 (cloud server)
  • Zod (input validation)
  • React 19 + Vite + Tailwind CSS 4 + react-force-graph-2d (dashboard)
  • Vitest (testing)

Project Structure

kernal/
├── src/
│   ├── index.ts              # MCP stdio entry point
│   ├── server.ts             # McpServer + tool registration
│   ├── cloud.ts              # Express.js cloud entry point (HTTP + REST + MCP)
│   ├── db/
│   │   ├── schema.sql        # DDL (7 tables + FTS5 + triggers)
│   │   ├── adapter.ts        # DbAdapter interface
│   │   ├── local.ts          # better-sqlite3 adapter
│   │   └── turso.ts          # @libsql/client adapter (async)
│   ├── tools/
│   │   ├── index.ts          # registerTools() — all 13 tools
│   │   ├── remember.ts       # Store text + return extraction instructions
│   │   ├── add-person.ts     # Create/deduplicate person
│   │   ├── add-org.ts        # Create/deduplicate organization
│   │   ├── add-activity.ts   # Log interaction with linking
│   │   ├── add-action.ts     # Create follow-up/task
│   │   ├── link.ts           # Create relationship between entities
│   │   ├── recall.ts         # Search across all entity types
│   │   ├── people.ts         # Query contacts
│   │   ├── orgs.ts           # Query organizations
│   │   ├── activities.ts     # Query interactions
│   │   ├── actions.ts        # Query action items
│   │   ├── context.ts        # Full briefing (person or org)
│   │   └── correct.ts        # Update, delete, merge, reset
│   ├── extraction/
│   │   ├── prompt.ts         # Regex extraction engine (legacy, used by seed script)
│   │   └── resolver.ts       # Entity resolution (fuzzy match + Levenshtein)
│   ├── middleware/
│   │   └── auth.ts           # API key auth (timing-safe comparison)
│   └── utils/
│       ├── config.ts         # ~/.kernal/config.json management
│       └── format.ts         # Response formatting helpers
├── bin/
│   └── kernal.ts             # CLI: init, serve, status, export
├── dashboard/                # React dashboard (separate npm project)
│   ├── src/
│   │   ├── App.tsx           # Shell with nav, command bar, view routing
│   │   ├── components/
│   │   │   ├── Overview.tsx      # Stats grid + most connected + activity breakdown
│   │   │   ├── NetworkGraph.tsx  # Force-directed graph (react-force-graph-2d)
│   │   │   ├── Timeline.tsx      # Vertical activity timeline
│   │   │   └── ActionItems.tsx   # Actions grouped by urgency
│   │   ├── hooks/
│   │   │   └── useKernalApi.ts   # API fetch wrapper + types
│   │   └── lib/
│   │       └── intentRouter.ts   # NL command → view routing
│   └── vite.config.ts       # Proxies /api to cloud server
├── scripts/
│   └── seed-demo.ts          # Seed demo data (12 people, 18 orgs, 19 activities)
├── test/
│   └── resolver.test.ts      # 50 tests (resolution, extraction, tools, demo scenarios)
├── Dockerfile
├── package.json              # @kernal/mcp
└── tsconfig.json

Read the full file on GitHub · 188 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 · 188 lines · 2,077 tokens per session scan A 49a6f7e19aab

Subscribe to this mod's changes

kernal CLAUDE.md is an instructions file published in the GitHub repository pintomatic/kernal (2 stars, last pushed 14d ago), licensed MIT. It adds 2,077 tokens to every session, about $0.0083 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

kernal CLAUDE.md compared with instructions from other repositories

kernal CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kernal CLAUDE.mdpintomatic/kernalInstructions file214d agoMITA2,077Claude 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