library — Claude Code prompt: what it does, how to install
The library prompt for Claude Code serves as a repository for task memories and operational workflows. It enables the AI to recall and apply previously successful strategies to current coding tasks.
Apache-2.0 ★ 336 updated 2026-11-10
.claude/commands/library.mdWhat library does
This prompt organizes past task executions into a searchable library. It allows the agent to retrieve object roles, specific tool configurations, and completion criteria, ensuring that the AI chooses relevant instructions based on the nature of the current goal rather than simple name matching.
Users can list available records with library_index or search through the archives using library_search. Full details of a stored memory are accessible via library_read, while library_use activates specific memory modules for immediate application. These memories can be combined or swapped out dynamically, especially if a previous attempt failed or requirements change.
What it helps with
- retrieving successful task patterns
- automating steps with historical memory
- matching task requirements to saved workflows
Example prompts for the agent
- Search the database for relevant entries using
library_search - Activate specific task memories with
library_use <id> - Read full details for a memory using
library_read <id>
How to install library
Manually: put the files in place
.claude/commands/library.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about library
How to install library in Claude Code?
Add the prompt content to a file named .claude/commands/library.md within your project folder.
What does library do?
It creates a persistent library of task memories, allowing the AI to load predefined workflows and best practices for specific coding challenges.
What is needed to use library?
You must have the prompt file saved at .claude/commands/library.md to enable the associated commands.
Source text
library.md · Apache-2.0
No Task Memory is given to you for this task. Instead a library holds the Task Memories that practice froze on many tasks, each written as described above (instruction, objects, workflow, parameters, lessons). The task each came from may not be this one: choose by what this task needs, its objects, actions and end state, not by names alone.
- `library_index` lists the entries, one line each (id, the task it came from, goal, stages), a page at a time; `library_search` gives the full cards (object roles, tools, done criteria) of the entries that match words best; `library_read` shows one entry's full Memory, a part at a time.
- `library_use` sets which Memories you use: one, several combined (say, one entry's grasp and another's placement), or more added later, after a failure as well. A Memory in use applies as described above: its object roles are identified in this scene, calls may name its specs and numbers by name (`grasp={name}`), and its done criteria gate `finish`. Drop a Memory whose done criteria do not describe how this task ends.
- What you read stays in this episode's context: read what you need, not every entry.
Where no entry fits a step, do it from what you see, with the tools.
© ArcheOne-AI · Apache-2.0 · ArcheOne-AI/RoboScript