/library:libraryfrom library
Read the user's past work with Claude from this Claude Code session, both Claude Desktop chats and earlier Claude Code sessions. Activates when the user references past chats or past terminal work, asks "what did I tell Claude about X", "find that conversation where I", "when did I last touch Y", "what did we decide about Z", or invokes /library. Routes through the library MCP server.
Ships in library. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A read-only window into everything the user has worked through with Claude. Two sources, one index:
~/.claude/projects, grouped by working directory.State lives in ~/.claude/library/library.db. Use the library_* tools for every operation. Never read or write the cache file directly.
Two paths.
Awareness path. The user references their own Claude history in natural language. Examples:
Take the find sequence below.
Explicit path. The user typed /library or /library <action>. Jump to Actions.
Don't fire for things obviously about the current session, which you can already see.
Default loop when the user wants to recall something from past chats.
library_search with a tight query. 2-4 keywords, FTS5 syntax. Don't dump the whole user query in.[chat/human], [chat/assistant], [code/human] and [code/assistant] from messages, [doc] from project knowledge-base files, [memory #N] from memory snapshots, [artifact] from code blocks. A message hit shows the day its message was written after the title. Code hits also show their working directory.library_open <uuid> to read the full item. For conversations, call library_outline first, then library_open with from/to bounds.If library_search returns nothing, call library_list to see what's cached. The user may need to sync.
source= narrows message hits. Default is both, which is usually right.
source=chat when the user is recalling thinking: decisions, strategy, drafting, anything they talked through rather than built.source=code when the user is recalling work: when a file changed, which command they ran, what broke in a repo.Code sessions hold what the user typed and what Claude replied. They never hold file contents or command output, so don't expect to recover a diff or a stack trace from them. Read the repo for that.
Three more filters apply to message hits only, as source= does. They combine with each other and with source=. Under kind=all they narrow the message part and leave docs, memory and artifacts as they are.
project= takes a project name or UUID, resolved the way library_list's project is. For a Claude Code session the name is its working directory as hits print it, such as ~/Sites/app. A project nothing matches answers No project matches: call library_projects for the names.before= takes an ISO date or datetime and keeps only messages created before it. A bare date means the start of that day. A time without an offset is UTC, as the dates on hits are.sender= is all (default), human for what the user wrote, or assistant for what Claude replied.What the user typed in one repo before a given day is one call: project=~/Sites/app before=2026-11-02 sender=human source=code.
An unknown sender or an unparseable before is an error that names the accepted form.
FTS5 doesn't stem, translate, or fuzzy-match. The cached corpus may be in a different language than the question, or mixed.
Check library_list titles first to spot the corpus language.
OR and merge.If the question and the titles are in different languages, translate the salient nouns into the corpus language before searching. People ask in their working language. The conversation was written in whatever they used at the time.
Hit rate goes up when you:
"the broken build" becomes broken.When a title looks right but search misses, fall back to library_list for browsing or library_outline on the suspected UUID.
(no argument) or statusCall library_status. Print the result. If cached conversations: 0, suggest /library sync.
sync [--full] [--org NAME]Call library_sync. Set full: true if --full is present. Pass org if given. Print the result.
Sync is incremental by default. It pulls conversation metadata for every page and only fetches message bodies for new or updated conversations. --full re-fetches everything.
ingest [--full]Call library_ingest. Set full: true if --full is present. Print the result.
Pulls Claude Code sessions from ~/.claude/projects. This runs on its own at the start and end of every session, so reach for it only when the user wants the index current right now, or when --full is needed to rebuild after a parser change.
list [N] [--project NAME]Call library_list with limit and optional project. Default limit 25. Print the table.
search <query> [--kind KIND] [--source SOURCE] [--project NAME] [--before DATE] [--sender SENDER]Call library_search with the query. Optionally pass source (all, chat, code) to restrict message hits to one origin, project (a project name or UUID), before (an ISO date or datetime) and sender (all, human, assistant) to narrow them further, and kind to restrict to one backend:
all (default): messages, docs, memory, artifactsmessages: conversation message bodies onlydocs: project knowledge-base documents onlymemory: organization memory snapshots (no query = list all snapshots)artifacts: extracted code blocks and antArtifact tagstool_calls: tool invocations (query matches tool name)citations: web citations (query matches title, URL, site name)shares: shared conversation snapshotsprojects [--name NAME] [--detail]Call library_projects. With no args, lists all projects with conversation counts. With name=X, filters to one project. With name=X detail=true, returns the full record including system prompt.
outline <uuid>Call library_outline. Print the outline.
open <uuid> [from] [to]Call library_open. Detects what kind of item the UUID belongs to (conversation, doc, artifact, share, or memory snapshot) and returns the appropriate content. For conversations, from/to bound the message range.
Print:
Common moves:
library sync pull new and updated conversations
library list show cached conversations
library search <query> full-text search across messages, docs, memory, artifacts
library search <query> kind=X restrict to one source (messages/docs/memory/artifacts/tool_calls/citations/shares)
library search <query> project=X before=DATE sender=human narrow message hits
library projects list projects with conversation counts
library projects name=X detail=true full project record including system prompt
library outline <uuid> turn-by-turn outline of one conversation
library open <uuid> read any item by uuid (conversation, doc, artifact, share, memory)
library status cache and auth check
library_open an entire 200-message conversation when the user asked one question. Use library_outline plus a bounded library_open.library_status to see if the cache is empty.~/.claude/library/library.db with Bash. Use the tools.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
library@by-mischa is listed by mischasigtermans/by-mischa — review the source before installing
npx claudepluginhub mischasigtermans/by-mischa --plugin library