Agent Skills › rohitg00/agentmemory › session-history

session-history

GitHub

用于查询并展示项目近期会话的历史记录,提供按时间倒序的工作概览。当用户询问过往工作或需要回顾历史会话时使用此技能。

plugin/skills/session-history/SKILL.md rohitg00/agentmemory

触发场景

用户询问上次做了什么 查看会话历史 回顾过去的工作

安装

npx skills add rohitg00/agentmemory --skill session-history -g -y
更多选项

非标准路径

npx skills add https://github.com/rohitg00/agentmemory/tree/main/plugin/skills/session-history -g -y

不安装直接使用

npx skills use rohitg00/agentmemory@session-history

指定 Agent (Claude Code)

npx skills add rohitg00/agentmemory --skill session-history -a claude-code -g -y

安装 repo 全部 skill

npx skills add rohitg00/agentmemory --all -g -y

预览 repo 内 skill

npx skills add rohitg00/agentmemory --list

SKILL.md

Frontmatter
{
    "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 { "project": "<current-project-id>", "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. 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 if memory_sessions is not available.

版本历史

  • e01540e 当前 2026-10-19 02:23

    新增 project 参数支持以精确限定查询范围;增加 nextCursor 游标处理逻辑以支持分页遍历;强化 scope 过滤和目录边界匹配机制;更新反模式检查以确保不虚构会话内容。

  • a8e7d19 2026-07-24 11:39

同 Skill 集合

plugin/skills/agentmemory-agents/SKILL.md
plugin/skills/agentmemory-architecture/SKILL.md
plugin/skills/agentmemory-config/SKILL.md
plugin/skills/agentmemory-hooks/SKILL.md
plugin/skills/agentmemory-mcp-tools/SKILL.md
plugin/skills/agentmemory-rest-api/SKILL.md
plugin/skills/commit-context/SKILL.md
plugin/skills/commit-history/SKILL.md
plugin/skills/forget/SKILL.md
plugin/skills/handoff/SKILL.md
plugin/skills/lesson/SKILL.md
plugin/skills/memory-discipline/SKILL.md
plugin/skills/recall/SKILL.md
plugin/skills/recap/SKILL.md
plugin/skills/remember/SKILL.md
plugin/skills/write-agentmemory-skill/SKILL.md

元信息

文件数
0
版本
c6c476d
Hash
70d6cd48
收录时间
2026-07-24 11:39

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-05 19:08
浙ICP备14020137号-1