knowledge-agent
π―SkillTurns the notes claude-mem keeps about your past work into focused knowledge bases you can chat with. You pick notes by project, topic, file, or date, load them into a session, then ask questions about past decisions and fixes.
Installation
npx skills add thedotmack/claude-mem --skill knowledge-agentRun it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).
Uses skills.sh Β· Node.js 22.20+
After installing
Ask for related work and the agent uses it on its own, or call it yourself.
/knowledge-agentInstall by hand
Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.
Open the skill folder β- This project
.claude/skills/knowledge-agent/ - All projects
~/.claude/skills/knowledge-agent/
These paths are for Claude Code. For other tools, the command above puts it in the right place.
SKILL.md
View on GitHub β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 nametypesβ comma-separated: decision, bugfix, feature, refactor, discovery, changeconceptsβ comma-separated concept tagsfilesβ comma-separated file paths (prefix match)queryβ semantic search querydateStart/dateEndβ ISO date rangelimitβ 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.
More from this repository10
Claude-Mem gives Claude Code a memory that stays after a session ends. It keeps that memory in a compressed, shorter form.
claude-mem gives Claude Code a memory that lasts between sessions. It records what Claude does while you work, saves short summaries, and shows that context automatically when you start a new session.
Searches your saved Claude-Mem memory on cmem.ai to recall what happened in earlier sessions. It answers questions like what you did last time on a project, file or decision.
Lets your AI agent explore a codebase by looking at its outline first, such as function and class names, instead of reading whole files. This saves the agent's reading budget. It uses three companion tools to search code, show a file's structure, and open only the part you need.
Helps your AI agent write a step-by-step plan before building a feature. It first checks the real documentation for what is available, then splits the work into phases. Each phase has a clear goal, examples to copy, checks to prove it works, and mistakes to avoid.
Carries out a step-by-step plan by handing each piece of work to separate helper agents. After each step it checks the result, reviews the code and saves the changes to git only when the checks pass.
Writes a story-style report of a project's whole development history, based on the notes that claude-mem has saved over time. It needs the claude-mem background service to be running.
Automated semantic versioning and release workflow for Claude Code plugins, bumps package.json, marketplace.json, and plugin.json in lockstep, runs the build, tags the commit, creates a GitHub release, and generates changelog entries. Enforces 'nothing left uncommitted or unpushed' by running git status at the end.
Reviews a design against Dieter Rams' ten principles of good design, scoring each one with evidence. It then recommends a new design, a refinement or a redesign, and writes a ready-to-use prompt for /make-plan.
Tells your AI to read every source file in your project in full before starting work, so it deeply understands the code. It uses a lot of tokens up front to save effort later.