qi-cli

qi-cli is a skill for Claude Code, Codex from itsmostafa/qi. It costs 92 tokens per session (3,847 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 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,847 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.00092 $0.03847
Opus 5.5 $0.00037 $0.01539
Sonnet 5.5 $0.00018 $0.00769
Haiku 4.5 $0.00009 $0.00385

Measured 1mo ago against content hash 8dd4673a069e, 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 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.

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 · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 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 (config lists a sample ~/notes collection)
qi index ~/notes                          # Index a directory; it is saved to config as a collection
qi doctor                                 # Verify setup
qi search "your query"                    # BM25 keyword search (no provider needed)
qi query "your semantic question"         # Hybrid search; keyword-only, with a warning, if no provider is configured

index, search, query, get, list, stats, delete and hook need a config file, so run qi init first. qi update, --version and --help work without one, and qi doctor reports a missing file as a failed check.


Commands

qi init

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

qi init

qi index [path|collection]...

Indexes documents. A file whose size and mtime match the last run is skipped without being read; otherwise SHA-256 content hashing decides whether it changed. Files over 10 MiB and binary files (a NUL byte in the first 8000 bytes) are skipped and counted in skipped, as are hidden directories, common tool directories (node_modules, vendor, dist, build, …) and symlinks. Documents whose files are gone are deleted from the database in the same run. A second qi index against the same database waits for the first to finish rather than failing. Use --force to reprocess unchanged files, e.g. after a qi upgrade changes parsing.

Without an extensions list, a collection indexes only .md, .markdown, .txt and .text. List other formats explicitly: .mdx (Markdown; MDX import/export and JSX tag lines are ignored), .rst (reStructuredText) and .adoc/.asciidoc (AsciiDoc) are split at section titles into heading paths; any other listed extension is plain text.

Read the full file on GitHub · 319 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. 1mo ago Changed · +7 lines · +4 tokens per session 8dd4673a069e
  2. 1mo ago Changed · +9 lines 58ef93b7affd
  3. 2mo ago Changed · +8 lines 561bfa92899b
  4. 2mo ago Changed · +20 lines b57a1eb5db18
  5. 2mo ago Changed · +11 lines · -27 tokens per session a8371a35bab1
  6. 2mo ago Changed · -44 lines · -10 tokens per session a9b59a126f2a
  7. 3mo 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 (43 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 3,847 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

qi-cli compared with skills from other repositories

qi-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
qi-cliitsmostafa/qiSkill431mo agoMITA92Claude Code, Codex
wegent-knowledgewecode-ai/WegentSkill895yesterdayApache-2.0A60Claude Code, Codex
llm-wikiAr9av/obsidian-wikiSkill3.8k3d agoMITA41Claude Code
llmwikiatomicstrata/llm-wiki-compilerSkill2.3k2d agoMITA66Claude Code, Codex
karpathy-llm-wikiAstro-Han/karpathy-llm-wikiSkill2.8k4mo agoMITA67Claude Code, Codex
retrieval-workflowJetXu-LLM/DocMasonSkill1524d agoApache-2.0A18Claude Code, Codex
cartographer-kb-ingest-planBeppeTemp/cartographerSkill69yesterdayApache-2.0A88Claude Code, Codex