session-history — Claude Code skill: what it does, install
Shows recent project sessions as a clean timeline. Use it to recover past decisions, observations, and session status.
npx skills add rohitg00/agentmemory --skill session-history -a claude-codeWhat session-history does
The skill queries project sessions through memory_sessions and presents them in reverse chronological order. Each entry includes the first 8 characters of the session ID, project, start time, status, and observation count. Sessions with observations also show key highlights with their type and title.
It starts with the exact project identifier. When that identifier is unavailable, the skill pages through results with nextCursor and matches normalized cwd by directory boundary while preserving the scope filter. If a session summary exists, its title and key decisions are included. An empty history is treated as a real result, not an invitation to fill in missing work.
The practical constraint is that memory_sessions must be available for this workflow to run. Installation places SKILL.md in the skills directory for the selected platform.
What it helps with
- recover the work from earlier project sessions
- show decisions and observations for each session
- find the latest work for the exact project
- separate an empty history from invented activity
Example prompts for the agent
- Show what we did in the last session for this project.
- Give me an overview of recent project sessions with their key decisions.
- List the session history and observation count for each session.
How to install session-history
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill session-history -a claude-code2Manually: put the files in place
~/.claude/skills/session-history/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/session-history/
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill session-history -a codex2Manually: put the files in place
.agents/skills/session-history/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill session-history -a cursor2Manually: put the files in place
.cursor/skills/session-history/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rohitg00/agentmemory session-history2Manually: put the files in place
.github/skills/session-history/SKILL.md1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill session-history -a gemini-cli2Platform CLI
gemini skills install https://github.com/rohitg00/agentmemory --path plugin/skills/session-historyManually: put the files in place
.devin/skills/session-history/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill session-history -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set11
The whole set →Similar
Questions about session-history
How do I install session-history in Claude Code?
Run these steps in order: npx skills add rohitg00/agentmemory --skill session-history -a claude-code, then run npx skills add rohitg00/agentmemory --skill session-history -a claude-code again, and check ~/.claude/skills/session-history/SKILL.md.
What does session-history do?
It presents recent sessions for the project as a timeline with the session ID, project, start time, status, observation count, and key highlights.
How does the skill select project sessions?
It uses the exact project identifier. When that identifier is unknown, it pages with nextCursor and matches normalized cwd by directory boundary.
Source text
SKILL.md · Apache-2.0
---
name: session-history
description: Show what happened in recent past sessions on this project as a clean timeline. Use when the user asks "what did we do last time", "session history", "past sessions", or wants an overview of previous work.
user-invocable: true
---
The user wants an overview of recent sessions on this project.
## Quick start
```json
memory_sessions { "project": "<current-project-id>", "limit": 20 }
```
Expected output:
```text
7f3a9c2 · app · 2026-06-07 09:00 · completed · 14 obs
- decision: Rotate refresh tokens on every use
b21d004 · app · 2026-06-05 14:00 · completed · 9 obs
- code: limit.ts counts per-IP
```
## Why
Only show sessions and observations the tool returned. An empty history is a
real answer, never a cue to invent past work.
## Workflow
1. Use the exact project identifier recorded by the host and pass it to
`memory_sessions`, with `agentId` when requested. If it is unknown, page
through sessions using `nextCursor` and match normalized `cwd` by directory
boundary before choosing the most recent 20. Never substitute another project.
2. Preserve scope filters on every page; stop at the requested count or a null
`nextCursor`. State when the displayed history is a partial page. Present in
reverse chronological order: session id (first 8), project, start
time, status.
3. For sessions with observations, show the key highlights (type plus title).
4. Note the total observation count per session.
5. When a session summary exists, surface its title and the key decisions.
## Anti-patterns
WRONG: the tool returns two sessions, you describe "several sessions of steady
progress" and add ones you remember from the conversation.
RIGHT: show exactly the two sessions returned, each with its real id, status, and
observation count.
## Checklist
- Every session shown came from the tool response.
- Project/directory scope was checked before selecting the displayed window.
- Order is reverse-chronological.
- Per-session observation counts match the response.
- No session or highlight was invented or merged.
## See also
- `recap`: same data grouped by date with highlights.
- `handoff`: jump straight into the most recent session.
- `recall`: search across all sessions by topic.
## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) if `memory_sessions` is not available.
© rohitg00 · Apache-2.0 · rohitg00/agentmemory