timem-knowledge

timem-knowledge is a skill for Claude Code, Codex from auuduu/dsh-timem-memory. It costs 128 tokens per session (988 once invoked), scanned A, original, MIT.

A workflow for managing a document knowledge base: searching uploaded documents, adding documents, and listing knowledge bases or files. A knowledge base is a collection of documents that can be searched later.

In plain words
What is it for?
Use it to search uploaded documents, upload files for later reference, or inspect available knowledge bases and documents.
Why use it?
It helps an agent use stored documents for answers instead of relying only on the current conversation or general knowledge.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to search uploaded documents, upload files for later reference, or inspect available knowledge bases and documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/auuduu/dsh-timem-memory/timem-knowledge
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add auuduu/dsh-timem-memory --skill timem-knowledge
Clone the repo
git clone --depth 1 https://github.com/auuduu/dsh-timem-memory

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for timem-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/auuduu/dsh-timem-memory/timem-knowledge/github.svg)](https://agentmods.dev/skills/auuduu/dsh-timem-memory/timem-knowledge)
Your own site
<a href="https://agentmods.dev/skills/auuduu/dsh-timem-memory/timem-knowledge"><img src="https://agentmods.dev/badge/skills/auuduu/dsh-timem-memory/timem-knowledge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for timem-knowledge

Your own site · 80×15
<a href="https://agentmods.dev/skills/auuduu/dsh-timem-memory/timem-knowledge"><img src="https://agentmods.dev/badge/skills/auuduu/dsh-timem-memory/timem-knowledge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 988 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00128 $0.00988
Opus 5.5 $0.00051 $0.00395
Sonnet 5.5 $0.00026 $0.00198
Haiku 4.5 $0.00013 $0.00099

Measured 1mo ago against content hash a36f9e791b7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

timem-knowledge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/timem-knowledge/SKILL.md · 85 lines

What it actually says

TiMEM Knowledge Base(DSH 适配版)

编排知识库操作 —— 搜索、上传、列出 —— 只用 MCP 原子工具。

可用性检查

TiMEM 工具在 DSH 中以 mcp__timem__* 命名。若工具列表中不存在这些工具,说明 TiMEM MCP 未连接——跳过本 skill,不要猜别的工具名。

每回合清单

- [ ] 1. 这是知识库任务吗?
- [ ] 2. 搜索 → mcp__timem__search_knowledge(query=...)
- [ ] 3. 上传 → mcp__timem__upload_document(file_content=..., filename=...)
- [ ] 4. 列出/查看 → mcp__timem__list_knowledge_bases() 或 mcp__timem__list_documents()
- [ ] 5. 对照用户问题核实结果
- [ ] 6. 回答用户

何时搜索知识库

仅当以下情况用 mcp__timem__search_knowledge:

  • 用户的问题可能由已上传文档(PDF、文档、笔记)回答
  • 用户明确要求查自己的知识库
  • 答案依赖之前上传文件的内容

以下情况不要用 mcp__timem__search_knowledge:

  • 个人偏好或对话历史 → 用 mcp__timem__search_memories
  • 模型本身就知道的常识
  • 代码仓库问题 → 用 mcp__timem__search_memories(domain="coding")

何时上传

以下情况用 mcp__timem__upload_document:

  • 用户发来文件并说「加入知识库」「归档」「上传到知识库」
  • 用户想存一份文档供以后检索
  • 用户粘贴内容并明确要进知识库

不要上传:

  • 对话片段 → 用 mcp__timem__create_memory
  • 无复用价值的临时内容

何时列出

  • mcp__timem__list_knowledge_bases() —— 用户问「我有哪些知识库?」或首次搜索前拿不准
  • mcp__timem__list_documents() —— 检查上传是否处理完成,或浏览知识库内容

kb_id 指引

情形 kb_id
默认 / 用户未指定 省略 —— 自动解析到默认知识库
用户指定具体知识库 传 mcp__timem__list_knowledge_bases 结果里的 kb_id

知识库 vs 记忆

维度 知识库 记忆
来源 上传文件(PDF、MD、TXT…) 对话轮次
内容 文档、参考资料、笔记 偏好、决策、经验
工具 mcp__timem__search_knowledge / mcp__timem__upload_document mcp__timem__search_memories / mcp__timem__create_memory
范围 按知识库 按 domain + session

两类都能回答时,事实/文档内容优先知识库,个人/历史背景优先记忆。

反模式

  • 不要把 mcp__timem__search_knowledge 当 mcp__timem__search_memories 的替代品
  • 不要上传对话记录 —— 用 mcp__timem__create_memory
  • 不要调用 should_*、begin_coding_turn、end_coding_turn
  • 上传时 file_content 必须 Base64 编码
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 85 lines · 128 tokens per session scan A a36f9e791b7c

Subscribe to this mod's changes

timem-knowledge is a skill published in the GitHub repository auuduu/dsh-timem-memory (0 stars, last pushed 2mo ago), licensed MIT. It adds 128 tokens to every session and 988 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

okfy

Use when a user wants an agent to use docs through OKFy, set up or verify an OKFy MCP docs source, convert docs websites or local Markdown into OKF bundles, generate activation proof, or answer from an existing OKFy bundle/workspace.

0dust/OKFy · 54 tokens

markitdown

Converts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 62 tokens

agents-llamaindex

Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…

davila7/claude-code-templates · 72 tokens

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens

rag-pipeline

A guide to RAG, a method where a system retrieves relevant passages from an external knowledge base before an AI model writes an answer. It covers splitting documents, searching by meaning or exact words, combining results, and measuring retrieval quality.

bojieli/ai-agent-book · 125 tokens

xberg-picking-a-format

Use when choosing an output format for extracted documents — plain text, markdown, djot, HTML, JSON, or DocTags. Maps consumer (LLM, parser, archive) to the right --format / --content-format pair.

xberg-io/xberg · 51 tokens