Agent skill

Qmd Search

by HurricaHjz in HurricaHjz/second-yourself

OPTIONAL, DORMANT semantic-search layer over the wiki, powered by qmd (local hybrid BM25 + vector + rerank).

MITAuto-check passedAI & LLM Engineering

Install Qmd Search

skills CLI
$ npx skills add HurricaHjz/second-yourself --skill qmd-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HurricaHjz/second-yourself qmd-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HurricaHjz/second-yourself.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/qmd-search .claude/skills/qmd-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
qmd-search
GitHub stars
123
Token cost
~1.9k tokens
SKILL.md length
949 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

OPTIONAL, DORMANT semantic-search layer over the wiki, powered by qmd (local hybrid BM25 + vector + rerank).

  • Works in 3 steps: command -v qmd succeeds (qmd installed),… → an index exists for this vault (qmd… → there is no .qmd-off marker in the vault…
  • Tasks that involve Embeddings
  • SKILL.md covers What this is, Activation — capability…, When to invoke (opt-in — never… and Search (only when active), plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Qmd Search is an agent skill from HurricaHjz/second-yourself. OPTIONAL, DORMANT semantic-search layer over the wiki, powered by qmd (local hybrid BM25 + vector + rerank). Use only when the wiki has outgrown index.md AND the user has installed + enabled qmd. The agent auto-detects qmd; if it is absent or disabled this skill does nothing and the normal index.md → grep search runs unchanged. Provides confidence-aware semantic retrieval as the query/output fallback, plus a refresh hook that updates a page's qmd embedding whenever it is created or changed. Retrieval only — never…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Embeddings. It works with Model Context Protocol. The repository describes itself as: Second yourself. One agent that remembers you, with many hands to act for you: a multi-agent harness (Claude Code, with Codex helpers), a self-maintaining local wiki as its… The licence is MIT.

When your agent uses it

  • Tasks that involve Embeddings

Example prompts

  • “/qmd-search”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. command -v qmd succeeds (qmd installed), AND
  2. an index exists for this vault (qmd status lists indexed collections), AND
  3. there is no .qmd-off marker in the vault root — create that file to force qmd off without uninstalling; its absence means active…

What it can do on your machine

Read from SKILL.md and the folder at commit 17c03f2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Qmd Search loads about 1.9k tokens when it runs. Until then it costs about 158 tokens; SKILL.md has 949 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~158
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HurricaHjz/second-yourself at commit 17c03f2, republished under its MIT licence (© HurricaHjz). 949 words, ~1,888 tokens.

Download SKILL.mdSave it as .claude/skills/qmd-search/SKILL.md (or your agent's skills folder).
name
qmd-search
description
OPTIONAL, DORMANT semantic-search layer over the wiki, powered by qmd (local hybrid BM25 + vector + rerank). Use only when the wiki has outgrown index.md AND the user has installed + enabled qmd. The agent auto-detects qmd; if it is absent or disabled this skill does nothing and the normal index.md → grep search runs unchanged. Provides confidence-aware semantic retrieval as the query/output fallback, plus a refresh hook that updates a page's qmd embedding whenever it is created or changed. Retrieval only — never writes or decides. Trigger: /qmd-search <query>, or internally as the query/output semantic fallback.
user-invocable
true

qmd-search — optional semantic search over the wiki (dormant until qmd is installed)

What this is

A thin, dormant adapter to qmd. It does not replace index.md (the curated, read-first catalogue); it is the semantic fallback query/output reach for when the catalogue under-covers a question, and the refresh hook that keeps qmd's embeddings current as the wiki changes. qmd retrieves; the wiki governs (compile, cross-link, confidence, conflicts).

Activation — capability detection (the opt-in is installation)

Use qmd only if all three hold; otherwise fall through to the default search silently:

  1. command -v qmd succeeds (qmd installed), AND
  2. an index exists for this vault (qmd status lists indexed collections), AND
  3. there is no .qmd-off marker in the vault root — create that file to force qmd off without uninstalling; its absence means active (installing qmd + building an index is the opt-in).

This is one cheap shell check. If any condition fails, do nothing: the agent uses index.md → grep exactly as normal. A fresh clone or a non-adopter is unaffected, with no prompt to install anything.

qmd search is not a default step. Invoke it only when:

  1. the user explicitly asks (/qmd-search, "search semantically", "use qmd"), or
  2. the agent judges the cheap path insufficient — index.md + grep under-cover the question (it needs semantic recall, or the corpus is too large to scan reliably).

Otherwise answer from index.md → grep and do not call qmd — a qmd query reads passages into the agent's context (real tokens), so it must earn that cost. This gates only the read side; the write side — refreshing embeddings on every page change — always runs when qmd is active (local compute, ≈ no agent tokens).

Search (only when active)

  • CLI shell-out by default (no daemon): qmd query "<question>" --json --files --min-score <t> -n <k> over the wiki collection. The CLI inherits the shell environment, sidestepping the MCP-spawn HOME/db-path pitfall (qmd issue #615).
  • MCP daemon — an advanced option for heavy users who want warm models (qmd mcp --http --daemon); set QMD_CONFIG_DIR / the db path explicitly so the server opens the real index.
  • Confidence-aware ranking: qmd ranks by relevance; then re-order by each page's confidence (down-rank low/very-low, lift high/authoritative) and break ties by newer updated (supersession), per CLAUDE.md §4.6. Then deep-read the top pages and govern as usual.
  • Index-first, always: index.md is read first; qmd is the fallback / widener when the catalogue is insufficient or the corpus is large. A qmd hit never bypasses the governing deep-read.

Refresh on write — one-shot, NEVER a resident process

Two signals refresh whenever wiki page(s) are created or updated:

  1. confidence — (re)assign / confirm per CLAUDE.md §4.6 for every changed file. Always the agent's job, never a hook's, and never gated on qmd.
  2. qmd embedding — qmd update && qmd embed, once per write operation, never per file (incremental per file, not per chunk: qmd keys embeddings on a file's whole-content hash, so an unchanged file is skipped entirely and a changed one re-embeds all of its chunks — which is why wiki/log.md is excluded from the collection, CLAUDE.md §10). A no-op when qmd is dormant.

Enforcement — a turn-end hook, not an agent step. A prose-only refresh duty can be missed, leaving the index stale while later sessions treat it as current. So where the harness supports it, the refresh belongs in a Stop hook — the harness runs it once per turn, so no agent can forget it, and it costs zero agent tokens. The agent then does NOT run the qmd commands inline; it still owns step 1. This is not a daemon, cron job, launchd job or file-watcher: the hook is a one-shot that runs and exits, nothing stays resident, and nothing runs while the vault is idle.

Show full SKILL.md (330 more words)Show less

The live hook is in this vault's .claude/settings.json (vault-local; it is not part of the shipped framework, so an adopter installs their own). Shape, with the guards that matter:

bash
command -v qmd >/dev/null 2>&1 || exit 0          # qmd absent      -> silent no-op
[ -e "$D/.qmd-off" ] && exit 0                     # forced off      -> silent no-op
[ -e "$S" ] && [ -z "$(find "$D/wiki" "$D/raw" -newer "$S" -print -quit)" ] && exit 0   # nothing changed
mkdir "$L" 2>/dev/null || exit 0                   # another refresh in flight
qmd update >/dev/null 2>&1 && qmd embed >/dev/null 2>&1 && mv -f "$S.new" "$S"
  • Gate on the filesystem, not on qmd update output. find -newer against a stamp file tests the underlying state and supports the controls for no-change / modify / create / delete / missing-stamp. Directory mtimes make deletions visible too.
  • Stamp before the work, promote after success ($S.new → $S), so a file changed mid-refresh is caught next turn rather than skipped.
  • Fail open, never block. Every premise failure exits 0; a missing stamp means "refresh".
  • Measure the no-change check and refresh runtime on the local installation.

Where no such hook exists (another harness, hooks disabled), the fallback is the original inline rule: the agent runs qmd update && qmd embed itself as the last action of a write operation — ingest, query after filing a synthesis, deep-lint, or any other write path. deep-lint's own refresh remains the periodic backstop either way.

Graceful degradation (mandatory)

Any qmd call that errors, times out, or returns nonzero → fall back silently to index.md → grep and carry on. The vault never depends on qmd; it only accelerates with it.

Hard constraints

  • Retrieval only. qmd never creates, edits, or deletes wiki pages, and never decides confidence or conflicts — those stay with ingest/query/deep-lint.
  • Nothing resident. Every qmd invocation — by the agent or by the turn-end refresh hook — is a one-shot CLI call (qmd search/vsearch/query/update/embed) that runs and exits. The agent MUST NOT start the MCP daemon (qmd mcp …) or any long-running/watching qmd process; that is a manual, user-only opt-in. Nothing qmd-related stays resident, and nothing runs while the vault is idle.
  • Dormant by default. Do nothing unless detection passes; never prompt a non-adopter to install qmd.
  • Index-first. index.md is read before qmd; qmd is the semantic fallback/widener, not a replacement.
  • State stays out of git. qmd config/index/models live in ~/.config/qmd and ~/.cache/qmd; a project-local index (.qmd/, *.sqlite) is git-ignored.
  • British/UK English in any user-facing output.

© HurricaHjz, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/qmd-search of HurricaHjz/second-yourself.

Open the folder on GitHubat commit 17c03f2

Compare with similar skills

Qmd Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Qmd Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Qmd Search this skillHurricaHjz/second-yourself123—~1.9kAutomated safety check: PassMIT
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0
KtxKaelio/ktx1.6k—~3.2kAutomated safety check: PassApache-2.0
Sandbaseiflytek/skillhub5.2k1 repos~2.1kAutomated safety check: PassApache-2.0
Kit SDKmark3labs/kit141—~2.6kAutomated safety check: PassMIT
Pgvector Semantic Searchtimescale/pg-aiguide1.9k—~3.8kAutomated safety check: PassApache-2.0

Similar skills

  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Ktx

    Kaelio/ktx

    Installs and configures ktx, the open-source context layer for data agents — runs ktx setup non-interactively with hidden CLI flags, configures database connections and embeddings, installs agent…

    1.6k GitHub stars~3.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Sandbase

    iflytek/skillhub

    Access 2,000+ AI models and API tools through one MCP interface for inference, media generation, search, scraping, embeddings, social data, and structured retrieval.

    5.2k GitHub starsUsed in 1 repo~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Kit SDK

    mark3labs/kit

    Guide for building Go applications with the Kit SDK. An agent skill from mark3labs/kit.

    141 GitHub stars~2.6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Pgvector Semantic Search

    timescale/pg-aiguide

    A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.

    1.9k GitHub stars~3.8k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Memory

    harperreed/dotfiles

    Semantic memory and context - store and retrieve information with embeddings for similarity search.

    334 GitHub stars~484 tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed

More from HurricaHjz/second-yourself

All 12 skills in this repo
  • Query

    HurricaHjz/second-yourself

    Answer questions against the local Obsidian wiki — not from model memory.

    123 GitHub stars~2.2k tokensUpdated 9 days ago
    Auto-check passed
  • Export Template

    HurricaHjz/second-yourself

    Sync THIS LLM-Wiki framework with its public GitHub repo, ONE direction per run: --push (vault → repo) publishes your framework; --pull (repo → vault) updates your framework from a newer repo version.

    123 GitHub stars~4.8k tokensUpdated 9 days ago
    Auto-check: warnings
  • Lint

    HurricaHjz/second-yourself

    Health-check the Obsidian wiki — the "static analysis" pass for a knowledge base.

    123 GitHub stars~6.3k tokensUpdated 9 days ago
    Auto-check passed
  • Compile Core

    HurricaHjz/second-yourself

    The compile lane's half of the ingest skill: choose a source's depth after reading it, write the source page from the depth's template, assign confidence, network the knowledge, and propose the…

    123 GitHub stars~4.4k tokensUpdated 9 days ago
    Auto-check passed
  • Lint Slice

    HurricaHjz/second-yourself

    The read-only half of the lint skill for a headless lane: index consistency, link and orphan health, the pending-flag count, the attic, qmd-registry, injection, customisation-pairing and…

    123 GitHub stars~3.5k tokensUpdated 9 days ago
    Auto-check passed
  • Output

    HurricaHjz/second-yourself

    Produce a user-facing DELIVERABLE (report, brief, literature review, slide deck, table, email, outline, …) into the output/ directory — grounded in the wiki and strictly following the user's…

    123 GitHub stars~2k tokensUpdated 9 days ago
    Auto-check passed

Questions about Qmd Search

What does Qmd Search do?

OPTIONAL, DORMANT semantic-search layer over the wiki, powered by qmd (local hybrid BM25 + vector + rerank). Qmd Search is an agent skill from HurricaHjz/second-yourself. OPTIONAL, DORMANT semantic-search layer over the wiki, powered by qmd (local hybrid BM25 + vector + rerank).

When should I use Qmd Search?

Qmd Search fits situations like: tasks that involve Embeddings.

How do I install Qmd Search in Claude Code?

Run `npx skills add HurricaHjz/second-yourself --skill qmd-search -a claude-code`. Or copy the skill folder (.claude/skills/qmd-search in HurricaHjz/second-yourself) into .claude/skills/qmd-search in your project. Claude Code loads it when a task matches its description.

How do I install Qmd Search in Codex?

Run `npx skills add HurricaHjz/second-yourself --skill qmd-search -a codex`. Or copy the skill folder (.claude/skills/qmd-search in HurricaHjz/second-yourself) into .agents/skills/qmd-search in your project. Codex loads it when a task matches its description.

Can I use Qmd Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HurricaHjz/second-yourself --skill qmd-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/qmd-search, .gemini/skills/qmd-search, .github/skills/qmd-search and .opencode/skills/qmd-search in your project.

What does Qmd Search need to run?

SKILL.md names no scripts, command-line tools or credentials: Qmd Search is instructions for the agent only.

Does Qmd Search access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Qmd Search safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Qmd Search use?

Qmd Search is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Qmd Search use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Qmd Search?

Skills that share tags, products or a category with Qmd Search: Codebase Management (giancarloerra/SocratiCode, 3.3k stars), Ktx (Kaelio/ktx, 1.6k stars), Sandbase (iflytek/skillhub, 5.2k stars) and Kit SDK (mark3labs/kit, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Qmd Search?

HurricaHjz (a GitHub user) maintains it in HurricaHjz/second-yourself, which has 123 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 1, 2026.

Source: HurricaHjz/second-yourself on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.