Agent skill
review-agentmd
Review recent conversations to find improvements for AGENTS.md files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/review-agentmd
SKILL.md
Review AGENTS.md from conversation history
Analyze recent conversations to improve both global (~/.codex/AGENTS.md) and local (project) AGENTS.md files.
Step 1: Find conversation history
The conversation history is in ~/.codex/sessions/.
# List recent sessions
ls -lt ~/.codex/sessions/ | head -20
Step 2: Extract recent conversations
Extract the 15-20 most recent conversations (excluding the current one) to a temp directory:
SCRATCH=/tmp/agentmd-review-$(date +%s)
mkdir -p "$SCRATCH"
for f in $(ls -t ~/.codex/sessions/*.jsonl 2>/dev/null | head -20); do
basename=$(basename "$f" .jsonl)
cat "$f" | jq -r '
if .type == "user" then
"USER: " + (.message.content // "")
elif .type == "assistant" then
"ASSISTANT: " + ((.message.content // []) | map(select(.type == "text") | .text) | join("\n"))
else
empty
end
' 2>/dev/null | grep -v "^ASSISTANT: $" > "$SCRATCH/${basename}.txt"
done
ls -lhS "$SCRATCH"
Step 3: Analyze conversations
Review each conversation file and compare against both AGENTS.md files:
- Global:
~/.codex/AGENTS.md - Local:
./AGENTS.md(if exists)
For each conversation, look for:
- Instructions that exist but were violated (need reinforcement or rewording)
- Patterns that should be added to LOCAL AGENTS.md (project-specific)
- Patterns that should be added to GLOBAL AGENTS.md (applies everywhere)
- Anything in either file that seems outdated or unnecessary
Step 4: Aggregate findings
Combine results into a summary with these sections:
- Instructions violated - existing rules that weren't followed (need stronger wording)
- Suggested additions - LOCAL - project-specific patterns
- Suggested additions - GLOBAL - patterns that apply everywhere
- Potentially outdated - items that may no longer be relevant
Present as tables or bullet points. Ask user if they want edits drafted.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?