# extract-skills-from-Codex-sessions

> Automatically extract reusable skills from Codex session transcripts using LLM analysis and wire them into a Stop hook

- Skill: `vamseeachanta/extract-skills-from-codex-sessions` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/extract-skills-from-codex-sessions`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/extract-skills-from-codex-sessions/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/extract-skills-from-codex-sessions

---


# Extract Skills from Codex Sessions

Wire a Stop hook that fires when Codex ends a session. The hook runs `skill-extractor.py`, which reads the transcript, calls an LLM (via OpenRouter) to identify skill-worthy patterns, and writes a SKILL.md file if extraction succeeds. Use `openai` library for API calls, strip JSON fence artifacts with `.strip()`, and request concise content (<1500 tokens) to avoid truncation. Test end-to-end with synthetic skill-worthy conversations before deploying.
