skills/agent-self-reflection/SKILL.md
Use to retrospect on a task against historical Codex and Claude Code chat transcripts in the current project, identify recurring agent mistakes, and recommend or apply durable fixes such as AGENTS.md updates or new skills.
npx skillsauth add paulrberg/dot-agents agent-self-reflectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze the user's task against prior Codex and Claude Code work in the current directory, then turn repeated agent failure modes into concrete prevention steps.
<task> (required): the task, decision, incident, or proposed workflow to evaluate in light of prior agent transcripts. If omitted but the current conversation clearly states a task, use that task.pwd -P.Look only at Codex and Claude Code transcripts for the current project.
~/.claude/projects/<encoded-absolute-path>/, where /Users/prb/projects/example becomes -Users-prb-projects-example.~/.codex/session_index.jsonl and transcript files under ~/.codex/sessions/; include ~/.codex/archived_sessions/ when recent active sessions are insufficient.Prefer metadata first: cwd, workspace roots, session title, timestamps, and git branch. Open transcript bodies only after a session plausibly matches the current project or task.
Sample enough history to distinguish a pattern from a one-off:
For each relevant session, extract concise evidence for:
AGENTS.md / skill guidance.just, wrong shell dialect, brittle parsing, missing narrow verification.Name the failure mode, not the model. Target only Codex and Claude Code.
Answer these questions:
Separate evidence-backed findings from speculation. If transcript coverage is thin, say so and lower confidence.
Recommend the smallest durable intervention:
AGENTS.md when the lesson is project-wide, stable, and useful to every agent working here.If the current invocation explicitly asks to apply fixes, make the edits and verify them. Otherwise, report recommendations first and wait for confirmation before changing AGENTS.md, creating skills, or editing existing skills.
Use this structure:
## Historical Scope
- Project path:
- Sources checked:
- Sessions sampled:
## Findings
- [confidence] Failure mode:
Evidence:
Relevance to current task:
Prevention:
## Durable Fixes
- Apply now:
- Consider later:
- Not worth changing:
## Verification
- Commands run:
- Gaps:
Keep the report terse and evidence-led. Mention exact files changed and checks run when fixes are applied.
rg, fd, jq, and structured parsing over ad hoc pipelines.development
Refactor naming and repository structure exhaustively while preserving behavior and external contracts.
tools
Uses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).
testing
Audit an entire repository with fresh eyes for correctness errors, bugs, omissions, duplication, inconsistencies, and other evidenced mistakes; fix every safe issue and verify the result.
development
Autonomous overnight codebase improvement with bounded runtime, evidence-gated changes, and verification.