Automatically inject relevant past reflections into agent context when starting new iterations or retrying after failures.
Scanned 2/12/2026
Install via CLI
openskills install jmagly/aiwg# reflection-injection
Automatically inject relevant past reflections into agent context when starting new iterations or retrying after failures.
## Triggers
- Ralph loop starting new iteration
- Agent retry after failure
- "what did we learn"
- "apply past lessons"
- "avoid previous mistakes"
## Purpose
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.
## Behavior
When triggered, this skill:
1. **Load reflection history**:
- Read `.aiwg/ralph/reflections/loops/` for current loop reflections
- Read `.aiwg/ralph/reflections/patterns/` for cross-loop patterns
- Apply sliding window: k=5 most recent reflections
2. **Filter for relevance**:
- Match reflections by task type similarity
- Match by error type if retrying after failure
- Match by file/module if working on specific code
3. **Format for injection**:
- Convert reflections to natural language summary
- Use @agentic/code/addons/ralph/templates/self-reflection-prompt.md template
- Prepend to agent context
4. **Track usage**:
- Record which reflections were injected
- Track whether injected reflections led to success
- Update pattern effectiveness scores
## Activation Conditions
```yaml
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
```
## Integration
This skill uses:
- `project-awareness`: Context for relevance filtering
- Ralph Loop Orchestrator: Provides iteration state
- Reflection memory at `.aiwg/ralph/reflections/`
## References
- @agentic/code/addons/ralph/schemas/reflection-memory.json - Schema
- @.aiwg/ralph/docs/reflection-memory-guide.md - Guide
- @agentic/code/addons/ralph/templates/self-reflection-prompt.md - Prompt template
- @.aiwg/research/findings/REF-021-reflexion.md - Research foundation
No comments yet. Be the first to comment!
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
**Complete production-ready guide for Google Gemini embeddings API** This skill provides comprehensive coverage of the `gemini-embedding-001` model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering. ---
Interview, source-challenge, verify, save, and ADR-gate fuzzy coding requests into Codex-ready implementation specs. Use when a feature, bugfix, refactor, migration, repo-wide change, or architecture task needs user-verified requirements, source-backed decisions, durable architecture decisions, acceptance criteria, validation commands, rollout notes, saved spec/ADR files, and a Codex execution prompt. Do not use when already fully specified or when the user wants direct implementation now.
Use when a repo needs CodeGraph plus ast-grep for Codex MCP setup, exploration, impact analysis, structural search, or safe refactor planning.