/self-improve:collect-sessionsfrom self-improve
Summarizes the last 7 days of Claude Code sessions into a structured digest file, capturing goals, successes, failures, and repeated instructions per project. Useful for self-improvement workflows and session review.
Ships in self-improve. 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.
Plugin root: ${CLAUDE_PLUGIN_ROOT}. The Bash tool does NOT receive CLAUDE_PLUGIN_ROOT as an environment variable;
always use the substituted absolute path in commands. <data> is the folder printed by
python "${CLAUDE_PLUGIN_ROOT}/selfimprove.py" where ($SELF_IMPROVE_HOME, or ~/self-improve).
Run this as one standalone command (py instead of python on Windows):
python "${CLAUDE_PLUGIN_ROOT}/collectors/sessions.py" --days 7
The script reads only ~/.claude/projects/*/*.jsonl and skips subagent files, claude-mem observer sessions and
automated probes. It redacts keys, tokens, passwords, e-mail addresses and home paths before printing anything.
From that output only, write <data>/digests/<YYYY-MM-DD>-sessions.md, using today's local date:
# Sessions digest <date> (last 7 days)
<N> sessions, <M> projects.
## Per project
### <project>
- Goals: <the main things worked on, merged and shortened>
- Worked: <what visibly succeeded, if the output shows it>
- Failed or retried: <recurring tool errors, denials, interruptions, with counts>
- Repeated instructions: <prompts the user had to give more than once>
## Cross-project patterns
- <the 3 to 8 findings that recur most, each with its count and the evidence line>
Group by project, not by individual session; with dozens of sessions a week, per-session entries would bury the patterns. Keep the whole digest under about 150 lines.
Rules:
[redacted].What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
5 skills in this plugin
/collect-gitSelf-improve loop, collector 2: summarize the last 7 days of git history in the repos listed in <data folder>/repos.txt into <data folder>/digests/<date>-git.md. Read-only. Use when running /self-improve:self-improve-run or when asked to collect recent git activity./collect-outsideSelf-improve loop, collector 3: read a fixed list of outside release notes and changelogs (Claude Code, Python, plus any feeds listed in <data folder>/sources.txt) and write the items relevant to this setup into <data folder>/digests/<date>-outside.md. Use when running /self-improve:self-improve-run or when asked for recent upstream changes./improve-systemSelf-improve loop, improve step: read the latest <data folder>/digests/*-combined.md, apply small reversible fixes (with backups and a change-log entry), and write bigger changes to a dated review file for the user to tick. On later runs, apply only ticked review items. Use when the user says /self-improve:improve-system or the scheduled loop runs it after /self-improve:self-improve-run./self-improve-runSelf-improve loop orchestrator: run the three collectors (collect-sessions, collect-git, collect-outside) in order, then write <data folder>/digests/<date>-combined.md with the top findings ranked by how often they recur. Use when the user says /self-improve:self-improve-run, 'run the self-improve loop', or when the scheduled task runs it.npx claudepluginhub ahmadhammoud56/moaa --plugin self-improve