agentleFS
tinolabs-devtinolabs-dev/nightly-consolidation/SKILL.md

nightly-consolidation

Skill0 starsChanged 59 days agoMITView on GitHub

Consolidates the day's activity (Claude Code sessions, git commits) into a compact MEMORY.md using a local model via Ollama, plus a plain-English daily briefing. Use whenever the user asks to run the consolidation, review the day's summary, asks what was decided or left open on previous days, wants to start a session with context ("catch me up", "give me the daily briefing", "ponme al día"), or to diagnose why MEMORY.md grew too much or came out empty.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. jramsahai/obsidian-mcp-brain★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before running, verify Ollama responds: curl -s http://localhost:11434/api/tags.

    line 51
  2. Distinctive:

    If it doesn't, do NOT improvise with an API model without saying so — local extraction is a privacy decision.

    line 52
  3. Very specific:

    Read MEMORY.md in full (it is designed to fit in context) and briefings/LATEST.md.

    line 57
  4. Very specific:

    Verify ~/.claude/projects/ has recent .jsonl before assuming the former.

    line 72
  5. Very specific:

    If the user asks "summarize this week", do NOT re-run the pipeline over days already consolidated — that duplicates entries.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Nightly consolidation

Two-stage pipeline: extraction (cheap, local, high volume via Ollama) and consolidation (compresses against a fixed budget). The local model does the dirty work; this skill only orchestrates and interprets.

Why it is designed this way

The typical failure of memory systems is letting a model edit its memory file in place, nightly, on top of its own previous output. Ten days later the file is noise compressed from noise.

Here state/state.json is the source of truth. Aging is deterministic (by date, not model judgment). MEMORY.md is regenerated in full every night. The local model never rewrites its own output: it only produces new entries, compresses an entry to one line when it ages, and proposes links.

Structure

state/
  state.json          # source of truth: entries with date and level
  history/YYYY-MM.md  # cold archive, outside the budget
MEMORY.md             # regenerated artifact — this is what gets read
briefings/            # one concept per day in plain English (local model,
  LATEST.md           #   NOT verified against sources)
knowledge/            # VERIFIED dossiers (optional weekly deep-dive);
  INDEX.md            #   INDEX.md is the catalog
logs/                 # trace of every run

Three levels by entry age: activo (≤7 d, full detail) → contexto (8–28 d, one line) → archivo (>28 d, moved to history/, out of MEMORY.md).

Running the pipeline

Normally the scheduler triggers it. By hand:

py scripts/run.py                 # yesterday (normal nightly use)
py scripts/run.py --date 2026-08-25
py scripts/run.py --days 7        # backfill a week (max ~30: sessions expire)
py scripts/run.py --dry-run       # writes nothing; prints what it would do

Before running, verify Ollama responds: curl -s http://localhost:11434/api/tags. If it doesn't, do NOT improvise with an API model without saying so — local extraction is a privacy decision.

When the user asks for context ("catch me up" / "give me the daily briefing")

Read MEMORY.md in full (it is designed to fit in context) and briefings/LATEST.md; mention the day's concept in one line. If the domain the user is about to work on has a dossier in knowledge/INDEX.md, load it too — verified knowledge beats model memory. Then answer what was asked without dumping the whole file:

  • Open items → the abiertos of the active level, grouped by domain.
  • "Where did we leave X?" → search X in active and context; if absent, grep state/history/.
  • Session start → the active entries of the domain being worked on, plus any cross-links touching it.

Interpreting the run summary

  • sesiones: 0 → either no work happened, or claude_projects points wrong. Verify ~/.claude/projects/ has recent .jsonl before assuming the former.
  • presupuesto: 4200/4000 → trimming fell short. Fine once; if repeated, raise the budget or lower active_days from 7 to 5.
  • json_invalido: N high → model too small for the task; suggest 14B+.
  • enlaces: 0 repeatedly → normal in single-domain weeks.

Tuning

Everything configurable is in config.json; prompts live in prompts/ as plain files — edit them there, not in code. When adding a domain, add it BOTH in config.json and in prompts/extract.txt.

An easy mistake to avoid

If the user asks "summarize this week", do NOT re-run the pipeline over days already consolidated — that duplicates entries. Read MEMORY.md; it already is that summary. --days is for backfilling days the scheduler missed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.