Codex

ralph-reflect

View and manage agent loop reflections and episodic memory

104 stars

Best use case

ralph-reflect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

It is a strong fit for teams already working in Codex.

View and manage agent loop reflections and episodic memory

Teams using ralph-reflect should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ralph-reflect/SKILL.md --create-dirs "https://raw.githubusercontent.com/jmagly/aiwg/main/.agents/skills/ralph-reflect/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ralph-reflect/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ralph-reflect Compares

Feature / Agentralph-reflectStandard Approach
Platform SupportCodexLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

View and manage agent loop reflections and episodic memory

Which AI agents support this skill?

This skill is designed for Codex.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Al Reflect Command

View, search, and manage reflections from agent loop iterations.

## Instructions

Manage the Reflexion episodic memory stored in `.aiwg/ralph/reflections/`:

### Subcommand: show

Display reflections for a specific loop or the most recent loop.

1. Load reflections from `.aiwg/ralph/reflections/loops/`
2. Display each reflection with:
   - Trial number, timestamp
   - Outcome (success/failure/partial)
   - Reflection text
   - Strategy change

### Subcommand: patterns

Show recurring patterns across all loops.

1. Load `.aiwg/ralph/reflections/patterns/`
2. Display patterns by frequency
3. Show success rate for each pattern
4. Highlight patterns applicable to current context

### Subcommand: clear

Archive and clear reflection history.

1. Archive current reflections to timestamped directory
2. Reset loops and patterns directories
3. Preserve index.yaml

## Arguments

- `show [loop-id]` - Show reflections for loop (default: latest)
- `patterns` - Show learned patterns
- `clear` - Archive and clear reflections
- `--format [yaml|markdown|summary]` - Output format (default: markdown)
- `--last [n]` - Show only last n reflections
- `--loop [id]` - Filter by loop ID

## References

- @$AIWG_ROOT/agentic/code/addons/ralph/schemas/reflection-memory.json - Reflection schema
- @$AIWG_ROOT/agentic/code/addons/ralph/docs/reflection-memory-guide.md - Guide
- @.aiwg/research/findings/REF-021-reflexion.md - Research foundation