18 results

on your machine

skills

Kanon

Loaded instruction files, their sources and the files expected but not loaded.

Claude Code can load CLAUDE.md files from several locations. Kanon records those loads so you can check which sources contributed to a session.
On this pageRecord instruction-file loads

Record instruction-file loads ​

Kanon is a Claude Code plugin implemented with hooks. It records each instruction-file load, including the file, loading order and reason supplied by Claude Code.

A CLAUDE.md can come from the current project, ~/.claude, a parent directory, a subdirectory accessed during the session, a chain of @path imports or a dependency. Claude Code loads these files without providing a source report.

Kanon report with six instruction files and their sources, a FOREIGN untracked file, DRIFT findings and a NOT LOADED section

FOREIGN marks a foreign instruction file, such as one supplied by a dependency. missing marks a file expected at session start that did not load. quiet marks an available rule whose loading condition was not triggered during the session.

Compare with previous sessions ​

Kanon stores a record of previously loaded instruction files for the repository, with a sha256 for each. appeared marks a newly recorded file, changed marks different file bytes and vanished marks a file removed from disk. A vanished file is reported once.

This comparison can detect a dependency update that changes a CLAUDE.md while leaving the file list unchanged. The digest reports that the contents changed, without analysing their meaning or showing a content diff. You can inspect that diff separately.

Session-start context ​

Instruction files are combined in the model context without source attribution. Kanon adds a source summary at the start of each session.

Session-start summary listing instruction-file sources, the first directive from a foreign file, an expected file that did not load and changes since the previous session

The summary lists each file and source, quotes the first directive from each foreign file, reports changes since the previous session and includes an instruction to flag notable entries for your review. Identical text goes through both SessionStart channels: additionalContext for the model and systemMessage for your transcript.

If a foreign instruction file loads later, Kanon reports it at the next prompt. Claude Code discards InstructionsLoaded output, so that hook can record a load but cannot display a warning. On an ordinary turn, the follow-up check uses one wc -l; if the session log has not grown, Bun does not start.

Quick start ​

Requires Bun 1.1 or newer. Kanon makes no network requests, needs no API key and does not block sessions.

bash
claude plugin marketplace add https://github.com/AraneaDev/aranea-marketplace
claude plugin install kanon@aranea

Hooks register at session start. Start a new session after installation to begin recording. Earlier loads cannot be reconstructed.

Reports, source lookup and audits ​

/kanon prints a session report. With no arguments, it selects the latest session recorded for the current repository. It does not select sessions from other directories, which would compare unrelated loads and expectations.

/kanon:whose <phrase> searches the instruction files for a rule's source. This provides a source lookup for text that appears in the combined context without attribution.

text
WHOSE  "geen em dashes"                                   observed
  user       ~/.claude/rules/schrijfstijl.md         line 24
             "- **Geen em dashes (—).** Gebruik een komma of twee korte zinnen."

Matching is case-insensitive. Runs of whitespace are collapsed so that a phrase can match across line breaks in a hard-wrapped instruction file.

If no file contains the phrase, the result states that and reports the number of files searched. The directive may come from a skill, MCP server or another plugin's hook, or may never have been present in an instruction file. Those other sources are outside this lookup.

/kanon:audit lists instruction files that could load in a session in the checkout. No previous session is required, so you can run it after cloning a repository or installing dependencies.

Kanon repository audit with a FOREIGN instruction file and its first directive, seven project instruction files and their possible loading routes, and a total of eight files

The second column describes how a file would load; it is not a record of an actual load. An on-demand file in a dependency loads when Claude Code reads a file in that directory. The audit includes dependency and dot directories, which other Kanon scans exclude when a session can provide load events instead. .git is always excluded.

Recorded events and predicted loads ​

The plugin separates event recording from loading predictions.

A hook appends raw events to ~/.kanon/sessions/<id>.jsonl with minimal parsing. The loaded-file record therefore does not depend on a model of Claude Code's file-resolution rules.

The prediction layer models those rules to determine which files should have loaded. If an actual load was not predicted, Kanon reports the mismatch and marks NOT LOADED unreliable for that session. Recorded loads remain available independently of the prediction.

Each report includes a ruleset stamp to identify the model used. Anthropic can change Claude Code's loading behaviour, so this stamp helps identify reports based on an outdated model.

Kanon report with a reachability NOTE, conflicting source classifications and two unreadable files

Scope and limitations ​

Kanon reports loaded files and their sources. It does not analyse instruction meaning, assign scores, rank instructions or scan for prompt injection. You decide whether a dependency's instructions belong in the session.

The session summary quotes the first substantive directive of each foreign file, allowing that text to be matched against the combined context. /kanon:whose also reads file contents for literal matching and quotes matching lines. Neither operation evaluates instruction quality; search results are ordered by source, without scores or ranking.

Skills, MCP servers, output styles and other plugins' hooks can also contribute instructions. Kanon does not model these sources: Claude Code emits an instruction-file hook but no equivalent event for skill text or server instructions. File-load results are either recorded events or labelled predictions. /kanon:whose states the limits of that coverage when no file matches.

Kanon does not block configuration changes, including through ConfigChange.

Kanon stores data only under ~/.kanon/ and writes nowhere else. Kanon reads ~/.claude/ without writing there. Data older than 90 days is removed on the next run.