ralph-reflect

ralph-reflect is a skill for Claude Code, Codex from jmagly/aiwg. It costs 15 tokens per session (612 once invoked), scanned A, original, MIT.

A tool for viewing and managing reflections saved from repeated agent work cycles. It records outcomes, lessons, strategy changes, and recurring patterns over time.

In plain words
What is it for?
Use it to show recent or specific loop reflections, review recurring patterns, or archive and clear the reflection history.
Why use it?
It makes past attempts easier to inspect so you can understand what worked, what failed, and what patterns keep appearing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to show recent or specific loop reflections, review recurring patterns, or archive and clear the reflection history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jmagly/aiwg/ralph-reflect
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jmagly/aiwg --skill ralph-reflect
Clone the repo
git clone --depth 1 https://github.com/jmagly/aiwg

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ralph-reflect

README.md
[![agentmods](https://agentmods.dev/badge/skills/jmagly/aiwg/ralph-reflect/github.svg)](https://agentmods.dev/skills/jmagly/aiwg/ralph-reflect)
Your own site
<a href="https://agentmods.dev/skills/jmagly/aiwg/ralph-reflect"><img src="https://agentmods.dev/badge/skills/jmagly/aiwg/ralph-reflect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ralph-reflect

Your own site · 80×15
<a href="https://agentmods.dev/skills/jmagly/aiwg/ralph-reflect"><img src="https://agentmods.dev/badge/skills/jmagly/aiwg/ralph-reflect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00612
Opus 5.5 $0.00006 $0.00245
Sonnet 5.5 $0.00003 $0.00122
Haiku 4.5 $0.00002 $0.00061

Measured 1mo ago against content hash 0cad637cbfd8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ralph-reflect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agentic/code/addons/agent-loop/skills/ralph-reflect/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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/agent-loop/schemas/reflection-memory.json - Reflection schema
  • @$AIWG_ROOT/agentic/code/addons/agent-loop/docs/reflection-memory-guide.md - Guide
  • @.aiwg/research/findings/REF-021-reflexion.md - Research foundation

Storage Routing (#934, #967)

This skill's persistence flows through resolveStorage('reflections'). On the default fs backend reflections live at .aiwg/reflections/. To redirect into Obsidian, Logseq, Fortemi, or another backend without changing this skill, configure roots.reflections or backends.reflections in .aiwg/storage.config (#934).

When this skill needs to read/write reflections from a Bash step, prefer the storage-routed CLI:

aiwg reflections list --prefix sessions/
aiwg reflections get sessions/2026-04-28.md
echo "# reflection" | aiwg reflections put sessions/2026-04-28.md
echo '{"event":"reflect","summary":"..."}' | aiwg reflections append-log sessions/log.jsonl

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed 0cad637cbfd8
  2. 1mo ago First seen · 75 lines · 15 tokens per session scan A d2757460b6c1

Subscribe to this mod's changes

ralph-reflect is a skill published in the GitHub repository jmagly/aiwg (225 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 612 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories