codex-insights is a Codex skill repository. It packages the insights skill plus bundled Python scripts that analyze local Codex session artifacts and generate a structured report.
This repository is designed for Codex skill distribution, not as a generic Python package. The main unit of reuse is the insights/ skill folder, which you can drop into ~/.codex/skills/.
insights/
├── SKILL.md
├── agents/openai.yaml
└── scripts/
├── codex_insights.py
└── run_insights.py
Copy the insights/ folder into your Codex skills directory:
mkdir -p ~/.codex/skills
cp -R insights ~/.codex/skills/After that, Codex can trigger the skill when the task matches the description in insights/SKILL.md.
Example prompts that should trigger this skill:
使用 $insights 技能,分析最近 7 天的本地 Codex 会话看下我最近一个月的 Codex 工作模式,有没有重复返工Generate a local insights report for my recent Codex sessions
From the skill directory:
python3 scripts/run_insights.py --days 30 --max-sessions 50Examples:
python3 scripts/run_insights.py --lang en --days 7 --max-sessions 20
python3 scripts/run_insights.py --format html --open
python3 scripts/run_insights.py --output ./reports/codex-insightsBy default the bundled script reads:
~/.codex/history.jsonl~/.codex/session_index.jsonl~/.codex/sessions/**/*.jsonl
You can override those paths with flags:
--history-path--session-index-path--sessions-root
Other useful flags:
--days--max-sessions--lang--format--output--open
Reports are written to ./reports/ by default and include:
- Scope
- Summary
- Session Overview
- Repeated Patterns
- Frictions
- Effective Behaviors
- Recommendations
- Evidence Appendix
A synthetic example is available at examples/sample-report.md.
Run tests:
python3 -m unittest discover -s tests -vThis skill works on local files. Review generated reports before sharing them externally, because session prompts, paths, and environment details may be sensitive.