# AI Insights > AI Insights turns a person's local AI coding-agent history (Claude Code, Codex, OpenCode, Pi, Cursor, Gemini CLI) into one HTML page on their machine: a recap of animated cards they can share, a private analysis of where their time and tokens go with ranked changes to make, and a comparison with their previous runs. It makes no network calls, has no telemetry and never calls a model API. - Run it: `npx ai-insights@latest` (Node.js 20 or newer). `npx ai-insights@latest doctor` shows which history it found. - From an agent: install the plugin, then run `/analyze-ai-usage` in a new session. - Package: ai-insights on npm - Source: https://github.com/hamedmp/ai-insights (MIT). Built by the Matrix OS team (https://matrix-os.com). Formerly Hindsight. - Sample recap, built from invented sessions: https://ai-insights.app/demo/report.html ## The recap Up to 21 animated cards (persona, most agents at once, living dangerously, manners, favourite word, when you prompt, streak, bash hall of fame, tests, top model, tokens, three things to try next, summary, how to make your own, and more), in three styles (Pop, Instrument panel, Sticker sheet) and four shapes (1:1, 9:16, 4:5, 16:9). A card studio picks and orders cards and checks length against presets for X, Instagram, TikTok, LinkedIn and YouTube Shorts. The page exports an MP4 (in Chromium browsers; other browsers get a terminal recipe) or PNG images, and has share buttons for X, LinkedIn, Instagram, TikTok or Shorts, the system share sheet and a copyable caption. Cards contain counts and allowlisted words only: no prompts, file or project names, paths or session ids. ## What it reads | Agent | History | Tokens | Skill install | | --- | --- | --- | --- | | Claude Code | ~/.claude/projects (or CLAUDE_CONFIG_DIR) | yes | plugin | | Codex | ~/.codex/sessions and archived_sessions (or CODEX_HOME) | yes | plugin | | OpenCode | ~/.local/share/opencode/opencode.db (Node 22.5+) | yes | untested | | Pi | ~/.pi/agent/sessions | yes | untested | | Cursor | ~/.cursor/projects/*/agent-transcripts | no | untested | | Gemini CLI | ~/.gemini/tmp/*/chats; untested on real history | yes | none yet | It keeps numbers (tokens, durations, tool calls, errors, lines changed) and the prompts the person typed, with secrets redacted. It does not store agent replies or tool output. It writes only to ~/.ai-insights/ (AI_INSIGHTS_HOME moves it; a ~/.hindsight/ folder from before the rename keeps being used). ## Install Claude Code: /plugin marketplace add hamedmp/ai-insights /plugin install ai-insights@ai-insights Codex: codex plugin marketplace add hamedmp/ai-insights codex plugin add ai-insights@ai-insights Several harnesses at once: clone the repository and run scripts/install.sh (--dry-run shows what it would do). Each install adds the MCP server (npx -y ai-insights mcp) and three skills: analyze-ai-usage (builds the report), ai-insights-coach (turns findings into edits the person approves), ai-insights-setup (checks the setup). ## How it works 1. Deterministic scan: sessions, the recap, activity, token usage, estimated cost at API list prices, and findings with evidence. No model involved. 2. From an agent, the person's own agent reads short redacted excerpts, labels a sample of sessions from a fixed taxonomy and writes a short narrative. 3. Both become one self-contained HTML page that loads nothing from the network. ## Docs Full documentation, written from the code: https://ai-insights.app/docs - [Overview](https://ai-insights.app/docs): what it does and how it works - [Getting started](https://ai-insights.app/docs/getting-started): first run, output, where files go, the hindsight alias - [What it reads](https://ai-insights.app/docs/agents): each agent's history location, what is kept, retention, limits - [The report](https://ai-insights.app/docs/report): sections, findings and thresholds, why sessions go wrong, ratios, earned titles, persona, cost - [Recap cards](https://ai-insights.app/docs/recap-cards): the cards, styles, shapes, studio, video and image export, URL options - [The agent review](https://ai-insights.app/docs/agent-review): the analyze-ai-usage skill, installing per agent, what the model sees, session labels - [Sharing and the leaderboard](https://ai-insights.app/docs/sharing): share links, publishing, arenas, profiles, referrals, account - [CLI reference](https://ai-insights.app/docs/cli): commands, options, environment variables, exit codes, the install script - [MCP reference](https://ai-insights.app/docs/mcp): the seven ai_insights_* tools and their parameters - [Privacy](https://ai-insights.app/docs/privacy): what stays local, redaction, exactly what a share link and a profile contain - [Troubleshooting and FAQ](https://ai-insights.app/docs/troubleshooting)