Awesome-omni-skill codex-sessions-skill-scan
Daily skill health scan: analyze ~/.codex/sessions plus per-repo session logs under ~/dev (default last 1 day) and summarize skill invocations + likely failures for personal skills in ~/dev/agent-skills (missing paths, tool failures, complex-task word triggers). Optional: include best-effort local OTel signals.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data-ai/codex-sessions-skill-scan" ~/.claude/skills/diegosouzapw-awesome-omni-skill-codex-sessions-skill-scan && rm -rf "$T"
manifest:
skills/data-ai/codex-sessions-skill-scan/SKILL.mdsource content
Codex Sessions Skill Scan
Overview
This skill runs a daily scan over Codex session logs (global
~/.codex/sessions and per-repo sessions under ~/dev) to catch repeated “paper cuts” when using skills (broken file paths, missing scripts, validation commands that don’t run) and produces a short report + suggested fixes. It also highlights user words that often indicate complex tasks and adds a step-by-step reminder.
Scope and triggers
- “Scan yesterday’s Codex sessions for skill failures (personal skills only).”
- “Why does
keep failing? Look at recent session logs and tell me what’s wrong.”$some-skill - “Daily check: any broken skill references or validation commands in the last 24 hours?”
Quick start (daily)
Run:
cd ~/dev/agent-skills python3 utilities/codex-sessions-skill-scan/scripts/scan_codex_sessions.py --days 1 --include-otel
Philosophy
- Single-threaded: scan → summarize → (optional) patch only the smallest diff.
- Evidence-led: cite the specific error snippets + point to the exact personal SKILL.md path when possible.
- Safety-first: redact secrets; do not copy full transcripts.
Required inputs
: how far back to scan (default--days <float>
).1
: where to scan (default--sessions-root <path>
).~/.codex/sessions
(enabled by default): also scan per-project--include-dev-project-sessions
under.codex/sessions
. Use~/dev
to disable.--no-include-dev-project-sessions
: cap snippets per skill (default--max-samples-per-skill <int>
).3
: include best-effort OTel signals (Codex OTLP endpoint listening status + repo-local OTLP-derived trace artifacts under--include-otel
)..narrative/trace/
: include summary from--include-otel-collector
.~/.agents/otel-collector/data/processed/stats.json
: override collector stats path (default--otel-collector-stats <path>
).~/.agents/otel-collector/data/processed/stats.json
: path to read Codex--codex-config-toml <path>
endpoints from (default[otel]
).~/.codex/config.toml
Deliverables
- A “daily skill health report” in Markdown (skills invoked, skills with issues, sample error snippets).
- A list of suggested fix patterns (no changes applied).
Constraints
- Personal skills only: do not patch
orskills-system/
skills..system - Do not auto-install dependencies or change system settings as part of scanning.
- Keep output small (snippets only); avoid dumping raw logs.
- Redact secrets/sensitive data by default; never paste tokens/keys from logs into chat or files.
Reliability hardening (from recurring failures)
- rg/fd preflight: before any repo-wide search commands, run
andcommand -v rg
. If missing, report the missing binary and stop (or use absolute paths such ascommand -v fd
and/opt/homebrew/bin/rg
when available)./opt/homebrew/bin/fd - No direct network curl: do not run external
commands in this workflow. Use local scripts/MCP tools instead.curl - TTY for interactive/streaming commands: if a command expects stdin or may run interactively (for example auth/login flows), run it with
; otherwise avoidtty=true
follow-ups.write_stdin - Claude auth check: when
emits auth failures, verify withclaude_projects
and treatclaude auth status
as environment/auth state, not a skill regression.loggedIn=false
Procedure
A) Scan (read-only)
- Run the scan script (Quick start).
- If exit code is
, issues were found (see report).2
B) Triage (human-in-the-loop)
For each flagged skill:
- Identify if it’s a personal skill (lives under
and is not under~/dev/agent-skills/
).skills-system/ - Confirm whether the failure is:
- wrong file path in a SKILL.md reference
- wrong interpreter for validation scripts (PyYAML required)
not expanding (needs absolute path)~- missing/moved file in the repo
C) Patch (optional; requires explicit user request)
If the user asks to apply fixes:
- Make the smallest possible edits to the referenced personal skill files.
- Re-run skill gates (fail fast on first failure):
cd ~/dev/agent-skills ~/.venvs/pyyaml/bin/python utilities/skill-creator/scripts/quick_validate.py <skill-folder> ~/.venvs/pyyaml/bin/python utilities/skill-creator/scripts/skill_gate.py <skill-folder>
Guardrails (non-negotiable)
- Personal skills only: do not patch
orskills-system/
skills..system - Redact: do not paste secrets/tokens from session logs into chat, files, or issues.
- Do not auto-fix: always propose patches first; only apply after confirmation.
Anti-patterns
- Editing skills automatically just because the scan found an issue.
- “Fixing” system skills (
,skills-system/
) when the user asked for personal skills only..system - Copy/pasting full session logs into chat/issues (high risk for secrets/PII).
Examples
- “Scan my Codex sessions from the last day and tell me if any skills are failing. Personal skills only.”
- “Why does
keep referencing missing files? Scan yesterday’s sessions and suggest the smallest fix.”$product-spec - “Daily scan: any broken validation commands or missing paths from the last 24 hours?”
Validation
- Fail fast: stop at the first failed gate, fix it, then re-run.
- This skill’s scan script is stdlib-only; run it with
.python3 - When changing skill files, validate with:
~/.venvs/pyyaml/bin/python utilities/skill-creator/scripts/quick_validate.py utilities/codex-sessions-skill-scan~/.venvs/pyyaml/bin/python utilities/skill-creator/scripts/skill_gate.py utilities/codex-sessions-skill-scan
References used by skill-gate:
references/contract.yamlreferences/evals.yaml
Philosophy and tradeoffs
- Use this skill when consistent decision-making matters more than one-off execution because project context should drive the approach.
- Principle and mindset: prioritize tradeoffs and constraints over rigid checklists; understand why each step exists.
- Ask this to keep outcomes robust: Why is this the right default, and what could change this outcome?
- How do we adapt if constraints shift?
- What evidence is needed before choosing one path over another?
Anti-patterns and caveats
- Avoid applying this playbook generically without checking repository-specific context.
- NEVER skip required validation gates when behavior changes.
- DO NOT use this skill as a rigid replacement for engineering judgment.
- DON'T ignore warnings or assume one pattern fits all repos.
- Common pitfall: treating anti-patterns as optional.
- Incorrect assumptions here can lead to fragile guidance.
- Warning: wrong sequencing can create avoidable regressions.
Variation and adaptation
- Vary the workflow by team size, risk, and deployment target.
- Use different strategies for small, medium, and large changes.
- Adapt recommendations to the specific environment and avoid repetitive templates.
- Avoid generic or cookie-cutter responses; craft context-specific alternatives.
- Keep outputs diverse and not repetitive.
- Converge on a custom path only after evidence review.
- Different constraints should produce different, non-generic recommendations.
Empowering execution style
- Be capable of exploring multiple options and enabling the team to make safe decisions.
- Unlock confidence by explaining options and tradeoffs clearly.
- Feel free to be creative while staying rigorous and precise.
- Push boundaries with practical alternatives when simple recipes fail.
- Enable outcomes-oriented problem solving.