
Product
Socket Now Protects the Firefox Extension Ecosystem
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.
agent-forensics
Advanced tools
Agent Cost Observability — Analyze Claude Code session logs to find token waste, calculate costs, and get actionable optimization recommendations.
Agent Cost Observability for Claude Code. Analyze session logs to find token waste, calculate costs, and get actionable optimization recommendations.
npx agent-forensics analyze <path>
Or install globally:
npm install -g agent-forensics
npx agent-forensics analyze ~/.claude/projects/my-project/
Scans for .jsonl session logs and prints a cost breakdown with token usage, model distribution, tool usage, and hot turns.
npx agent-forensics analyze ~/.claude/projects/my-project/ --full
Includes everything in basic, plus:
npx agent-forensics analyze session.jsonl --json
Outputs raw JSON for piping into other tools or dashboards.
| Pattern | Severity | Description |
|---|---|---|
| Redundant file reads | Medium | Same file read 3+ times in a session |
| Debug loops | High | 5+ consecutive Bash calls (retry loops) |
| Context bloat | Medium | Low cache read:create ratio |
| Expensive model misuse | High | Opus used for simple single-tool operations |
| Verbose output | Low | Turns with >4K output tokens |
| Sub-agent sprawl | Medium | 10+ sub-agents spawned in one session |
For programmatic access, use the hosted API:
POST https://api.agentsconsultants.com/api/analyze
Content-Type: application/json
{ "content": "<jsonl-content>", "tier": "full" }
All analysis is done in-memory. No session data is stored or logged, locally or via the API.
MIT
FAQs
Agent Cost Observability — Analyze Claude Code session logs to find token waste, calculate costs, and get actionable optimization recommendations.
The npm package agent-forensics receives a total of 6 weekly downloads. As such, agent-forensics popularity was classified as not popular.
We found that agent-forensics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.

Research
/Security News
Socket uncovered 77 linked Firefox extensions, including 40 that steal wallet secrets or credentials and 37 deceptive sports-score shells.