Documentation indexer that auto-injects relevant doc snippets into Claude Code context

version
1.5.8
GitHub stars
5

Install

/plugin install mem-oracle@jagjeevanak

Run it inside Claude Code after adding the marketplace with /plugin marketplace add JagjeevanAK/mem-oracle.

Contents

Discovered from source

Skills 1

docs-search

Search indexed documentation for relevant information.

When to Use

Use this skill when the user asks about:

  • How to use a specific library, framework, or API
  • Documentation for a package or tool
  • Best practices from official docs
  • Code examples from documentation

How to Use

  1. First check if the worker is running by making a health check
  2. Use the retrieve endpoint to search for relevant documentation
  3. Present the results with source URLs

API Endpoints

Base URL: http://127.0.0.1:7432

Search Documentation

curl -X POST http://127.0.0.1:7432/retrieve \
  -H "Content-Type: application/json" \
  -d '{"query": "your search query", "topK": 5}'

Index New Documentation

curl -X POST http://127.0.0.1:7432/index \
  -H "Content-Type: application/json" \
  -d '{"baseUrl": "https://docs.example.com", "seedSlug": "/getting-started"}'

Check Status

curl http://127.0.0.1:7432/status

Example Queries

  • "How do I use server components in Next.js?"
  • "What are the best practices for React hooks?"
  • "How to configure TypeScript paths?"

Response Format

Results include:

  • title: Page title
  • heading: Section heading (if available)
  • content: Relevant text snippet
  • url: Source documentation URL
  • score: Relevance score (0-1)

Commands 5

Search through indexed documentation for relevant information.

Run this command to search for: $ARGUMENTS

curl -s -X POST http://127.0.0.1:7432/retrieve \
  -H "Content-Type: application/json" \
  -d '{"query": "$ARGUMENTS", "topK": 5}'

Present results with:

  • Title and section heading
  • Relevant content snippet
  • Source URL for reference
  • Relevance score

Check the status of all indexed documentation sets.

Run this command to check what documentation has been indexed:

curl -s http://127.0.0.1:7432/status

Present the results showing:

  • Docset name and base URL
  • Total pages indexed vs pending
  • Current status (ready/indexing/error)
  • Last updated timestamp

Index a documentation URL (creates a new docset if it doesn't exist).

You MUST require a URL in $ARGUMENTS. Extract:

  • baseUrl: scheme + host (e.g. https://nextjs.org)
  • seedSlug: path (e.g. /docs/app)

Then run:

curl -s -X POST http://127.0.0.1:7432/index \
  -H "Content-Type: application/json" \
  -d '{"baseUrl": "BASE_URL", "seedSlug": "SEED_SLUG", "waitForSeed": true}'

After the request completes, show /status.

mem-oracle - Documentation Manager

Available actions:

  1. status - Show all indexed documentation and their status
  2. index - Index a new documentation URL
  3. reindex [url] - Reindex all docs, or a specific one if URL given
  4. search - Search across indexed documentation
  5. delete - Delete an indexed docset

Usage

If $ARGUMENTS is empty or "help", show this menu and ask user what they want to do.

If $ARGUMENTS starts with an action keyword, execute it:

status

curl -s http://127.0.0.1:7432/status

Present results as a table showing: name, base URL, status, pages indexed, last updated.

index

Extract baseUrl (origin) and seedSlug (path) from the URL, then:

curl -s -X POST http://127.0.0.1:7432/index \
  -H "Content-Type: application/json" \
  -d '{"baseUrl": "ORIGIN", "seedSlug": "PATH", "waitForSeed": true}'

reindex [url]

If no URL given, reindex ALL:

curl -s -X POST http://127.0.0.1:7432/refresh-all \
  -H "Content-Type: application/json" \
  -d '{"force": true}'

If URL given, extract origin and reindex that one:

curl -s -X POST http://127.0.0.1:7432/refresh \
  -H "Content-Type: application/json" \
  -d '{"baseUrl": "ORIGIN", "force": true}'

search

curl -s -X POST http://127.0.0.1:7432/retrieve \
  -H "Content-Type: application/json" \
  -d '{"query": "QUERY", "topK": 5}'

Present results with title, heading, snippet, URL, and score.

delete

First get docset ID from status, then:

curl -s -X DELETE "http://127.0.0.1:7432/docset/DOCSET_ID"

Interactive Mode

If user just types /mem-oracle with no args, present a friendly menu:

mem-oracle - Documentation Manager

What would you like to do?
1. View indexed docs status
2. Index new documentation
3. Reindex existing docs
4. Search documentation
5. Delete a docset

Type a number (1-5) or an action like "index https://..."

Then wait for user input and execute the corresponding action.

Re-index documentation that is already indexed.

If $ARGUMENTS is empty: re-index all docsets (stale ones by default).

curl -s -X POST http://127.0.0.1:7432/refresh-all \
  -H "Content-Type: application/json" \
  -d '{"force": false, "maxAge": 24}'

If $ARGUMENTS is provided:

  • If it looks like a URL (starts with http), extract its origin (scheme + host) as baseUrl and refresh that docset.
  • Otherwise treat it as a docsetId.
# Refresh by full docs URL (use origin as baseUrl)
curl -s -X POST http://127.0.0.1:7432/refresh \
  -H "Content-Type: application/json" \
  -d '{"baseUrl": "https://nextjs.org", "force": true}'

# Refresh by baseUrl (origin)
curl -s -X POST http://127.0.0.1:7432/refresh \
  -H "Content-Type: application/json" \
  -d '{"baseUrl": "https://nextjs.org", "force": true}'

# Refresh by docsetId
curl -s -X POST http://127.0.0.1:7432/refresh \
  -H "Content-Type: application/json" \
  -d '{"docsetId": "DOCSET_ID", "force": true}'

If the docset is not found, instruct the user to run /mem-oracle:index <documentation URL> first.

Report refresh results and then show /status.

Sponsors

Details

Marketplace
JagjeevanAK/mem-oracle
Source
plugin
Category
Community