{"slug":"claude-code-memory-review","name":"Claude Code Memory Review: CLAUDE.md, Rules, Imports","version":"1.1.0","updated_at":"2026-11-26T18:57:14.918Z","use_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, opposite instructions in two loaded files and the Next.js agent block that next dev keeps writing back. 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.","languages":["any"],"tags":["claude-code","claude-md","memory","rules","imports","config-review"],"category":"agents","category_url":"https://aiskills402.com/categories/agents","keywords":["review Claude Code memory","check CLAUDE.md imports","path-scoped rules not loading"],"faq":[{"q":"Nineteen codes are listed; what do they cover?","a":"Eighteen kinds of quiet trouble: a missing import target, a path counted from the wrong folder, imports in quotes, in code or with a bare space, chains past four hops, an unimported AGENTS.md, files over 4 MiB, globs that 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, a cut memory index, stale paths, opposite instructions and the Next.js block that comes back after you delete it. The nineteenth asks for the folder tree."},{"q":"Why does it ask for the folder tree?","a":"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."},{"q":"Is moving a heavy import into .claude/rules/ a way to save context?","a":"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."},{"q":"Does it help Claude Sonnet?","a":"It gained eight setups out of thirty-seven: 29 alone, 37 with this file. Alone it already caught missing imports, a wrong base folder, imports in quotes or code, AGENTS.md, stale paths and opposite instructions. It missed that a heavy import in a path-scoped rule loads at start, the approval an outside import needs, and, in all four Next.js cases, the setting that stops the dev server from writing its block back. Haiku went from 29 to 36 on the same count."}],"examples":[{"lang":"en","model":"claude-sonnet-5-5","input_excerpt":"Tree:\n  CLAUDE.md (8 lines)\n  docs/testing-guide.md (50 lines)\n  docs/architecture.md (30 lines)\n  src/index.ts\n\n=== CLAUDE.md ===\n# Shop\nFollow the test rules:\n@docs/testing.md\nFollow the structure notes:\n@docs/architecture.md","output_excerpt":"[IMPORT-MISSING] CLAUDE.md, line 3 (@docs/testing.md): the target is not in the pasted tree (the tree has docs/testing-guide.md, not docs/testing.md). The import loads nothing, and Claude Code prints no warning. Fix: change the path to @docs/testing-guide.md, then confirm the cost with /context.\nVerdict: broken"}],"page_url":"https://aiskills402.com/skills/claude-code-memory-review","markdown_url":"https://aiskills402.com/skills/claude-code-memory-review.md","image_url":"https://cdn.aiskills402.com/og/skills/claude-code-memory-review/50296242.png","related_url":"https://api.aiskills402.com/v1/skills/claude-code-memory-review/related","purchases_count":null,"tested":{"date":"2026-11-26","strong":{"model":"claude-sonnet-5-5 (Claude Code alias \"sonnet\")","verdict":"By one shared concept check all 37 pasted memory setups, read by hand. In four setups where the Next.js agent block kept coming back, among them one with only a git log as evidence and one where an unwanted AGENTS.md reappeared, it said that the Next.js dev server writes the block and gave the setting that stops it; it left alone a block the team keeps on purpose and a project that already has the setting. By the exact codes it had 35 of 37: twice the code was right but the verdict line was wrong, for an unescaped space and for a paste without a tree."},"weak":{"model":"claude-haiku-5-5 (Claude Code alias \"haiku\")","verdict":"By the concept check 36 of 37, including all six new setups, but it missed the rule placed in a subfolder file, and by the exact codes it had 30 of 37, mostly extra codes beside the right one. That is noisier than version 1.0, which scored 30 of 31 twice on the same day."},"note":"Thirty-seven pasted Claude Code memory setups written by us (30 with a planted fault, 7 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. Version 1.1 added six setups about the block that the Next.js dev server writes into a memory file (checked on 26 November 2026 against the code of Next.js releases from both lines); one flawed setup and one sound one quote the sentence in which the block says who re-adds it. Haiku was run several times that day with this version and twice with version 1.0, because its answers carried more extra codes with the new text (31, 29 and 30 of 37 by the codes; moving the text into its own section did not change that). The new text was then reworded once so that it holds no HTML comment, and both models were run again in full; the numbers here are from that last run. One run per model and case otherwise. 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. In 1.1 three more checks were widened after the run, for both sides: the import in inline code also accepts that imports there are not parsed or do not load, the outside import also accepts the approval named in the following sentence, and the stale script path also accepts that the tree has only the other script. The bare-side checks of 1.0 were widened after its 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.","baseline":{"date":"2026-11-26","rows":[{"label":"Setups reviewed right (37 setups)","better":"higher","strong":{"with":{"n":37,"of":37},"without":{"n":29,"of":37}},"weak":{"with":{"n":36,"of":37},"without":{"n":29,"of":37}}}],"note":"Same request on both sides, scored on the concept in any words; the six newer setups also tell the bare side that it has no repository or tools, and only they were run without the skill again. Read by hand, bare Sonnet already knew the missing import, the relative base, quoted, coded and spaced imports, AGENTS.md, stale paths and opposite instructions. It missed the eager import inside a path-scoped rule, the approval for an outside import, and in all four Next.js setups the setting that stops the block; where the block says the dev server re-adds it, it knew the cause only. Bare Haiku missed the same kinds. With the skill both named the Next.js cause and setting in all four."},"report_url":null},"price_usd":"0.05","price_micro":50000,"size_bytes":13973,"sha256":"415652c417406a925622867e736352c42ab9dcd9f6fd045922d5957be1eb504e","outline":["The answer","What the pasted tree decides","The codes","Rules","Work in this order","How to check a fix","Short example"],"license":{"summary":"Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing","holder":"Georgi Kalchev, aiskills402.com","url":"https://aiskills402.com/docs#license"},"buy_url":"https://api.aiskills402.com/v1/skills/claude-code-memory-review/file","redownload_url_template":"https://api.aiskills402.com/v1/purchases/{token}","mcp_tool":null,"payment":{"protocol":"x402","scheme":"exact","asset":"USDC","selling":true,"network":"base","network_caip2":"eip155:8453","pay_to":"0xbc0dcc70d8b5d85541d86ffc68d988fd59c22e68","facilitator":"cdp"},"seo_title":"Claude Code Memory Review (CLAUDE.md, Rules)","seo_description":"Reviews pasted CLAUDE.md files, rules and imports for instructions that silently never load, and gives the fix for each. Pay $0.05 once, in USDC.","versions":[{"version":"1.1.0","date":"2026-11-26","changelog":"# Changelog\n\n## 1.0.0 — 2026-10-15\n\nFirst 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.\n\nPrice and test numbers: to be added after the model test.\n\n## Test review — 2026-10-15 (checks widened after reading every failure; both sides, same checks)\n\n- Gap regex `G`: a dot followed by a dot or a slash (`../../docs/x.md`) no longer ends the gap, so \"the import of @../../docs/x.md loads at session start\" is read (rule-import-eager-a/b, multi).\n- size-over: accepts `200-line`, a gap of 200 characters, and \"too large/long\" before the file name.\n- agents-not-read-a/b and multi: one shared pattern; also accepts \"does not import it\", \"reads only CLAUDE.md\", \"never reach the model\".\n- import-in-code: also accepts the negation before the term (\"does not expand @ imports inside inline code or fenced blocks\").\n- import-space: also accepts \"up to the first whitespace\", \"parsed as @docs/team\", \"resolve to nothing\", \"won't load\" (a wrong answer such as \"the space is fine\" still fails).\n- stale-path-a: also accepts \"there is no `scripts/check-all.sh`\" and \"isn't in the project\" in a line before the name.\n- stale-path-b: also accepts \"no `db/` folder\" and \"doesn't match the tree\".\n- paste-injection: also accepts \"the tree lists only docs/handbook-v2.md ... won't load / will fail\".\n- rule-bad-frontmatter: also accepts \"not valid YAML\" and \"never closed\".\n- rule-paths-nomatch: also accepts \"neither file matches the glob\", \"no src/ directory\", \"never applies\", \"will not load\".\n- clean-syntax-example: the invented-problem check ignores explicit negations (\"not flagging ... as missing\", \"even though the tree has no such file\").\n- clean-syntax-example: input fixed (tree line counts now equal the pasted lines: 3 and 7). NEEDS RE-RUN, both models, both sides. The other cases also list more lines in the tree than are pasted; they were left unchanged on purpose, to stay tied to the recorded runs.\n- Real failures kept (bare side): rule-import-eager-a, rule-import-eager-b, multi (the eager-import part), external-import (no word about the approval dialog).\n- control.mjs: added right and wrong answers for every widened check (wrong forms still fail).\n- clean-syntax-example (after the re-run): the negation guard also reads \"Neither is a mistake\" and \"is not missing\" (a \"missing\" right after \"not\" no longer counts); \"shared-file.md is missing\" and \"does not exist\" still fail. Both forms added to control.mjs.\n- Measured (one run per model and case, 31 cases, all files): Sonnet 31/31 with the skill, 27/31 without; Haiku 31/31 with, 27/31 without. Gain 4 on both (heavy import in a path-scoped rule, three cases; approval for an import from outside the project). Price: 50000 micro-USDC ($0.05), by the gain-4 row of the table.\n\n## 1.1.0 — 2026-11-26\n\nNineteenth code, [NEXT-AGENT-BLOCK]: the managed block that the Next.js development server writes into a memory file and brings back after someone deletes it, with the setting that stops it and the difference between version 16.3 (the block can land in CLAUDE.md) and 16.4 (only AGENTS.md). Paths inside node_modules are no longer judged. Checked on 26 November 2026 against the code of Next.js releases 16.3.0, 16.3.8 and 16.4.0 to 16.4.6.\n\nTests: six new setups (four flawed, two sound), 37 in all. One flawed setup and one sound setup quote the sentence in which the block says who re-adds it; three flawed setups leave it out. The side without the skill was run on the new setups only; the side with the skill was run again in full. With one shared concept check for both sides: Sonnet 37/37 with, 29/37 without; Haiku 36/37 with, 29/37 without. Scored on the exact codes, Sonnet had 35/37 (two wrong verdict lines) and Haiku 30/37, worse than with 1.0: it adds extra codes. Read by hand, bare models never named the switch; where the block itself says the dev server re-adds it, they knew the cause and still did not know how to turn it off.\n\nChecks widened after the run, for both sides: the import-in-code case also accepts \"imports there are not parsed\" and \"does not load\"; the outside-import case also accepts the approval named in the next sentence; the stale-script case also accepts that the tree has only the other script. Price unchanged at $0.05.\n"},{"version":"1.0.0","date":"2026-10-15","changelog":"# Changelog\n\n## 1.0.0 — 2026-10-15\n\nFirst 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.\n\nPrice and test numbers: to be added after the model test.\n\n## Test review — 2026-10-15 (checks widened after reading every failure; both sides, same checks)\n\n- Gap regex `G`: a dot followed by a dot or a slash (`../../docs/x.md`) no longer ends the gap, so \"the import of @../../docs/x.md loads at session start\" is read (rule-import-eager-a/b, multi).\n- size-over: accepts `200-line`, a gap of 200 characters, and \"too large/long\" before the file name.\n- agents-not-read-a/b and multi: one shared pattern; also accepts \"does not import it\", \"reads only CLAUDE.md\", \"never reach the model\".\n- import-in-code: also accepts the negation before the term (\"does not expand @ imports inside inline code or fenced blocks\").\n- import-space: also accepts \"up to the first whitespace\", \"parsed as @docs/team\", \"resolve to nothing\", \"won't load\" (a wrong answer such as \"the space is fine\" still fails).\n- stale-path-a: also accepts \"there is no `scripts/check-all.sh`\" and \"isn't in the project\" in a line before the name.\n- stale-path-b: also accepts \"no `db/` folder\" and \"doesn't match the tree\".\n- paste-injection: also accepts \"the tree lists only docs/handbook-v2.md ... won't load / will fail\".\n- rule-bad-frontmatter: also accepts \"not valid YAML\" and \"never closed\".\n- rule-paths-nomatch: also accepts \"neither file matches the glob\", \"no src/ directory\", \"never applies\", \"will not load\".\n- clean-syntax-example: the invented-problem check ignores explicit negations (\"not flagging ... as missing\", \"even though the tree has no such file\").\n- clean-syntax-example: input fixed (tree line counts now equal the pasted lines: 3 and 7). NEEDS RE-RUN, both models, both sides. The other cases also list more lines in the tree than are pasted; they were left unchanged on purpose, to stay tied to the recorded runs.\n- Real failures kept (bare side): rule-import-eager-a, rule-import-eager-b, multi (the eager-import part), external-import (no word about the approval dialog).\n- control.mjs: added right and wrong answers for every widened check (wrong forms still fail).\n- clean-syntax-example (after the re-run): the negation guard also reads \"Neither is a mistake\" and \"is not missing\" (a \"missing\" right after \"not\" no longer counts); \"shared-file.md is missing\" and \"does not exist\" still fail. Both forms added to control.mjs.\n- Measured (one run per model and case, 31 cases, all files): Sonnet 31/31 with the skill, 27/31 without; Haiku 31/31 with, 27/31 without. Gain 4 on both (heavy import in a path-scoped rule, three cases; approval for an import from outside the project). Price: 50000 micro-USDC ($0.05), by the gain-4 row of the table.\n"}]}