Skip to content
Back to skills

Collect Sessions

ASecurity

Self-improve loop, collector 1: summarize the last 7 days of Claude Code sessions into <data folder>/digests/<date>-sessions.md (goals, what worked, what failed or was retried, instructions the user had to repeat). Use when running /self-improve:self-improve-run or when asked to collect or summarize recent sessions.

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 15, 2026
ai-agentspythongobash

Works with

  • claude code

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add ahmadhammoud56/MOAA --skill collect-sessions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collect Sessions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collect Sessions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ahmadhammoud56-collect-sessions/badge)](https://www.skillsdirectory.com/skills/ahmadhammoud56-collect-sessions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: collect-sessions
description: "Self-improve loop, collector 1: summarize the last 7 days of Claude Code sessions into <data folder>/digests/<date>-sessions.md (goals, what worked, what failed or was retried, instructions the user had to repeat). Use when running /self-improve:self-improve-run or when asked to collect or summarize recent sessions."
---

# Collect sessions

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`).

1. 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.

2. From that output only, write `<data>/digests/<YYYY-MM-DD>-sessions.md`, using today's local date:

   ```markdown
   # 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.

3. Rules:
   - Never copy secrets. If any line still looks like a key, token or password, replace it with `[redacted]`.
   - Don't open the raw transcripts to "add detail". The script output is the only input.
   - Read-only, apart from writing the digest file.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.