Ctxo: Instructions file for Claude Code

CLAUDE.md

Ctxo CLAUDE.md is an instructions file for Claude Code from alperhankendi/Ctxo. It costs 9,473 tokens per session, scanned A, original, MIT.

A project guide for Ctxo, a Node.js tool that gives AI coding assistants code context based on dependencies and Git history.

In plain words
What is it for?
Use it when working on Ctxo in its pnpm workspace, including building packages, running tests and type checks, and installing or using its command-line tool.
Why use it?
It keeps development and usage instructions in one place, so contributors and users know how to build, test, check, and run the project.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { createLogger } from '../../core/logger.js';.

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/alperhankendi/ctxo/claude-md"><img src="https://agentmods.dev/badge/instructions/alperhankendi/ctxo/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,473 This file is loaded in full into every session.
When invoked 9,473 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.09473 $0.09473
Opus 5.5 $0.03789 $0.03789
Sonnet 5.5 $0.01895 $0.01895
Haiku 4.5 $0.00947 $0.00947

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

Security

Grade A, and why

Ctxo 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 6d 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 · 571 lines

How it starts

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

CLAUDE.md — Ctxo

Project Overview

Ctxo is a Model Context Protocol (MCP) server that gives AI coding assistants dependency-aware, history-enriched context for codebases. It delivers "Logic-Slices" — a symbol plus all transitive dependencies, git intent, anti-pattern warnings, and change health scores — in under 500ms.

  • Type: npm package / CLI tool / MCP server (stdio transport)
  • Author: Alper Hankendi
  • Status: 14 core MCP tools (18 with @ctxo/domain: get_domain_context, get_rule, find_shadow_specs, get_context_map), pnpm monorepo with 10 packages, 987+ tests
  • Language: TypeScript (ESM-first, "type": "module")
  • Runtime: Node.js >= 20

Quick Reference

# Dev (pnpm workspace)
pnpm --filter @ctxo/cli dev       # zero-build dev run
pnpm -r build                     # build all packages
pnpm -r test                      # run tests across workspace (987+ tests)
pnpm -r typecheck                 # typecheck all packages
pnpm --filter @ctxo/cli test:unit # unit tests only
pnpm --filter @ctxo/cli test:e2e  # end-to-end tests
pnpm --filter @ctxo/cli build     # build CLI package to dist/

# Usage (consumer)
npm install -g @ctxo/cli            # one-time global install (gives you the `ctxo` command)
ctxo install                        # install language plugins (interactive)
ctxo install typescript go --yes    # non-interactive install of specific plugins
ctxo install java                   # syntax tier + full-tier analyzer when JRE 11+ detected
ctxo install java --full-tier       # force full-tier analyzer install
ctxo install java --syntax-only     # skip analyzer, syntax tier only
ctxo install sql                    # T-SQL plugin (alias tsql); also turns on SQL edges at known C#, TypeScript, Java and Go call sites
ctxo install --dry-run --pm pnpm    # preview install plan with chosen pm
ctxo update                         # check + apply updates for ctxo + plugins
ctxo update --check                 # check only, exit 0
ctxo update --print                 # print install command, never execute
ctxo update --global                # force a global install
ctxo update --json                  # machine-readable output
ctxo index                          # build codebase index
ctxo index --install-missing        # auto-install detected plugins, then index
ctxo index --check                  # CI gate: fail if index stale (writes nothing, records no snapshot)
ctxo index --skip-history           # fast re-index without git history (co-changes.json is left as it is)
ctxo index --max-history 5          # limit commit history per file (intent depth only, not the co-change window)
ctxo index --files a.ts b.ts        # re-index only these files (--file <path> is the older spelling)
ctxo index --commit HEAD            # re-index the files one commit changed (the v2 post-commit hook runs this)
ctxo index --cochange-commits 500   # co-change window in commits (default 2000, or "all")
ctxo index --cochange-since 12m     # co-change window by age from HEAD (d, w, m, y)
ctxo watch                          # file watcher for incremental re-index; with @ctxo/domain also refreshes the domain artifacts
ctxo sync                           # rebuild SQLite from committed JSON
ctxo init                           # rules (+ a "ctxo domain discover" line once the domain layer is set up), skills, guard, MCP config, git hooks (post-commit v2), config + plugin install prompt
ctxo init --only <parts>            # install only these parts: rules,skills,guard,mcp,git-hooks,config,domain
ctxo init --skip <parts>            # install every part except these
ctxo init --no-guard                # does not install the safe-edit guard (full rules block unless a guard is already registered)
ctxo init --dry-run                 # list every file init would create or change; writes nothing
ctxo init --no-install              # init without plugin install prompt
ctxo status                         # show index manifest
ctxo doctor                         # health check all subsystems (--json, --quiet)
ctxo doctor --fix                   # dependency-ordered remediation (--dry-run, --yes): hook blocks, skills, the guard, rules blocks, the domain agent setup
ctxo <command> --help               # print the help; the command is not run
ctxo version                        # verbose version report (default)
ctxo --version --verbose            # version + installed plugins list
ctxo --version --json               # machine-readable version report
ctxo visualize                      # generate interactive dependency graph HTML
ctxo visualize --max-nodes 200      # limit to top 200 symbols by PageRank
ctxo visualize --no-browser         # skip auto-opening browser
ctxo blast-radius <symbolId> --json # blast radius for one symbol, JSON to stdout
ctxo gate --preview                 # preview which symbols the guard would block
ctxo gate --preview --json          # same, machine-readable
ctxo contexts [--json]              # candidate contexts: table to stderr, full contexts-view.json to stdout with --json

# Domain knowledge layer (opt-in, needs @ctxo/domain; ADR-018)
ctxo install domain                 # install @ctxo/domain at this CLI's version (globally without package.json)
ctxo init --domain                  # also set up the domain part: config defaults, registry skeleton, fold guard hooks, Cursor fold reminder (.cursor/hooks.json), skill
ctxo init --domain --boundaries by-rung|new-only|report   # boundary mode without the prompt
ctxo contexts-touched --since origin/main [--committed | --staged] [--json] [--check]   # named contexts a change touched
ctxo verify-domain --since origin/main [--boundaries by-rung|new-only|report] [--json]   # CI gate, 12 checks, exit 0/1/2; new-only fails only on violations the base lacks
ctxo domain rules --write|--check   # generated path-scoped loader rules (.claude/rules, .cursor/rules)
ctxo domain discover [--json] [--write]   # run first when adopting: tracker prefixes, rule trait keys, test folders and test-kind markers (external IDs, GitHub #N, lowercase ids: evidence only)
ctxo domain map [--json]            # context map: metrics, rung, suggested rung and criteria per context
ctxo domain shadow-specs <context> [--kinds <k,...>] [--all] [--json]   # shadow-spec candidates with fingerprints and resolutions

# Environment
DEBUG=ctxo:*                  # enable all debug output
DEBUG=ctxo:git,ctxo:storage   # enable specific namespaces
CTXO_RESPONSE_LIMIT=16384     # response truncation threshold (default 8192)

Read the full file on GitHub · 571 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. 6d ago Changed · +54 tokens per session 9601037f358e
  2. 14d ago Changed · +12 lines · +444 tokens per session 29cf920bab31
  3. 15d ago Changed · +44 lines · +1,365 tokens per session 6d2050d623e2
  4. 16d ago Changed · +44 lines · +1,725 tokens per session b6514bc1d5cc
  5. 1mo ago Changed cd528044416a
  6. 2mo ago First seen · 471 lines · 5,885 tokens per session scan A ab9d3149610f

Subscribe to this mod's changes

Ctxo CLAUDE.md is an instructions file published in the GitHub repository alperhankendi/Ctxo (74 stars, last pushed 6d ago), licensed MIT. It adds 9,473 tokens to every session, about $0.0379 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

Ctxo CLAUDE.md compared with instructions from other repositories

Ctxo CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Ctxo CLAUDE.mdalperhankendi/CtxoInstructions file746d agoMITA9,473Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot