@ayagmar/session-cost-forensics
Analyze local Codex, Pi, and Claude Code session logs for cost, token waste, cache misses, retries, and duplicate sessions.
Package details
Install @ayagmar/session-cost-forensics from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ayagmar/session-cost-forensics- Package
@ayagmar/session-cost-forensics- Version
0.1.2- Published
- Oct 12, 2026
- Downloads
- 784/mo · 202/wk
- Author
- ayagmar
- License
- MIT
- Types
- skill
- Size
- 23.6 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
session-cost-forensics
Analyze local Codex, Pi, and Claude Code session logs for cost, token waste, cache misses, retries, duplicate sessions, and orchestration inefficiency. Privacy: reads local session stores (~/.codex, ~/.pi/agent/sessions, ~/.claude/projects) read-only and makes no network requests.
Requirements
- Node.js >= 22.19
Install
Pi
# pinned (versions are listed in the changelog linked below)
pi install npm:@ayagmar/session-cost-forensics@<version>
# unpinned
pi install npm:@ayagmar/session-cost-forensics
# remove
pi remove npm:@ayagmar/session-cost-forensics
skills CLI
npx skills add ayagmar/agents-skills --skill session-cost-forensics --agent pi
Other agent ids: claude-code, codex, cursor.
Claude Code
claude plugin marketplace add ayagmar/agents-skills
claude plugin install session-cost-forensics@ayagmar-skills
Codex
codex plugin marketplace add ayagmar/agents-skills
codex plugin add session-cost-forensics@ayagmar-skills
Usage
Prompt example: "Why did my agent sessions get so expensive this week? Break down token and cache usage." The agent runs the bundled script itself.
Run from the installed skill directory:
node scripts/session_cost_report.mjs --provider all --since 2026-09-01 --until 2026-09-28 --top 10
See SKILL.md for the full option list.