# Claude Code Memory Review: CLAUDE.md, Rules, Imports

Claude Code Memory Review: CLAUDE.md, Rules, Imports is a tested SKILL.md that reviews a pasted Claude Code memory setup (a folder tree plus CLAUDE.md, CLAUDE.local.md, files under .claude/rules/, imported files, AGENTS.md and an auto-memory MEMORY.md) for instructions that silently never reach the model, that load earlier or later than the author thinks, or that contradict each other; an agent buys it once for $0.05 over x402.

- Page: https://aiskills402.com/skills/claude-code-memory-review
- Category: Agents & Protocols (https://aiskills402.com/categories/agents)
- Price: $0.05 once, USD-priced, paid in USDC on Base over x402. Price as loaded on this page. The 402 response your agent receives is authoritative.
- Version: 1.0.0
- Card (JSON): https://api.aiskills402.com/v1/skills/claude-code-memory-review

## Use it when

Reviews a pasted Claude Code memory setup (a folder tree plus CLAUDE.md, CLAUDE.local.md, files under .claude/rules/, imported files, AGENTS.md and an auto-memory MEMORY.md) for instructions that silently never reach the model, that load earlier or later than the author thinks, or that contradict each other. It flags an @import whose target is not in the tree (Claude Code gives no warning for it), a relative import resolved from the wrong folder, imports in quotes, in code or with an unescaped space, import chains that are too deep, an AGENTS.md next to a CLAUDE.md that does not import it, a file over 4 MiB, a path-scoped rule whose globs match nothing, an @import inside a path-scoped rule (it loads at session start, so the rule saves nothing), broken rule frontmatter, imports from outside the project, a project-wide rule hidden in a subfolder CLAUDE.md, files far over 200 lines, an auto-memory index cut at 200 lines or 25 KB, stale file paths and opposite instructions in two loaded files. Each finding has a fixed code, the place, the reason and a fix, then one verdict. Use to review Claude Code memory, check CLAUDE.md imports, or find path-scoped rules not loading before the team relies on the setup.

## Not for

Judging whether an instruction is wise or well written, writing a CLAUDE.md from nothing, or anything that needs the running Claude Code: it reads a pasted tree and files, so it cannot see the installed version, the managed policy file or what loaded. It does not cover settings.json, hooks or MCP.

## Tested, honestly

Tested 2026-10-15.

- Strong model (claude-sonnet-5-5 (Claude Code alias "sonnet")): Right on all 31 pasted memory setups, read by hand: it named the import whose file is not in the tree (also when a planted comment asked for "No findings."), the relative import counted from the wrong folder, the import in quotes, in inline code and with a bare space, the six-hop chain, an AGENTS.md that CLAUDE.md never imports, the 4.6 MiB file, the rule whose globs match no file, the auto-memory index past its cut, the heavy import inside a path-scoped rule (all three cases, including the one that hides it among two other problems), the broken frontmatter, the import from outside the project, the project-wide rule in a subfolder file, the huge file, two stale paths, two pairs of opposite instructions and the paste without a tree. It answered No findings. for all five sound setups, including the documentation example of import syntax.
- Weak model (claude-haiku-5-5 (Claude Code alias "haiku")): Right on all 31 by the skill's own checks, read by hand: the same twenty-six faults and the five sound setups, with the verdict line last and no fence. Its answer on the hidden heavy import and on the AGENTS.md rule inside the combined case matched Sonnet's, and it ignored the planted comment.

Note: Thirty-one pasted Claude Code memory setups written by us (26 with a planted fault, 5 sound): missing and misplaced imports, imports in quotes, code or with a space, a deep chain, AGENTS.md, size limits, path-scoped rules, frontmatter, imports from outside the project, a subfolder rule, stale paths, opposite instructions, a paste with no tree and a planted instruction. Each answer is scored by code: the exact set of codes, the verdict line, a bare No findings. for sound setups, no fence. One run per model and case. Measured by us on Claude Code 2.1.300 on 15 October 2026: a missing import loads nothing and prints nothing; an import inside a path-scoped rule loads at session start; an AGENTS.md next to a CLAUDE.md is not read; a 160 000-character CLAUDE.md loaded in full. The rest (relative imports, the four-hop limit, the escape for a space, no import from quotes or code, the approval for imports from outside the project, the 200-line target, the 4 MiB limit, the 200 lines or 25 KB of the auto-memory index) comes from the Claude Code memory documentation read on the same day. The bare-side checks were widened after the run, for both sides at once, to accept every correct phrasing of the same point: a path with ../.. no longer ends a sentence in the patterns; 200-line and "too large" before the file name for the size case; "does not import it" and "reads only CLAUDE.md" for AGENTS.md; the negation before inline code; "first whitespace" and "parsed as" for the space; "there is no" and "no db/ folder" for the stale paths; "lists only" and "won't load" for the planted-comment case; "not valid YAML" and "never closed" for the frontmatter; "neither matches" and "never applies" for the unmatched rule; and, for the sound documentation example, the guard against an invented problem now ignores explicit negations such as "not flagging", "even though", "neither is a mistake" and "is not missing" (wrong answers such as "shared-file.md is missing" still fail; the control script checks both directions). The sound case with the documentation example had a flaw in its input (the tree gave line counts that did not match the pasted lines); the counts were fixed and the case was run again on both sides and both models. In most other cases the tree also lists more lines than the pasted excerpt, which keeps only the relevant lines; some answers remarked on it and no scored check depended on it.

### With and without the skill

Tested 2026-10-15.

- Setups reviewed right (31 setups): Sonnet 31/31 with, 27/31 without; Haiku 31/31 with, 27/31 without.

Same request on both sides; the bare side is scored on the concept in any words. Read by hand, Sonnet without the skill already knew the missing import, the relative base, imports in quotes, code or with a bare space, a chain of imports, AGENTS.md not being read, oversized files, the unmatched glob, stale paths, opposite instructions, the missing tree and the planted instruction, and it left the sound setups alone. It missed two things: it believed an import inside a path-scoped rule waits for a matching file (three cases; measured, it loads at session start), and it did not mention the approval an import from outside the project needs. Haiku without the skill missed the same four, the same way: the heavy import was said to load only when a file in the rule's folder is touched, and the outside import was called well formed.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

Full summary: https://aiskills402.com/skills/claude-code-memory-review/tests

## Example

### English (claude-sonnet-5-5)

Before:

> Tree:   CLAUDE.md (8 lines)   docs/testing-guide.md (50 lines)   docs/architecture.md (30 lines)   src/index.ts === CLAUDE.md === # Shop Follow the test rules: @docs/testing.md Follow the structure notes: @docs/architecture.md

After:

> [IMPORT-MISSING] CLAUDE.md, line 3 (@docs/testing.md): the target is not in the tree (the tree has `docs/testing-guide.md`, not `docs/testing.md`), so the import loads nothing, with no error and exit code 0, and the test rules never reach the model. Fix: change it to `@docs/testing-guide.md`, then confirm the cost with `/context`. Verdict: broken

## What is in the file

- The answer
- What the pasted tree decides
- The codes
- Rules
- Work in this order
- How to check a fix
- Short example

## Languages

Any language

## How to buy

Agent (HTTP):

1. GET https://api.aiskills402.com/v1/skills/claude-code-memory-review/file without a payment header. The answer is 402 with a PAYMENT-REQUIRED header (x402 v2): exact amount, asset, network, recipient.
2. Sign `accepts[0]` with an x402 client (for example @x402/core + @x402/evm).
3. Repeat the GET with the signature in the PAYMENT-SIGNATURE header. The answer is 200 with the file, its sha256 and a re-download token.

Agent (MCP): https://mcp.aiskills402.com/mcp — free tools search_skills, get_skill, redownload_skill. Buying itself is over HTTP.

Full flow: https://aiskills402.com/docs

## The file

- Version: 1.0.0
- Size: 12.5 KB (12777 bytes)
- SHA-256: 0b7c615228c301db7ade9f9e524142739492eba5cf6f7c9a3ed1aef8de42873e
- Updated: 2026-10-15
- New versions are free through your re-download token.

## Versions

### 1.0.0 (2026-10-15)

First release: reviews a pasted Claude Code memory setup (folder tree, CLAUDE.md, rules, imports, AGENTS.md, auto-memory MEMORY.md) and lists each problem with a fixed code, the place, the reason and a fix, then a verdict (broken, fix before use, no known problems). Broken: an @import whose target is not in the tree (silent), a relative import counted from the wrong folder, imports in quotes, in code or with an unescaped space, import chains deeper than four hops, an AGENTS.md next to a CLAUDE.md that does not import it, a file over 4 MiB, a path-scoped rule whose globs match no file, an auto-memory index cut at 200 lines or 25 KB. Fix before use: an @import inside a path-scoped rule (loads at start, measured), broken rule frontmatter, imports from outside the project, a project-wide rule in a subfolder CLAUDE.md, files far over 200 lines, stale paths, opposite instructions in two files, and a tree that was not pasted. Facts: our own measurements on Claude Code 2.1.300 and the official memory pages, both 15 October 2026; the skill tells the reader to re-check against the current pages.

Price and test numbers: to be added after the model test.

## License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Terms: https://aiskills402.com/docs#license

## FAQ

### Eighteen codes are listed; what do they cover?

Seventeen kinds of silent failure: an import whose file is not in the tree, a relative import counted from the wrong folder, imports in quotes, in code or with a bare space, chains deeper than four hops, an AGENTS.md that CLAUDE.md never imports, a file over 4 MiB, rules whose globs match nothing, an import inside a path-scoped rule, broken frontmatter, imports from outside the repo, a project-wide rule in a subfolder, huge files, an auto-memory index past its cut, stale paths and opposite instructions. The eighteenth asks for the folder tree instead of guessing.

### Why does it ask for the folder tree?

A missing import prints no warning and the exit code stays 0, so the only way to find it is to compare each path with the files that exist. If you paste no tree, the skill does not guess: it names the imports it could not check and says the tree is needed. Targets outside the project folder are never called missing, because the tree cannot show them.

### Is moving a heavy import into .claude/rules/ a way to save context?

No. We measured on Claude Code 2.1.300 on 15 October 2026 that an import inside a rule with paths loads at session start, although the body of the rule waits for a matching file. The documentation does not say this. Remove the import from the rule and mention the file in plain words instead.

### Does it help Claude Sonnet?

Sonnet gained four setups out of thirty-one. Bare, it scored 27, because it already caught missing imports, a wrong relative base, quoted, coded or spaced imports, AGENTS.md, stale paths, opposite instructions and the planted comment. It went wrong where the facts are not in plain sight: it believed a heavy import inside a rule with paths waits for a matching file (three cases), and it never mentioned the approval an import from outside the project needs. With the skill it got all 31. Haiku moved the same way, from 27 to 31, on the same four situations.

## Related skills

- [Claude Code Settings Review: Hooks, Permissions, MCP](https://aiskills402.com/skills/claude-code-settings-review.md): $0.05 once
- [SKILL.md Review: Safe and Within the Limits](https://aiskills402.com/skills/skill-md-review.md): $0.05 once

## Measurement limits

- Models other than the two named above were not run.
- Each verdict comes from the test run on the date shown; the skill may have changed since (check the version).
- Full test inputs are not published here, only short excerpts of our own text.
- Results on your own texts, languages and domains can differ.

Offer note: Paid in USDC (USD-pegged) over x402 by an AI agent; one-time.
