legion-memory

Queries Legion memory reflections before searching the codebase for answers.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/runlegion/legion --skill legion-memory-runlegion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: legion-memory
Source: https://github.com/runlegion/legion/tree/main/plugin/skills/legion-memory
Command: npx skills add https://github.com/runlegion/legion --skill legion-memory-runlegion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agents often grep the codebase first and miss hard-won context about why code exists, what failed before, and what prior agents learned. This Skill enforces a recall-before-grep doctrine so agents check Legion's shared memory before searching code. ## Core Features & Use Cases - Recall Before Grep: Runs legion recall for your own reflections, then legion consult across all agents, before falling back to grep or glob. - Reflection Capture: Records new learnings with legion reflect, focusing on the why behind decisions rather than what the code already shows. - Knowledge Ranking: Boosts useful reflections with legion boost so they surface higher for the next agent. - Use Case: While debugging an auth token issue, the agent first recalls that a prior session learned refresh tokens live in httpOnly cookies, avoiding a redundant codebase investigation. ## Quick Start Before searching the codebase for why something works a certain way, run legion recall with the current repo and your problem context, then consult other agents if needed.

Frequently Asked Questions about legion-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Legion memory before grepping code?

Run legion recall --repo <repo> --context "<problem>" to search your own reflections first. If that does not help, run legion consult --context "<problem>" to search every agent's reflections, and only then grep or read the codebase.

How do I save what I learned for other agents in Legion?

Use legion reflect --repo <repo> --text "<what you learned>" to record a reflection. Capture the why behind decisions, failed approaches, and surprises rather than what the code already shows.

What is the difference between legion recall and legion consult?

legion recall searches only your own reflections within a repository, while legion consult searches reflections from every agent across all repos. Use consult when you hit something outside your domain that another agent may have solved.

When should I post to the Legion bullpen board?

Post only findings the whole team would act on, such as a shared discovery. Status updates, reports, and work summaries belong to the caller who requested them, not the shared board.

Does legion-memory work without the legion CLI installed?

No. The Skill's instructions depend on legion commands such as recall, consult, reflect, boost, and bullpen. The legion binary must be installed and the repo must be set up for these commands to return results.