Session Analyzer
Agent Buildingsession-analyzerSession Analyzer is an Agent Skill for agent building published in the joelazar/dotfiles repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Analyze coding-agent session transcripts to discover patterns that could become AGENTS.md rules, skills, or prompt templates. Mines your usage history for automation opportunities across local coding-agent tools.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/joelazar/dotfiles/blob/HEAD/dot_agents/skills/session-analyzer/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/session-analyzer, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Session Analyzer
Extracts and analyzes your coding-agent session transcripts to find recurring patterns that could be automated.
Usage
# Extract transcripts for current directory
{baseDir}/analyze.js
# Extract transcripts for specific directory
{baseDir}/analyze.js /path/to/project
# Match multiple dirs by pattern (worktrees, variants, etc.)
{baseDir}/analyze.js --pattern orders-app
# Extract + analyze with helper agents / parallel analyzers
{baseDir}/analyze.js --analyze
# Pattern + analyze (finds all matching session dirs)
{baseDir}/analyze.js --pattern orders-app --analyze
# Custom output directory
{baseDir}/analyze.js --output ./my-analysis --analyze
What It Does
- Extract: Reads all session files for the given working directory from the configured transcript source(s)
- Today this is primarily set up around pi transcripts, but the skill should be described and used in an agent-neutral way
- Use
--patternto match multiple directories (e.g., worktrees, feature branches)
- Split: Chunks transcripts into ~100k char files (fits in context window)
- Analyze (optional): Spawns helper agents / parallel analysis runs to identify:
- AGENTS.md patterns: Coding style rules, conventions you repeat
- Skill patterns: Multi-step workflows you do often
- Prompt templates: Reusable prompts for common tasks
Output
Without --analyze:
session-transcripts/
├── session-transcripts-000.txt
├── session-transcripts-001.txt
└── ...
With --analyze:
session-transcripts/
├── session-transcripts-000.txt
├── session-transcripts-000.summary.txt # Pattern analysis
├── session-transcripts-001.txt
├── session-transcripts-001.summary.txt
└── FINAL-SUMMARY.txt # Aggregated findings
Setup
Install dependencies (run once):
cd {baseDir}
npm install
When to Use
- After working on a project for a while, to discover what rules/skills would help
- Periodically to find new automation opportunities
- When you notice you keep giving similar instructions
Adapted from badlogic/pi-mono gist