PluginBench
Skill
Pass
Audit score 90

knowledge-agent

thedotmack/claude-mem

Build and query AI-powered knowledge bases from your observation history to create focused "brains" on specific topics.

What is knowledge-agent?

Knowledge agents let you compile filtered observations into conversational AI sessions that answer questions about past work patterns, decisions, and expertise. Build a corpus from your observations, prime it into an AI session, then query it conversationally—useful for creating focused "brains" like "everything about hooks" or "all bugfixes from last month".

  • Filter observations by project, type, concepts, files, dates, or semantic search to build focused corpora
  • Prime a corpus into an AI session that persists across multiple queries
  • Query the knowledge base conversationally with follow-up questions maintaining context
  • Rebuild corpora to incorporate new observations and reprime for fresh context
  • List all corpora with statistics and priming status

How to install knowledge-agent

npx skills add https://github.com/thedotmack/claude-mem --skill knowledge-agent
Prerequisites
  • claude-mem installed and observations already recorded
  • Access to observation history with project, type, concept, and file metadata
Claude Code
Cursor
Windsurf
Cline

How to use knowledge-agent

  1. 1.Run build_corpus with filters (project, types, concepts, files, query, dateStart/dateEnd, limit) to create a focused corpus
  2. 2.Run prime_corpus to load the corpus into an AI session
  3. 3.Run query_corpus with your question; follow-up questions maintain context automatically
  4. 4.Run list_corpora to see all available corpora and their stats
  5. 5.Run rebuild_corpus when new observations are added, then reprime_corpus for a fresh session

Use cases

Good for
  • Create a hooks expertise corpus and ask questions about lifecycle behavior and timing
  • Compile all decisions from the last month into a corpus to review decision patterns
  • Build a corpus of bugfixes for a specific service to understand common issues
  • Query past work patterns to understand project architecture and design decisions
  • Maintain a focused brain on a specific topic and update it as new observations are added
Who it's for
  • Developers reviewing their own work patterns and decisions
  • Teams compiling institutional knowledge on specific systems or services
  • Engineers onboarding to understand past decisions and architecture
  • Anyone building custom knowledge bases from their observation history

knowledge-agent FAQ

What's the difference between priming and querying?

Priming loads a corpus into an AI session (one-time setup). Querying asks questions of that primed session. Prime once, then query multiple times.

How do I update a corpus with new observations?

Run rebuild_corpus to refresh it with new observations, then reprime_corpus to load the updated knowledge into a fresh session.

Can I ask follow-up questions?

Yes. After querying, follow-up questions maintain context within the same primed session until you reprime.

What filter options work best?

Combine project, types (decision/bugfix/feature/refactor/discovery/change), concepts, and files. Semantic search via query also works. Focused filters produce better results than broad ones.

What happens if the conversation drifts?

Run reprime_corpus to clear prior Q&A context and reload the corpus into a new session.

Full instructions (SKILL.md)

Source of truth, from thedotmack/claude-mem.


name: knowledge-agent description: Build and query AI-powered knowledge bases from claude-mem observations. Use when users want to create focused "brains" from their observation history, ask questions about past work patterns, or compile expertise on specific topics.

Knowledge Agent

Build and query AI-powered knowledge bases from claude-mem observations.

What Are Knowledge Agents?

Knowledge agents are filtered corpora of observations compiled into a conversational AI session. Build a corpus from your observation history, prime it (loads the knowledge into an AI session), then ask it questions conversationally.

Think of them as custom "brains": "everything about hooks", "all decisions from the last month", "all bugfixes for the worker service".

Workflow

Step 1: Build a corpus

build_corpus name="hooks-expertise" description="Everything about the hooks lifecycle" project="claude-mem" concepts="hooks" limit=500

Filter options:

  • project — filter by project name
  • types — comma-separated: decision, bugfix, feature, refactor, discovery, change
  • concepts — comma-separated concept tags
  • files — comma-separated file paths (prefix match)
  • query — semantic search query
  • dateStart / dateEnd — ISO date range
  • limit — max observations (default 500)

Step 2: Prime the corpus

prime_corpus name="hooks-expertise"

This creates an AI session loaded with all the corpus knowledge. Takes a moment for large corpora.

Step 3: Query

query_corpus name="hooks-expertise" question="What are the 5 lifecycle hooks and when does each fire?"

The knowledge agent answers from its corpus. Follow-up questions maintain context.

Step 4: List corpora

list_corpora

Shows all corpora with stats and priming status.

Tips

  • Focused corpora work best — "hooks architecture" beats "everything ever"
  • Prime once, query many times — the session persists across queries
  • Reprime for fresh context — if the conversation drifts, reprime to reset
  • Rebuild to update — when new observations are added, rebuild then reprime

Maintenance

Rebuild a corpus (refresh with new observations)

rebuild_corpus name="hooks-expertise"

After rebuilding, reprime to load the updated knowledge:

Reprime (fresh session)

reprime_corpus name="hooks-expertise"

Clears prior Q&A context and reloads the corpus into a new session.