tune

tune is a skill for Claude Code from nicholasglazer/gnosis-mcp. It costs 53 tokens per session (1,711 once invoked), scanned A, original, MIT.

A retrieval-quality testing skill for a RAG system, which answers questions by searching a document collection, using different chunk sizes and retrieval settings.

In plain words
What is it for?
It helps compare chunk sizes and retrieval modes using nDCG, MRR, and Hit@5 scores after ingesting a corpus or when the corpus changes.
Why use it?
It replaces guesswork about search configuration with measurements against a golden-query set, a list of questions paired with expected document paths.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python tests/bench/bench_real_corpus.py \.

Part of the gnosis plugin — 8 skills, 5 agents, 1 hook, 1 MCP server shipped together

Good fit It helps compare chunk sizes and retrieval modes using nDCG, MRR, and Hit@5 scores after ingesting a corpus or when the corpus changes.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/nicholasglazer/gnosis-mcp
agentmods
npx agentmods add skills/nicholasglazer/gnosis-mcp/tune

Made for: Claude Code.

Or install gnosis, the plugin that ships this one along with the rest of its 8 skills, 5 agents, 1 hook, 1 MCP server.

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 tune

README.md
[![agentmods](https://agentmods.dev/badge/skills/nicholasglazer/gnosis-mcp/tune/github.svg)](https://agentmods.dev/skills/nicholasglazer/gnosis-mcp/tune)
Your own site
<a href="https://agentmods.dev/skills/nicholasglazer/gnosis-mcp/tune"><img src="https://agentmods.dev/badge/skills/nicholasglazer/gnosis-mcp/tune/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 tune

Your own site · 80×15
<a href="https://agentmods.dev/skills/nicholasglazer/gnosis-mcp/tune"><img src="https://agentmods.dev/badge/skills/nicholasglazer/gnosis-mcp/tune.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,711 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 87
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00053 $0.01711
Opus 5 $0.00026 $0.00856
Sonnet 5 $0.00011 $0.00342
Haiku 4.5 $0.00005 $0.00171

Measured 10d ago against content hash 52abab4ef818, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

tune 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 10d 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/tune/SKILL.md · 187 lines

How it starts

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

Tune

Every RAG system has a distribution where it breaks. The only way to know whether gnosis-mcp's defaults are right for your corpus is to measure them against your queries. This skill runs that measurement.

Usage

/gnosis:tune                       # Quick sweep (5 chunk sizes, keyword mode)
/gnosis:tune full                  # Extended sweep (keyword + hybrid + rerank on/off)
/gnosis:tune --golden ./q.jsonl    # Use a specific golden-query file

Mode: $ARGUMENTS


Prerequisites

You need:

  1. A corpus — anywhere on disk. Will be passed to gnosis-mcp ingest.

  2. A golden-query file — one JSON object per line:

    {"query": "how does our auth work", "expected_paths": ["docs/auth", "architecture/auth"]}
    {"query": "stripe webhook failure runbook", "expected_paths": ["runbooks/stripe"]}
    

    expected_paths uses substring match against the returned file_path, case-insensitive. Generous enough that you don't need exact path memorization.

20 hand-written queries is enough to get signal. 50 is plenty.


Quick sweep (default)

Runs gnosis-mcp ingest 5 times with different chunk sizes, scoring each with your golden set. Keyword mode only (fast, no embedding cost).

# Default path if none given: ./docs + ./golden.jsonl
CORPUS=${CORPUS:-./docs}
GOLDEN=${GOLDEN:-./golden.jsonl}

for size in 1000 1500 2000 2500 3000; do
  uv run --with 'gnosis-mcp[embeddings] @ gnosis-mcp' \
    python tests/bench/bench_real_corpus.py \
      --corpus "$CORPUS" --golden "$GOLDEN" \
      --modes keyword --chunk-size $size \
      --out bench-results/tune-chunk${size}.json
done

(If gnosis-mcp was installed via pip rather than from source, invoke bench_real_corpus.py from the repo you cloned, and drop the uv run --with '... @ .' prefix.)

Expected runtime: 5–10 minutes per size on a typical laptop (ingest is the dominant cost; scoring itself is sub-second).

Output table:

chunk  chars │ nDCG@10 │ MRR    │ Hit@5  │ p95      │ ingest
────────────┼─────────┼────────┼────────┼──────────┼────────
       1000 │ 0.8557  │ 0.8067 │ 0.92   │ 30 ms    │ 592 s
       1500 │ 0.8529  │ 0.7967 │ 0.92   │  7 ms    │ 234 s
       2000 │ 0.8702  │ 0.7933 │ 0.92   │  7 ms    │ 210 s   ← peak
       2500 │ 0.8602  │ 0.7880 │ 0.92   │  7 ms    │ 195 s
       3000 │ 0.8459  │ 0.7880 │ 0.92   │  7 ms    │ 182 s

Read the full file on GitHub · 187 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. 10d ago First seen · 187 lines · 53 tokens per session scan A 52abab4ef818

Subscribe to this mod's changes

tune is a skill published in the GitHub repository nicholasglazer/gnosis-mcp (29 stars, last pushed 20d ago), licensed MIT. It adds 53 tokens to every session and 1,711 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

accreta-setup

Set up an accreta knowledge base over a corpus — pick a preset, write the config and a source declaration, generate the constitution, wire up MCP, and verify the first ingest. Use when someone wants an agent-maintained knowledge base with provenance and drift detection over a codebase, a document collection, or a…

francescofioredev/accreta · 100 tokens

karpathy-llm-wiki

Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.

Astro-Han/karpathy-llm-wiki · 67 tokens

neurolink-guide

Guide for using the NeuroLink SDK and CLI. Invoke when users ask how to use neurolink, integrate AI providers, add MCP tools, configure RAG, set up memory, deploy servers, or work with multimodal content. Covers SDK, CLI, providers, tools, and enterprise features.

juspay/neurolink · 65 tokens

memobase

A Russian-language skill for searching a local knowledge base built from documents and other sources such as web pages, YouTube, audio, and Obsidian notes.

maximskorohod/memobase · 25 tokens

wiki-query

A knowledge-base search skill that retrieves existing information from a local collection of documents and combines it into an answer. It can use exact matches, broader search, and links between related pages.

GYF0311/lorekit · 56 tokens

vault

Generate an Obsidian LLM wiki vault from a project's source code and any static documents in raw/.

burakolgun/vault-anything · 23 tokens