/agent-loop:reflection-injectionfrom agent-loop
Injects relevant past reflections into agent context at iteration start so agents learn from prior mistakes without repeating them. Implements the Reflexion episodic memory pattern with relevance filtering and sliding-window selection.
Ships in agent-loop. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Automatically inject relevant past reflections into agent context when starting new iterations or retrying after failures.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
This skill implements the Reflexion episodic memory injection pattern. Before each iteration, it loads relevant past reflections and injects them into the agent's context, enabling learning from past mistakes without repeating them.
When triggered, this skill:
Load reflection history:
.aiwg/ralph/reflections/loops/ for current loop reflections.aiwg/ralph/reflections/patterns/ for cross-loop patternsFilter for relevance:
Format for injection:
Track usage:
activation:
always_active_for:
- ralph-loop-orchestrator
- ralph-verifier
triggered_by:
- ralph_iteration_start
- agent_retry_after_failure
- explicit_user_request
skip_when:
- no_reflection_history: true
- first_iteration_of_first_loop: true
This skill uses:
project-awareness: Context for relevance filtering.aiwg/ralph/reflections/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
The legacy direct-fs paths continue to work on the default fs backend — byte-identical to what the adapter writes — but only the adapter route honors storage.config redirection.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jmagly/aiwg --plugin agent-loop18 skills in this plugin
/agent-loopDetect requests for iterative autonomous agent loops and route to the appropriate loop executor/agent-loop-extCrash-resilient external agent loop with state persistence and CI/CD integration/auto-test-executionAutomatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern/cross-task-learnerEnable agent loops to learn from similar past tasks and share patterns across loops/debug-memoryQuery and manage the executable feedback debug memory/execute-feedbackExecute tests on generated code and iterate until passingOther plugins' skills for the same job