Search knowledge bases and recall time-stamped memories to answer questions grounded in authoritative sources. Combines internal knowledge (via Ragclaw), public library docs (via Context7), and temporal recall (e.g. "what did I save last week?").
Search, store, and recall. This skill retrieves authoritative knowledge from internal knowledge bases (via Ragclaw) and public library/framework documentation (via Context7), then synthesizes a grounded answer with clear provenance. Supports temporal queries -- filter by when content was stored to recall recent notes, past decisions, or anything in a time window.
Activate this skill when the user asks a question where looking it up is better than reasoning from memory:
Do NOT use this skill for:
Before searching, identify:
If the user wants to store information for later recall, use kb_add with the content parameter:
content for inline text (not source).name to give the memory a descriptive label (e.g. "auth-decision-2025-04").timestamp if the user specifies when the information is from (UTC epoch ms). If omitted, it defaults to now.After storing, you're done -- skip to the response.
Always start with internal knowledge -- your team may have standards or opinions that override generic documentation.
Use kb_list_databases to list all available knowledge bases and their descriptions/keywords.
Use kb_search with a well-crafted query derived from the user's question. Target the specific concepts, not the full question verbatim.
db parameter to target the selected knowledge base(s).limit (5 results is a good default).Temporal filtering -- if the query has time signals, convert them to epoch milliseconds and pass after and/or before:
| User says | Parameters |
|---|---|
| "last 24 hours" | after: Date.now() - 86_400_000 |
| "last week" | after: Date.now() - 604_800_000 |
| "in March 2025" | after: 1740787200000, before: 1743465600000 |
| "before January" | before: 1735689600000 |
| "yesterday" | after: <start of yesterday epoch ms>, before: <start of today epoch ms> |
When computing epoch ms values, use the current date and UTC. Be precise -- "last week" means 7 days ago from now, not "the previous calendar week".
If kb_search returns a relevant chunk but you need more context from the same source, use kb_read_source with the exact source path from the search result. This returns all chunks from that source concatenated in document order.
Use Context7 to look up official library and framework documentation. Only do this if the user's query mentions specific technologies by name.
If the query is purely conceptual with no specific library or framework named (e.g. "how should I structure a microservice?"), skip this step entirely.
For each technology mentioned (up to 2-3 max), use context7_resolve-library-id:
query parameter for relevance ranking.For each resolved library ID, use context7_query-docs:
Important: Context7 tools are limited to 3 calls each per question. Budget accordingly when multiple libraries are involved.
Combine all retrieved knowledge into a structured research brief. Use the following format:
## Internal Knowledge Base
[Findings from Ragclaw searches. Include the database name for each result.]
[Reference specific documents or chunks that informed the answer.]
[If temporal filtering was used, mention the time window.]
If no knowledge bases were configured:
> No internal knowledge bases are configured. You can create one by indexing
> relevant documentation, URLs, or files using the `kb_add` tool.
> This will improve future searches with project-specific context.
If knowledge bases exist but returned no relevant results:
> No relevant results found in [database name(s)]. Consider indexing
> documentation related to [topic] to improve future searches.
## Library Documentation
[Findings from Context7 queries. Include the library name for each result.]
[Reference specific documentation sections, code examples, or patterns.]
If Context7 was skipped (no specific technology mentioned):
> No specific library or framework was referenced -- skipped public
> documentation lookup.
If Context7 returned no useful results:
> No relevant documentation found for [library name(s)].
## Synthesis & Recommendation
[Combined reasoning that integrates both internal and public knowledge.]
[Clearly call out where internal standards differ from or extend public docs.]
[Provide actionable recommendations grounded in the retrieved sources.]
[If sources conflict, acknowledge the conflict and explain your reasoning.]
| Tool | Purpose |
|---|---|
kb_search | Search for relevant chunks. Supports after/before (epoch ms) for temporal filtering. |
kb_read_source | Retrieve full content of a source (all chunks concatenated). Use source path from kb_search results. |
kb_add | Index a file/directory/URL (source) or inline text (content). Supports timestamp (epoch ms). |
kb_status | Knowledge base statistics (chunks, sources, size). |
kb_remove | Remove a source from the index. |
kb_reindex | Re-process changed sources. Supports force, prune, chunker overrides. |
kb_list_chunkers | List available chunkers (built-in and plugin-provided). |
kb_db_merge | Merge another SQLite knowledge base into a local one. |
kb_list_databases | List all knowledge bases with description and keywords. |
kb_db_init | Create a new named knowledge base. |
kb_db_info | Set description and keywords for a knowledge base. |
kb_db_info_get | Get description and keywords for a knowledge base. |
kb_db_delete | Delete a knowledge base permanently. |
kb_db_rename | Rename a knowledge base. |
kb_search is the complete, authoritative content. If the chunk doesn't contain enough detail, search with a different query instead of trying to read the source file.after/before filters. Don't just search with time words in the query -- semantic search won't reliably match timestamps.timestamp on chunks represents when the content was written or relevant (user-supplied), not necessarily when it was indexed.