agent-history
БесплатноБез исполняемых скриптовНе проверенSearch and analyze AI coding assistant conversation history from Claude Code, Codex CLI, Gemini CLI, and Pi. Use when user asks about past conversations…
от kvsankar★ 15 звёзд на GitHubОб этом скилле
Agent History Skill
Setup
mkdir -p ~/.claude/skills
cp agent-history SKILL.md ~/.claude/skills/
chmod +x ~/.claude/skills/agent-history
Once installed, Claude Code will automatically use this skill when you ask about past conversations, usage patterns, or want to search your history.
Browse, search, and analyze AI coding assistant conversation history using the agent-history CLI tool.
When to Activate
- User asks about past conversations: "what did we discuss about X", "find that conversation where we..."
- User wants to find previous solutions: "how did we fix that error", "what approach did we use for..."
- User asks about usage patterns: "how much time did I spend", "which tools do I use most"
- User wants to export or backup: "export my conversations", "backup this project's history"
- User references earlier sessions: "yesterday we talked about", "last week's work on..."
Available Commands
List Sessions
# Current workspace
agent-history lss
# All sources (local + WSL + Windows + remotes)
agent-history lss --ah
# Filter by workspace pattern
agent-history lss myproject
# Filter by date
agent-history lss --since 2025-11-01
agent-history lss --since 2025-11-01 --until 2025-11-30
Export
# Export current workspace sessions
agent-history export
# Export specific workspace
agent-history export myproject
# Export with date filter
agent-history export --since 2025-11-24
# Export minimal (no metadata, cleaner for reading)
agent-history export --minimal
# Export to specific directory
agent-history export -o /tmp/history-export
# Export offline HTML with progressive detail controls
agent-history export --format html --html-single
# Print one small session as concise Markdown to stdout
agent-history export /path/to/session.jsonl -o - --markdown-level 1
Usage Statistics
# Summary dashboard
agent-history stats
# Time tracking (work hours per day)
agent-history stats --time
# Tool usage breakdown
agent-history stats --tools
# Model usage
agent-history stats --models
# Daily trends
agent-history stats --by-day
# Per-workspace breakdown
agent-history stats --by-workspace
List Workspaces
# All local workspaces
agent-history lsw
# Filter by pattern
agent-history lsw myproject
Data Location
Supported agents store conversations in different locations:
- Claude Code:
~/.claude/projects/as JSONL files - Codex CLI:
~/.codex/sessions/as JSONL files organized by date - Gemini CLI:
~/.gemini/tmp/as JSON files under project-hash folders - Pi:
~/.pi/agent/sessions/as JSONL files under workspace folders
Workspace directories may be encoded paths, date folders, or hashes depending on the agent. Use agent-history lsw and agent-history lss instead of assuming a single storage layout.
Search Strategy (No Built-in Search Yet)
Since the tool doesn't have a search command, use this workflow:
Method 1: Export + Grep (Recommended)
# Export recent sessions from ALL workspaces to temp directory
agent-history export --aw --since 2025-11-24 -o /tmp/history-search --minimal
# Search the exported markdown files
grep -r -i "search term" /tmp/history-search/
Method 2: Direct Raw Session Search
# Claude example: find the workspace directory
ls ~/.claude/projects/ | grep myproject
# Search within JSONL files (content is in message.content)
grep -i "search term" ~/.claude/projects/-home-user-myproject/*.jsonl
# Multi-agent broad search
grep -r -i "search term" ~/.claude/projects ~/.codex/sessions ~/.gemini/tmp ~/.pi/agent/sessions 2>/dev/null
Method 3: Multi-term Semantic Search
For questions like "what did we discuss about database connections":
- Generate related search terms based on the topic
- Run multiple grep searches
- Synthesize the findings
Example for "database connections":
# Export recent history from all workspaces first
agent-history export --aw --since 2025-11-24 -o /tmp/search --minimal
# Search for related terms
grep -r -i -l "database" /tmp/search/
grep -r -i -l "connection" /tmp/search/
grep -r -i -l "postgres\|mysql\|sqlite\|mongo" /tmp/search/
grep -r -i -l "sql" /tmp/search/
grep -r -i -l "pool\|timeout" /tmp/search/
Then read the matching files to find relevant conversations.
Common Workflows
"What did we discuss about X last week?"
Export recent sessions from all workspaces:
agent-history export --aw --since 2025-11-24 -o /tmp/history --minimalSearch for the topic and variations:
grep -r -i -l "TOPIC" /tmp/history/ grep -r -i -l "RELATED_TERM1" /tmp/history/ grep -r -i -l "RELATED_TERM2" /tmp/history/Read matching files to summarize findings
"How did we fix that error?"
- Search for error-related terms:
agent-history export --aw --since 2025-11-01 -o /tmp/history --minimal grep -r -i "error\|exception\|failed" /tmp/
Установить agent-history в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadGrepGlobВложенные файлы
FAQ
Что делает скилл agent-history?
Search and analyze AI coding assistant conversation history from Claude Code, Codex CLI, Gemini CLI, and Pi. Use when user asks about past conversations, previous solutions, what was discussed earlier, finding something from history, or analyzing usage patterns. Triggers include "what did we discuss", "find that conversation", "search history", "past sessions", "how much time", "token usage", "which tools".
Как установить скилл agent-history?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-history запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic