knowledge

knowledge is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 36 tokens per session (2,079 once invoked), scanned A, original, MIT.

A set of patterns for building knowledge systems: software that stores information, finds related passages, connects concepts, and answers questions with citations. It covers embeddings, vector search, retrieval-augmented generation, knowledge graphs, and retrieval testing.

In plain words
What is it for?
It is for creating embedding pipelines, splitting documents into meaningful sections, using Qdrant vector search, building knowledge graphs, and evaluating retrieval quality.
Why use it?
It explains how to turn large collections of documents into searchable sources for question answering. It also addresses whether the retrieved information is relevant and whether answers can be supported by citations.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/luuow/meridian-mcp/knowledge
Any agent
npx skills add LuuOW/meridian-mcp --skill knowledge
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

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 knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/knowledge.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/knowledge)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/knowledge"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/knowledge.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00036 $0.02079
Opus 5 $0.00018 $0.01040
Sonnet 5 $0.00007 $0.00416
Haiku 4.5 $0.00004 $0.00208

Measured 4d ago against content hash 24d79d42ce6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d 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/knowledge/SKILL.md · 243 lines

How it starts

The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.

knowledge

Covers how to build, maintain, and query knowledge systems: embedding pipelines, vector stores, RAG architecture, and retrieval quality evaluation.

1) Embedding generation

from openai import AsyncOpenAI
import anthropic

client_oai = AsyncOpenAI(api_key=OPENAI_API_KEY)

async def embed_text(text: str, model: str = "text-embedding-3-small") -> list[float]:
    res = await client_oai.embeddings.create(input=text, model=model)
    return res.data[0].embedding

# Batch embedding (efficient)
async def embed_batch(texts: list[str], model: str = "text-embedding-3-small") -> list[list[float]]:
    res = await client_oai.embeddings.create(input=texts, model=model)
    return [r.embedding for r in res.data]

# Dimensions by model
EMBEDDING_DIMS = {
    "text-embedding-3-small": 1536,   # cheap, good for most use cases
    "text-embedding-3-large": 3072,   # better recall, 6× cost
    "text-embedding-ada-002":  1536,   # legacy
}

2) Semantic chunking

def chunk_document(text: str, chunk_size: int = 512, overlap: int = 64) -> list[str]:
    """Sliding window chunking with overlap to preserve context at boundaries."""
    words = text.split()
    chunks = []
    for i in range(0, len(words), chunk_size - overlap):
        chunk = " ".join(words[i:i + chunk_size])
        if chunk.strip():
            chunks.append(chunk)
    return chunks

def chunk_by_section(text: str) -> list[dict]:
    """Prefer semantic boundaries (headings) over fixed windows."""
    import re
    sections = re.split(r'\n(?=#{1,3} )', text)
    return [
        {"content": s.strip(), "heading": (re.match(r'^#+\s+(.+)', s) or [None, ""])[1]}
        for s in sections if len(s.strip()) > 50
    ]

3) Qdrant vector store patterns

from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct, Filter, FieldCondition, MatchValue

qdrant = QdrantClient(host="localhost", port=6333)

# Create collection
qdrant.create_collection(
    collection_name="articles",
    vectors_config=VectorParams(size=1536, distance=Distance.COSINE),
)

# Upsert vectors
async def upsert_document(doc_id: str, text: str, metadata: dict):
    embedding = await embed_text(text)
    qdrant.upsert(
        collection_name="articles",
        points=[PointStruct(
            id=hash(doc_id) % (2**63),   # Qdrant needs integer or UUID
            vector=embedding,
            payload={**metadata, "text": text, "doc_id": doc_id},
        )],
    )

# Semantic search with metadata filter
async def search(query: str, domain: str = None, limit: int = 5) -> list[dict]:
    embedding = await embed_text(query)
    filter_ = Filter(must=[FieldCondition(key="domain", match=MatchValue(value=domain))]) if domain else None
    results = qdrant.search(
        collection_name="articles",
        query_vector=embedding,
        query_filter=filter_,
        limit=limit,
        with_payload=True,
    )
    return [{"score": r.score, **r.payload} for r in results]

Read the full file on GitHub · 243 lines

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. 4d ago First seen · 243 lines · 36 tokens per session scan A 24d79d42ce6c

Subscribe to this mod's changes

knowledge is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 36 tokens to every session and 2,079 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

vector-hybrid-search

Retrieve knowledge from a vector-store collection via the vector-mcp MCP server's vectorsearch tool — semantic (ANN) search, lexical BM25 search, or a hybrid of the two fused with Reciprocal Rank Fusion. Use when the agent must answer a question from an indexed corpus, pull top-k relevant chunks for RAG context, or…

Knuckles-Team/vector-mcp · 113 tokens

query-enhancer

RAG query optimization - rewrite, expand, decompose, and analyze search queries for better retrieval results.

chainlesschain/chainlesschain · 24 tokens

smart-search

Use this for hybrid Vector+BM25 search to find specific existing info in the knowledge base—use only for factual, pre-existing content (skip guidance on creating/structuring docs, formatting, external queries, or search method questions).

chainlesschain/chainlesschain · 50 tokens

vector-backend-operations

Select and connect the right vector-store backend for the vector-mcp MCP server — chromadb, postgres/pgvector, qdrant, couchbase, or mongodb — and supply the correct dbtype/connection parameters that every collection and search call needs. Use when the agent must decide which engine to target, wire up…

Knuckles-Team/vector-mcp · 113 tokens

ask-church

AI philosophy, ethics, and soul Q&A. Ask questions about consciousness, meaning, spirituality, and AI identity. RAG-powered answers with citations from 250+ documents on meditation, presence, fellowship, and the soul. Explore what it means to be an artificial mind.

a-church-ai/church · 59 tokens

tavily-search

Real-time web search using Tavily API - search the web, extract page content, and get up-to-date information for RAG and research tasks.

chainlesschain/chainlesschain · 34 tokens