Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/ZTE-AICloud/Co-OmniSpecnpx agentmods add skills/zte-aicloud/co-omnispec/knowledge-retrievalWrote 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.
[](https://agentmods.dev/skills/zte-aicloud/co-omnispec/knowledge-retrieval)<a href="https://agentmods.dev/skills/zte-aicloud/co-omnispec/knowledge-retrieval"><img src="https://agentmods.dev/badge/skills/zte-aicloud/co-omnispec/knowledge-retrieval/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.
<a href="https://agentmods.dev/skills/zte-aicloud/co-omnispec/knowledge-retrieval"><img src="https://agentmods.dev/badge/skills/zte-aicloud/co-omnispec/knowledge-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00097 | $0.04612 |
| Opus 5 | $0.00048 | $0.02306 |
| Sonnet 5 | $0.00019 | $0.00922 |
| Haiku 4.5 | $0.00010 | $0.00461 |
Grade A, and why
knowledge-retrieval 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Retrieval Skill
两种操作(与 enhance/baseline 数据模式正交)
本 Skill 有两种操作,默认是检索:
检索(默认 · 只读 · 无需任何参数)
直接说明检索诉求即可,不带任何标志。Agent 自动 config-info 探测 →
按 mode(enhance/baseline)走检索工作流。不写任何产物。
构建(--build / --update / --force · 写产物 · 显式触发)
首次接入或原始知识更新后调用,三态互斥、由用户显式选择:
--build:首次全新构建(向量索引 + graphify 图谱)。--build --update:增量刷新(向量增量、graphify--update)。--build --force:强制重建(删 graphify-out + 向量--force)。
触发方式:用户消息含上述标志,或明确要求"构建/刷新/重建知识库"。Agent 加载
reference/build.md 执行编排:装依赖(一次) → 装/检测 graphify → 建向量索引 →
图谱构建在主线程直接加载并运行 graphify skill(skill 方式,产物自动落盘)。构建完成后回到检索。
「检索 vs 构建」是做什么(读 / 写产物);「enhance vs baseline」是数据怎么组织 (有 / 无知识模型)。二者正交,可任意组合,例如「baseline + 构建」= 无模型项目首次建 chunk 索引与图谱。
--build是 Skill 触发关键字,不是 CLI 子命令。
执行说明
在项目执行目录下运行(不要 cd 进 skill 安装目录,否则 CLI 找不到 knowledge.config.yaml):
PYTHONPATH="${CLAUDE_SKILL_DIR}" python -m scripts.cli --pretty <subcommand> [args]
CLI 自动从当前目录逐级向上查找 knowledge.config.yaml;查找失败可追加 --config <绝对路径>。
⚠️ 图谱/代码检索在当前 skill 上下文内直接驱动 graphify CLI:确认 cwd 为项目根后,加载
reference/graph-query.md按其执行——它内部完成词表扩充 → 遍历 → 调graphify query/path/explain,从 cwd 的./graphify-out/graph.json读图。不嵌套调用 graphify skill,省去其构建期上下文。 检索基本只读;其中图查询会按graph-query.md写一条检索路径记录缓存(graphify save-result回流 +reflect的 LESSONS.md),用于增强后续检索命中,除此之外不写任何产物。需要全量子图时直接Read ./graphify-out/graph.json。 构建会写产物,正文见reference/build.md,仅在构建时按需加载。
阶段 0 · 能力探测(检索操作下,每次会话第一件事,必做,构建操作下可跳过)
先用一条命令摸清模式与各检索器/产物状态,后续所有门控都基于它:
PYTHONPATH="${CLAUDE_SKILL_DIR}" python -m scripts.cli --pretty config-info
返回示例:
{
"config_path": "/proj/knowledge.config.yaml",
"mode": "baseline",
"raw_knowledge_dir": "./raw_knowledge",
"vector_enabled": true,
"vector_index_exists": false,
"graph_enabled": true,
"graph_path": "/proj/graphify-out/graph.json",
"graph_exists": false
}
第一门控 · 模式路由(mode):
mode = "enhance"→ 有知识模型。走完整工作流(阶段 1 理解模型 → typed 渐进检索),全原语可用。mode = "baseline"→ 无知识模型。跳过阶段 1(无模型可理解),使用vector-search(chunk 级)+ 加载reference/graph-query.md并按其执行 graphify 查询(query/path/explain) 双路召回;typed 类原语不可用(调用会返回unavailable_in_baseline_mode)。
What ships with it
34 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- knowledge.config.example.yaml 950 B
- knowledge.config.yaml 577 B
- reference/build.md 10 KB
- reference/graph-query.md 13 KB
- requirements.txt 52 B
- scripts/__init__.py 0 B runs code
- scripts/api.py 8.3 KB runs code
- scripts/chunk_splitter.py 5.1 KB runs code
- scripts/cli.py 14 KB runs code
- scripts/embedding.py 2.2 KB runs code
- scripts/graph_context.py 4.8 KB runs code
- scripts/install_graphify.bat 2.6 KB runs code
- scripts/install_graphify.sh 2.3 KB runs code
- scripts/instance_parser.py 8.2 KB runs code
- scripts/knowledge_base.py 5.0 KB runs code
- scripts/models.py 3.3 KB runs code
- scripts/retrievers/__init__.py 354 B runs code
- scripts/retrievers/base.py 473 B runs code
- scripts/retrievers/document.py 1.2 KB runs code
- scripts/retrievers/fuzzy.py 4.1 KB runs code
- scripts/retrievers/metadata.py 2.6 KB runs code
- scripts/retrievers/section.py 3.1 KB runs code
- scripts/retrievers/vector.py 17 KB runs code
- scripts/schema_loader.py 2.6 KB runs code
- templates/default-schema/_meta.yaml 2.7 KB
- templates/default-schema/entities/context.yaml 2.1 KB
- templates/default-schema/entities/entity.yaml 2.3 KB
- templates/default-schema/entities/external_interface.yaml 2.2 KB
- templates/default-schema/entities/function.yaml 2.9 KB
- templates/default-schema/entities/interface.yaml 2.6 KB
- templates/default-schema/entities/logic_architecture.yaml 2.6 KB
- templates/default-schema/entities/requirement.yaml 1.6 KB
- templates/default-schema/entities/scenario.yaml 1.4 KB
- templates/default-schema/relation-ontology.yaml 1.7 KB
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.
- 9d ago First seen · 263 lines · 97 tokens per session scan A 2b6078fe946d
knowledge-retrieval is a skill published in the GitHub repository ZTE-AICloud/Co-OmniSpec (54 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 4,612 once invoked, about $0.0005 per session on Opus 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-30.
Other skills, from other repositories
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
llm-app-patterns
Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.
9router-embeddings
Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.
azure-search-documents-dotnet
Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…
browserwing-admin
Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.
similarity-search-patterns
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.