qi-cli

qi-cli is a skill for Claude Code, Codex from itsmostafa/qi. It costs 88 tokens per session (2,785 once invoked), scanned A, original, MIT.

A guide to qi, a local command-line tool for indexing documents and finding information in them. It supports keyword search, meaning-based search, and answers generated from the indexed sources with citations.

In plain words
What is it for?
Use it to set up a local knowledge base, index or refresh files, search for matching documents, and ask questions about the stored material.
Why use it?
It helps developers search their own documents without sending the whole knowledge base to a remote search service. It separates finding source passages from generating a summarized answer.

Skill for Claude CodeCodex

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

Good fit Use it to set up a local knowledge base, index or refresh files, search for matching documents, and ask questions about the stored material.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/itsmostafa/qi/qi-cli
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 itsmostafa/qi --skill qi-cli
Clone the repo
git clone --depth 1 https://github.com/itsmostafa/qi

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin qi — /plugin install qi after adding the marketplace above.

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 qi-cli

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/itsmostafa/qi/qi-cli"><img src="https://agentmods.dev/badge/skills/itsmostafa/qi/qi-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,785 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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: 3 findings, up to medium

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 →

  • medium Rogue Agent · line 11
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Data Exfiltration · line 180
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 263
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00088 $0.02785
Opus 5.5 $0.00035 $0.01114
Sonnet 5.5 $0.00018 $0.00557
Haiku 4.5 $0.00009 $0.00279

Measured 24d ago against content hash 561bfa92899b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

qi-cli scanned grade A with 1 finding 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 24d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:11434/v1/embeddings -H "Content-Type: application/json" \
skills/qi-cli/SKILL.md · 303 lines

How it starts

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

qi is a local-first knowledge search CLI. It indexes documents into SQLite and supports BM25 full-text search and vector/hybrid search (with a local or remote embedding provider).

Quick Start

qi init                                   # Create config + database
$EDITOR ~/.config/qi/config.yaml         # Add collections and (optionally) providers
qi index                                  # Index the current directory, or a collection
qi doctor                                 # Verify setup
qi search "your query"                    # BM25 keyword search (no provider needed)
qi query "your semantic question"         # Hybrid search (needs embedding provider)

Commands

qi init

Writes ~/.config/qi/config.yaml (if absent) and initializes the SQLite database.

qi init

qi index [path|collection]

Indexes documents. SHA-256 content hashing means unchanged files are skipped. Embeddings are generated at index time — if you add an embedding provider to config after an initial index run, re-run qi index to populate the missing embeddings.

qi index                              # indexes current working directory
qi index ~/notes                      # any absolute or relative path
qi index notes                        # generated collection name from config

qi search <query>

BM25 full-text search. Fast, offline, no provider needed.

qi search "authentication"
qi search "deploy" -c wiki -n 5

qi query <query>

Semantic/hybrid search. Falls back gracefully to BM25 if the embedding provider is unavailable.

qi query "how does auth work"
qi query "deploy pipeline" --mode lexical   # BM25 only
qi query "deployment steps" --mode hybrid   # BM25 + vector (default)
qi query "critical path" --mode deep        # alias for hybrid
qi query "question" --explain               # show BM25/vector/RRF score breakdown

Modes:

  • lexical — BM25 only
  • hybrid — BM25 + vector fused with RRF; skips vector if BM25 has a clear winner
  • deep — alias for hybrid

Read the full file on GitHub · 303 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. 24d ago Changed · +8 lines 561bfa92899b
  2. 1mo ago Changed · +20 lines b57a1eb5db18
  3. 1mo ago Changed · +11 lines · -27 tokens per session a8371a35bab1
  4. 1mo ago Changed · -44 lines · -10 tokens per session a9b59a126f2a
  5. 1mo ago First seen · 308 lines · 125 tokens per session scan A 0dd3ca209dc7

Subscribe to this mod's changes

qi-cli is a skill published in the GitHub repository itsmostafa/qi (44 stars, last pushed 23d ago), licensed MIT. It adds 88 tokens to every session and 2,785 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

llm-wiki

Explain and apply the foundational LLM Wiki architecture and knowledge-management strategy. Use for setup, architecture, schema, or organization decisions; operational ingest/query/lint work uses dedicated skills.

Ar9av/obsidian-wiki · 41 tokens

llmwiki

Build and use a persistent, citation-traceable knowledge wiki from documents, research papers, notes, or project documentation. Use for llmwiki projects, retrieving reusable evidence for an agent task, or compiling a corpus for repeated questions. A one-off file read or live web search does not need a wiki.

atomicstrata/llm-wiki-compiler · 66 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

retrieval-workflow

Retrieve ranked evidence bundles from the published DocMason knowledge base.

JetXu-LLM/DocMason · 18 tokens

ingest

Populate the gnosis-mcp knowledge base — from local files, git history, or a crawled website. Handles the full matrix of flags (--force, --prune, --wipe, --embed, --include-crawled) in one place.

nicholasglazer/gnosis-mcp · 54 tokens