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.
npx agentmods add instructions/itsmostafa/qi/claude-mdgit clone --depth 1 https://github.com/itsmostafa/qiWhat 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 | $0.00968 | $0.00968 |
| Opus 5 | $0.00484 | $0.00484 |
| Sonnet 5 | $0.00194 | $0.00194 |
| Haiku 4.5 | $0.00097 | $0.00097 |
Grade A, and why
qi CLAUDE.md 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 3d 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 — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
qi — Agent Guidance
This file is the canonical guidance for AI coding agents working in this repo. AGENTS.md is a symlink to it, so Claude Code, Codex, and other agents read the same instructions.
Project Overview
qi is a local-first knowledge search CLI for macOS. It indexes documents (Markdown, plaintext) into a SQLite database and provides BM25 full-text search, vector search (with local embedding providers), and LLM-powered Q&A with citations.
Build
go build . # Build binary
go test ./... # Run all tests
go vet ./... # Lint
Checks
Always run task check before finishing any code change to ensure all checks pass (build, tests, vet).
Key Design Decisions
- CGo-free SQLite:
github.com/ncruces/go-sqlite3(wasm2go transpiled, no CGo needed) - Vector search: Pure Go KNN with cosine distance stored as BLOBs. sqlite-vec was planned but has WASM compatibility issues with the current go-sqlite3 version — revisit when sqlite-vec-go-bindings updates to support newer go-sqlite3.
- Content-addressable storage:
contenttable keyed by SHA-256 hash;documentsreferences by hash. Enables deduplication and O(1) change detection. - Break-point chunker: Scores chunk boundaries by type (heading=100, code fence=80, blank line=20) with distance decay from target size.
- Graceful degradation: Vector search and generation are optional — BM25 always works.
- Auto-generated collection names: Collection names are derived from full path segments (e.g.
~/Projects/tools/qi→tools-qi). The--nameflag was removed fromindex; use the derived slug or configure an alias. Legacy names are normalized on startup. - Query relaxation: BM25 search automatically falls back from conjunctive to disjunctive matching for natural-language queries that return zero results.
- Auto-embed on index: When an embedder is configured, chunks are embedded immediately after indexing without a separate step.
- Config: Raw
gopkg.in/yaml.v3, no viper.~expansion + relative path resolution.
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.
- 3d ago First seen · 68 lines · 968 tokens per session scan A 41e23adbdabd
qi CLAUDE.md is an instructions file published in the GitHub repository itsmostafa/qi (39 stars, last pushed 23d ago), licensed MIT. It adds 968 tokens to every session, about $0.0048 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 instructions, from other repositories
Zettelgarden CLAUDE.md
Instructions for Zettelgarden/Zettelgarden, covering claude.md, project overview, development commands, frontend (zettelkasten-front/) and backend (go-backend/).
Zettelgarden AGENTS.md
Instructions for Zettelgarden/Zettelgarden, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.
memvid CLAUDE.md
Claude Code instructions for memvid/memvid, covering claude.md, project overview, architecture, core components and file format (.mv2).
siyuan AGENTS.md
AGENTS.md instructions for siyuan-note/siyuan, covering agents.md, 1. non-negotiable constraints, do not hand-edit, verification and prohibited operations and 2. project-specific rules.
student-llm-wiki AGENTS.md
Instructions for IssacW228/student-llm-wiki, covering student llm wiki — agent instructions, 操作规则 operation rules, token预算规则(最高优先级), 架构 architecture and 命令 commands.
agentic-kb AGENTS.md
Instructions for wlfghdr/agentic-kb, covering agent instructions, rules, 1. spec-first, implementation-later, 2. no vendor lock-in and 3. every change is a versioned change.