About aim-query
aim-query is a skill for retrieving explicit memories from an ai-memory instance. It guides agents in selecting a configured endpoint and scope, choosing a query method, and reporting relevant results with paths.
Key features
- 01Selects an ai-memory endpoint from configuration
- 02Supports project, multi-scope, and global recall
- 03Chooses among query, recent, explore, briefing, and status tools
- 04Reports matching paths with relevance notes
Use cases
- 01Checking prior decisions before proposing a design
- 02Reviewing recent activity in a project
- 03Retrieving shared conventions across projects
MCP support
It uses tools exposed by the configured ai-memory MCP server, including memory_query, memory_recent, memory_explore, memory_briefing, and memory_status.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ djalmajr/ skills --skill aim-queryAfter installing, type/aim-queryin Claude Code to confirm it loaded.
Details
From the project READMEaim-query
Explicit recall from an ai-memory instance (complements the automatic session-start handoff).
Steps
- Pick the instance. Read the configured ai-memory MCP server(s) from the repo's
.mcp.json/opencode.json/.codex/config.toml. If more than one is configured, ask the user which endpoint to query. (Wired byaim-init.) - Pick the scope. Default to the repo's
.ai-memory.tomlworkspace/project. The user may widen it: a different project, a partial scope, or multi-scopesfor cross-project recall.scopescarries{ workspace, project }per entry, so recall can span other workspaces too (e.g. a shared rules project);global: truesearches every project at once.- Shared / global rules live in a dedicated scope (the reserved
default/_globalscope, under_rules/; ≥1.9 the server unions it into default-scoped queries asglobal_scope_hits), separate from the repo's own project. ai-memory's auto-recall is per-(workspace, project) and will not surface them — pull them explicitly:memory_read_pagewith that workspace/project/path, ormemory_querywithscopes:[{ workspace, project }]. Do this when the task needs the agent's standing conventions (code-style, testing gates, workflow), not just repo-local knowledge.
- Shared / global rules live in a dedicated scope (the reserved
- Choose the tool for the question:
memory_query— targeted semantic recall ("have we decided X", before proposing design).memory_recent— "what's been going on lately" (N most-recent pages).memory_explore— open-ended "catch me up" (prose digest; takes an optionalfocus).memory_briefing/memory_status— structured snapshot / lifetime counts.
- Report the hits with their
path+ a one-line relevance note; offer to open a page (read its markdown via the MCP or/api/v1/.../pages/<path>).
Keep queries specific. If recall returns nothing, widen the scope or rephrase before concluding the knowledge isn't there.
Comments
Markdown supported