Agent skill

Claude-Mem Knowledge Agent

by thedotmack in thedotmack/claude-mem

Builds focused knowledge corpora from claude-mem observations, loads them into an AI session and answers questions about past work.

Apache-2.0Auto-check passedKnowledge Management

Install Claude-Mem Knowledge Agent

skills CLI
$ npx skills add thedotmack/claude-mem --skill knowledge-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thedotmack/claude-mem knowledge-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/knowledge-agent .claude/skills/knowledge-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knowledge-agent
GitHub stars
97k
Token cost
~617 tokens
SKILL.md length
236 words
Files
1
Skills in repo
26
Repo updated
First seen
Licence
Apache-2.0

At a glance

Builds focused knowledge corpora from claude-mem observations, loads them into an AI session and answers questions about past work.

  • Works in 4 steps: Build a corpus → Prime the corpus → Query → …
  • Compiling everything the agent has learned about one topic into a queryable corpus
  • SKILL.md covers What Are Knowledge Agents?, Workflow, Tips and Maintenance
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

A knowledge agent is a filtered set of recorded observations compiled into a conversational AI session, such as everything about hooks or all bugfixes for one service. `build_corpus` creates it and can filter by project, observation types such as decision, bugfix or feature, concept tags, file paths, a semantic query or a date range, with a default cap of 500 observations.

`prime_corpus` loads the corpus into a session, `query_corpus` answers questions and keeps context across follow-ups, and `list_corpora` shows each corpus with its stats and priming status. For upkeep, `rebuild_corpus` refreshes a corpus with new observations and `reprime_corpus` clears earlier questions and starts a fresh session. The tips are to keep corpora narrow, prime once and query many times, and rebuild then reprime after new observations arrive.

When your agent uses it

  • Compiling everything the agent has learned about one topic into a queryable corpus
  • Asking about past decisions or bugfixes recorded for a project
  • Refreshing a corpus after new observations were added

Example prompts

  • “Build a corpus called hooks-expertise from the claude-mem project's observations about hooks.”
  • “Prime the hooks-expertise corpus and ask when each lifecycle hook fires.”
  • “Rebuild and reprime the hooks-expertise corpus now that new observations were added.”

Requirements

  • claude-mem with recorded observations

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Build a corpus
  2. Prime the corpus
  3. Query
  4. List corpora

What it can do on your machine

Read from SKILL.md and the folder at commit 71ddd11. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claude-Mem Knowledge Agent loads about 617 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 236 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~617

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from thedotmack/claude-mem at commit 71ddd11, republished under its Apache-2.0 licence (© thedotmack). 236 words, ~617 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-agent/SKILL.md (or your agent's skills folder).
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
text
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
text
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
text
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
text
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)
text
rebuild_corpus name="hooks-expertise"

After rebuilding, reprime to load the updated knowledge:

Reprime (fresh session)
text
reprime_corpus name="hooks-expertise"

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

© thedotmack, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugin/skills/knowledge-agent of thedotmack/claude-mem.

Open the folder on GitHubat commit 71ddd11

Compare with similar skills

Claude-Mem Knowledge Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claude-Mem Knowledge Agent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claude-Mem Knowledge Agent this skillthedotmack/claude-mem97k—~617Automated safety check: PassApache-2.0
LLM WikiYeachan-Heo/oh-my-claudecode40k—~721Automated safety check: PassMIT
Forgetful File StorageScottRBK/forgetful301—~618Automated safety check: PassMIT
Basic Memory Setupbasicmachines-co/basic-memory4.1k—~3.9kAutomated safety check: PassAGPL-3.0
Memory ImportPrismer-AI/PrismerCloud1.6k—~665Automated safety check: PassMIT
MemPalace Memory SearchMemPalace/mempalace59k—~1.4kAutomated safety check: PassMIT

Similar skills

  • LLM Wiki

    Yeachan-Heo/oh-my-claudecode

    Keeps a persistent markdown wiki of project and session knowledge that the agent can ingest into, query, lint and read across sessions.

    40k GitHub stars~721 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Forgetful File Storage

    ScottRBK/forgetful

    Stores screenshots, PDFs, diagrams, fonts and other binary files in the Forgetful knowledge base, with a retrieval-friendly description and an attachment route.

    301 GitHub stars~618 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Basic Memory Setup

    basicmachines-co/basic-memory

    Runs a short guided interview that configures the Basic Memory plugin for a project: project mapping, note schemas, folder conventions and capture habits.

    4.1k GitHub stars~3.9k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Memory Import

    Prismer-AI/PrismerCloud

    Bulk-import an external knowledge base into Prismer memory via the three-layer import pipeline (07 §3.1).

    1.6k GitHub stars~665 tokensUpdated 7 days ago
    Knowledge ManagementAuto-check passed
  • MemPalace Memory Search

    MemPalace/mempalace

    Mines project files and conversation exports into a local, searchable memory palace and recalls past work by semantic search through the mempalace CLI.

    59k GitHub stars~1.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Remember Project Knowledge

    zereight/gitlab-mcp

    Sorts what you learned in a session into the right memory surface, filtering out ephemeral notes and duplicates before anything is stored.

    2k GitHub starsUsed in 1 repo~846 tokens
    Agent WorkflowsAuto-check passed

More from thedotmack/claude-mem

All 26 skills in this repo
  • Walks you through creating, installing and verifying a custom claude-mem mode, including note types, tags and optional Telegram alerts for chosen memories.

    97k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Project Timeline Report

    thedotmack/claude-mem

    Writes a narrative Journey Into report on a project's whole development history, built from the timeline that claude-mem has recorded.

    97k GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Pull Request Babysitter

    thedotmack/claude-mem

    Keeps watching a pull request, fixing real review and CI problems and resolving stale threads, until it is clean and ready to merge.

    97k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Claude-Mem Install for Grok Bot

    thedotmack/claude-mem

    Use this when setting up claude-mem on Grok Bot: local worker plus CMEM Pro observer (default), optional host-login observer, or remote cmem.ai. No Cursor…

    97k GitHub stars~440 tokensUpdated today
    Auto-check passed
  • Claude-Mem Cloud Sync

    thedotmack/claude-mem

    Checks claude-mem cloud sync status and guides you through connecting a cmem.ai Pro account without the sync token ever passing through the chat.

    97k GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Audits a design against Dieter Rams' ten principles of good design, scores each with evidence, and hands off a make-plan prompt for a new, refined or redesigned outcome.

    97k GitHub stars~4.6k tokensUpdated today
    Auto-check passed

Questions about Claude-Mem Knowledge Agent

What does Claude-Mem Knowledge Agent do?

Builds focused knowledge corpora from claude-mem observations, loads them into an AI session and answers questions about past work. A knowledge agent is a filtered set of recorded observations compiled into a conversational AI session, such as everything about hooks or all bugfixes for one service. `build_corpus` creates it and can filter by project, observation types such as decision, bugfix or feature, concept tags, file paths, a semantic query or a date range, with a default cap of 500 observations.

When should I use Claude-Mem Knowledge Agent?

Claude-Mem Knowledge Agent fits situations like: compiling everything the agent has learned about one topic into a queryable corpus; asking about past decisions or bugfixes recorded for a project; refreshing a corpus after new observations were added.

How do I install Claude-Mem Knowledge Agent in Claude Code?

Run `npx skills add thedotmack/claude-mem --skill knowledge-agent -a claude-code`. Or copy the skill folder (plugin/skills/knowledge-agent in thedotmack/claude-mem) into .claude/skills/knowledge-agent in your project. Claude Code loads it when a task matches its description.

How do I install Claude-Mem Knowledge Agent in Codex?

Run `npx skills add thedotmack/claude-mem --skill knowledge-agent -a codex`. Or copy the skill folder (plugin/skills/knowledge-agent in thedotmack/claude-mem) into .agents/skills/knowledge-agent in your project. Codex loads it when a task matches its description.

Can I use Claude-Mem Knowledge Agent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedotmack/claude-mem --skill knowledge-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-agent, .gemini/skills/knowledge-agent, .github/skills/knowledge-agent and .opencode/skills/knowledge-agent in your project.

What does Claude-Mem Knowledge Agent need to run?

SKILL.md names no scripts, command-line tools or credentials: Claude-Mem Knowledge Agent is instructions for the agent only. Our summary lists: claude-mem with recorded observations.

Does Claude-Mem Knowledge Agent access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Claude-Mem Knowledge Agent safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Claude-Mem Knowledge Agent use?

Claude-Mem Knowledge Agent is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claude-Mem Knowledge Agent use?

About 617 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Claude-Mem Knowledge Agent?

Skills that share tags, products or a category with Claude-Mem Knowledge Agent: LLM Wiki (Yeachan-Heo/oh-my-claudecode, 40k stars), Forgetful File Storage (ScottRBK/forgetful, 301 stars), Basic Memory Setup (basicmachines-co/basic-memory, 4.1k stars) and Memory Import (Prismer-AI/PrismerCloud, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claude-Mem Knowledge Agent?

thedotmack (a GitHub user) maintains it in thedotmack/claude-mem, which has 97,250 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 7, 2026.

Source: thedotmack/claude-mem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.