Keep per-directory CLAUDE.md (or AGENTS.md) files accurate and in sync with the code as a CURRENT-STATE description (not a changelog). Trigger after finishing a task that created, deleted, moved, or non-trivially changed files; when the user says "update CLAUDE.md", "sync memory", "wrap up"; or at the end of a coding session before the user moves on. Also use to bootstrap CLAUDE.md files in a project that doesn't have them yet. Session history/progress goes in the progress log (e.g. plans/PROGRESS.md via pr-plan-tracking) and git, NOT in CLAUDE.md.
Ships in research-engineering-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
CLAUDE.md files in each directory are how project knowledge persists across sessions. They go stale fast if nobody updates them. This skill is the protocol for keeping them honest, lean, and useful — and for setting them up from scratch in a project that doesn't have them.
CLAUDE.md describes the CURRENT STATE, not the history. It is orientation an agent reads to know how the system works right now — not a changelog. Do NOT accumulate commit-level entries, LOC deltas, benchmark numbers, "shipped X then Y" narratives, or dated achievement logs in it. That archaeology bloats the system prompt every session without changing what the agent should do next. Session history goes in the progress log (plans/PROGRESS.md via the pr-plan-tracking skill, or the project's equivalent) and in git log; durable discoveries go in plans/FINDINGS.md. When you update CLAUDE.md, you EDIT the current-state description in place and DELETE what's no longer true — you don't append.
End-of-task triggers (most common):
Bootstrap triggers:
.gitignore; ignore node_modules, .venv, dist, build, __pycache__, etc.).src/strategies/, src/data/, tests/, references/CLAUDE.md using the template below.CLAUDE.md files using the per-directory template. Keep each under 150 lines. Be honest about what you don't know — write TODO: confirm with user rather than guessing at invariants.Run through this checklist:
CLAUDE.md (if one exists). Check:
plans/PROGRESS.md (use the pr-plan-tracking skill) or the project's progress log — never as an appended changelog inside CLAUDE.md. If CLAUDE.md has a ## Plans & Progress section, it should be a short pointer to the log, not the log itself.docs/ and reference it.# <Project name>
<1–3 sentence description of what this project is and what its current goal is.>
## Architecture (high level)
<Bullet list of the 3–8 top-level pieces and how they relate. Link to per-directory
CLAUDE.md files. Example:>
- `src/strategies/` — trading strategy implementations (see `src/strategies/CLAUDE.md`)
- `src/data/` — point-in-time data layer (see `src/data/CLAUDE.md`)
- `src/eval/` — evaluation gates: dry run → mini backtest → Pareto → CPCV/DSR
- `references/` — external repos and papers; consult `references/INDEX.md`
## Conventions
<Project-wide rules. Keep tight. Examples:>
- Python: polars only; no pandas. River for online learning.
- No new dependencies without asking.
- Strategies must be pure functions of `(state, data) -> orders`.
## Maintenance protocol
This file is current-state orientation, not a changelog. When finishing a task:
edit the sections above so they describe how the system works NOW, and delete
what's no longer true. Do NOT append dated entries here — session history goes in
`plans/PROGRESS.md` (the `pr-plan-tracking` skill), findings in `plans/FINDINGS.md`,
commit detail in `git log`.
## Plans & Progress
History lives in `plans/` and git, not here:
- `plans/PROGRESS.md` — append-only session log.
- `plans/FINDINGS.md` — durable discoveries / decisions.
- `plans/<slug>.md` — active PR plans; `plans/completed/` — merged.
## References
Before non-trivial changes, consult `references/INDEX.md` for relevant repos and papers.
# <directory name>
**Purpose:** <1–2 sentences. What problem does this directory solve in the project?>
## Key files
- `<file>` — <one-line role>
- `<file>` — <one-line role>
(Only the ones that matter for navigation. Skip trivial files.)
## Public surface
What other parts of the project import from here. What's stable vs. internal.
## Invariants & gotchas
- <Things that must hold true>
- <Non-obvious constraints>
- <Past bugs that taught us a lesson>
## Conventions specific to this directory
<Optional. Only if they differ from project-wide.>
(No "Recent changes" / changelog section in per-directory files either — describe
the current state and let git log <dir> carry the history.)
polars.DataFrame with columns [ts, symbol, side, qty]" beats "Strategies follow a clean interface."AGENTS.md, use that name throughout. If neither exists, use CLAUDE.md (Claude Code's default). Never create both — pick one and stick with it across the project.git log, plans/PROGRESS.md, plans/FINDINGS.md, bench/results/.~/.claude/CLAUDE.md territorydocs/End your reply with:
TODO: confirm with userWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/research-engineering-skills:maintain-memory-mdfrom research-engineering-skills
npx claudepluginhub 0x0f0f0f/research-engineering-skills --plugin research-engineering-skills16 skills in this plugin
/add-molab-badgeAdd "Open in molab" badge(s) linking to marimo notebooks. Works with READMEs, docs, websites, or any markdown/HTML target./anywidget-generatorGenerate anywidget components for marimo notebooks./auto-paper-demoMake a demo of a research paper in a marimo notebook fully automatically without extra user input./consult-referencesBefore non-trivial changes, consult the project's references/ directory — vendored repos and paper notes — to ground the work in primary sources instead of guessing. Trigger when about to design, implement, or modify code that involves an algorithm, formula, or API that's covered by a paper or reference repo in references/; when the user mentions a concept that matches a reference (e.g. "DSR", "CPCV", "GEPA", "Pareto selection"); or when the user explicitly says "check references", "consult the literature", "look up X in the repos". Also use to bootstrap references/ structure in a new project./implement-paperImplement a research paper as an interactive marimo notebook together with the user. Start by understanding what the user wants to explore, fetch the paper via alphaxiv, then build a focused notebook./implement-paper-autoImplement a research paper in a marimo notebook fully automatically without extra user input.