chat-history
Installation
SKILL.md
Chat History
- IS: recover historical context with source evidence: prior fixes, decision trails, exact passages and what followed, research across sessions.
- IS NOT: browsing history, automatic memory writing, or proof of current repository or production state. For Obsidian notes use
obsidian; for recent computer activity use an available computer-history capability.
Agent compatibility
The same skill and bundled script run in Codex, Grok, Cursor, and Claude Code. The model does not select the source adapter: every host can search every accessible supported source. No vendor SDK, host-specific tool names, or Claude-only substitutions are required. Read host setup when installing, moving between hosts, or diagnosing unavailable tools.
Workflow
- Discover available evidence. Resolve
scripts/history.pyrelative to this installed SKILL.md, then execute it withpython3. Rundiscoverto report local source paths. Use explicit exports for web conversations; local Codex sessions do not include ChatGPT web history. Missing access is a coverage gap, not an empty search result. - Search narrowly, widen deliberately. Choose distinctive terms from the user's defect, artifact, project, or quoted passage. Start with known project/session paths; for cross-project research search the selected source roots. Batch spelling variants with repeated
-eflags. Search results are literal OR matches in encounter order, not exhaustive or relevance-ranked when capped. Search both user and assistant messages; use--role userto locate the original request. Read source adapters when choosing paths, using Cursor/exports, or handling unsupported formats. - Read the sequence. Use each hit's path and line/key to read surrounding turns. Follow later corrections, linked sessions, commits, plans, and artifacts when they affect the answer. For "what followed", include assistant and tool evidence after the exact occurrence. A final summary alone may conceal scope changes. Expand a truncated window or repeat the search with a more specific term when evidence is incomplete.
- Answer with provenance. Lead with the recovered finding, cite the source path plus line or session/message key, and explain any later correction. Distinguish user intent, proposed work, reported completion, tool evidence, and current verification. Report material coverage gaps and conflicting evidence. Verify today's state separately when the task depends on it.
Execute the primitives
In these examples, HISTORY is the absolute path to the bundled script, resolved from the installed skill directory. Paths and IDs come from discovery or previous results.