返回 Skills
rohitg00/agentmemory· Apache-2.0 内容可用

session-history

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.

安装

与 skills.sh 相同的 Command / Prompt 安装方式


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

memory_sessions { "limit": 20 }

Expected output:

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. Call memory_sessions with limit: 20 for a meaningful window.
  2. 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.
  • 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 ../_shared/TROUBLESHOOTING.md if memory_sessions is not available.

附带文件

EXAMPLES.md
# session-history worked examples

## 1. Standard timeline

User: "Show me the session history."

Invocation:

```json
memory_sessions { "limit": 20 }
```

Response:

```json
{
  "sessions": [
    { "id": "7f3a9c21", "project": "app", "startedAt": "2026-06-07T09:00:00Z",
      "status": "completed", "observationCount": 14,
      "summary": "Reworked refresh rotation",
      "highlights": [ { "type": "decision", "title": "Rotate refresh tokens on every use" } ] },
    { "id": "b21d004e", "project": "app", "startedAt": "2026-06-05T14:00:00Z",
      "status": "completed", "observationCount": 9,
      "highlights": [ { "type": "code", "title": "limit.ts counts per-IP" } ] }
  ]
}
```

Present:

> - `7f3a9c2` app, 2026-06-07 09:00, completed, 14 obs
>   - decision: Rotate refresh tokens on every use (summary: Reworked refresh rotation)
> - `b21d004` app, 2026-06-05 14:00, completed, 9 obs
>   - code: limit.ts counts per-IP

## 2. Session with no observations

If a returned session has `observationCount: 0`, list it but say so:

> - `c98f110` app, 2026-06-04 11:00, abandoned, 0 obs (no recorded work)

## 3. Empty history

User: "What did we do last time?"

```json
memory_sessions { "limit": 20 }
```

Response:

```json
{ "sessions": [] }
```

Present:

> No recorded sessions yet for this project. Once you work with memory capture
> on, they will show here. Use `remember` to save a note now.