memory-explore

memory-explore is a command for Claude Code from rjmurillo/ai-agents. It costs 24 tokens per session (780 once invoked), scanned A, original, MIT.

A command for deeply exploring Forgetful's knowledge graph, which stores connected pieces of project information. It is deprecated; the exploring-knowledge-graph skill should be used instead.

In plain words
What is it for?
Use it only for legacy deep searches that follow links between stored project facts and return the results relevant to a question.
Why use it?
It can trace related memories and entities when a simple search is not enough, but its workflow is no longer the preferred one.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Deprecated**: Use the `exploring-knowledge-graph` skill for deep exploration (Issue #2103 folded the former context-retrieval agent into it). See [Memory Inte.

Part of the project-toolkit plugin — 125 skills, 25 commands, 33 agents, 5 hooks shipped together

Good fit Use it only for legacy deep searches that follow links between stored project facts and return the results relevant to a question.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents
agentmods
npx agentmods add commands/rjmurillo/ai-agents/memory-explore

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 125 skills, 25 commands, 33 agents, 5 hooks.

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 memory-explore

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjmurillo/ai-agents/memory-explore/github.svg)](https://agentmods.dev/commands/rjmurillo/ai-agents/memory-explore)
Your own site
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/memory-explore"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/memory-explore/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 memory-explore

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/memory-explore"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/memory-explore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 780 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.
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.00024 $0.00780
Opus 5.5 $0.00010 $0.00312
Sonnet 5.5 $0.00005 $0.00156
Haiku 4.5 $0.00002 $0.00078

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

Security

Grade A, and why

memory-explore 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.

.claude/commands/forgetful/memory-explore.md · 115 lines

How it starts

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

Memory Explore

Deprecated: Use the exploring-knowledge-graph skill for deep exploration (Issue #2103 folded the former context-retrieval agent into it). See Memory Interface Decision Matrix.

Perform deep knowledge graph traversal using a lightweight subagent.

Query: $ARGUMENTS

Use the Task tool to launch a subagent:

Task({
  subagent_type: "general-purpose",
  model: "haiku",
  description: "Explore Forgetful graph",
  prompt: <see below>
})

Subagent Prompt

Use this prompt, substituting the user's query:

Explore the Forgetful knowledge graph for: "{user query}"

## Exploration Strategy
- Explore DEEPLY - follow links aggressively, expand entities, traverse relationships
- Be thorough - token cost is acceptable for comprehensive exploration
- Track visited IDs to prevent cycles
- But only SURFACE results relevant to the user's query in your final response
- Filter out tangential discoveries - the main agent only needs focused, relevant context

Execute these phases sequentially:

**Phase 1 - Semantic Entry:**
execute_forgetful_tool("query_memory", {
  "query": "{user query}",
  "query_context": "Deep exploration via /memory-explore command",
  "k": 5,
  "include_links": true,
  "max_links_per_primary": 5
})

Collect all primary_memories and linked_memories.

**Phase 2 - Expand Memory Details:**
For each primary memory, call:
execute_forgetful_tool("get_memory", {"memory_id": <id>})

Extract: document_ids, code_artifact_ids, project_ids, linked_memory_ids

**Phase 3 - Entity Discovery:**
For discovered project_ids, call:
execute_forgetful_tool("list_entities", {"project_ids": [<ids>]})

**Phase 4 - Entity Relationships:**
For each relevant entity, call:
execute_forgetful_tool("get_entity_relationships", {
  "entity_id": <id>,
  "direction": "both"
})

**Phase 5 - Entity-Linked Memories:**
For each entity, call:
execute_forgetful_tool("get_entity_memories", {"entity_id": <id>})

Fetch any new memories not already visited.

---

**IMPORTANT: Filter and summarize before returning.**
You may have explored dozens of nodes - only include those RELEVANT to "{user query}".
Return a structured summary:

## Memories Found
**Primary (N):**
- [Title] (importance: X) - brief content snippet...

**Linked (N):**
- [Title] (importance: X) - connection type...

**Entity-linked (N):**
- [Title] - discovered via [Entity Name]...

## Entities Discovered
- [Name] (type) - X relationships, Y linked memories

## Documents & Artifacts
- [Title] (type/language) - if any found

## Graph Summary
- Total: X memories, Y entities, Z documents/artifacts
- Key themes: [identified clusters]
- Suggested follow-up: /memory-explore "[related query]"

Read the full file on GitHub · 115 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 First seen · 115 lines · 24 tokens per session scan A 24c8ce50157b

Subscribe to this mod's changes

memory-explore is a command published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 780 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.