agentleFS
Encod3d-SecEncod3d-Sec/TORCH/skills/wiki/SKILL.md

wiki

Skill329 starsChanged 4 months agoMITView on GitHub

Search, query, and maintain the qmd-indexed wiki - semantic search, keyword search, re-index after adding pages, check index status.

31 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use wiki-lint, wiki-ingest and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • graypirateSkill

    wiki-lint

    Run a health check on the user's wiki. Use when the user asks to lint, audit, clean up, check, or fix the wiki — or when they suspect orphans, broken wikilinks, stale pages, missing frontmatter, or contradictions between pages. Combines structural checks (zero token cost) with semantic review (LLM reasoning).

    Also in 4 projects that use this

  • bozhouDevSkill

    wiki-ingest

    Use when adding a new source to a wiki — a paper, article, URL, file, transcript, or any document. One ingest may touch 10-15 wiki pages.

    Also in 4 projects that use this

  • TashanGKDSkill

    note

    个人笔记记录助手。自动以 JSON 格式记录想法、学习笔记、会议纪要到 ~/.note,支持标签分类和全文搜索。

    Also in 3 projects that use this

  • bozhouDevSkill

    wiki-query

    Use when asking a question against a personal wiki built with wiki-init and wiki-ingest. Do not answer from general knowledge — always read the wiki pages first.

    Also in 3 projects that use this

  • GitHubSkill

    autoresearch

    Autonomous iterative experimentation loop for any programming task. Guides the user through defining goals, measurable metrics, and scope constraints, then runs an autonomous loop of code changes, testing, measuring, and keeping/discarding results. Inspired by Karpathy''s autoresearch. USE FOR: autonomous improvement, iterative optimization, experiment loop, auto research, performance tuning, automated experimentation, hill climbing, try things automatically, optimize code, run experiments, autonomous coding loop. DO NOT USE FOR: one-shot tasks, simple bug fixes, code review, or tasks without a measurable metric.

    Also in 4 projects that use this

  • an8079Skill

    autopilot

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All paths are relative to the vault root ($QMD_VAULT).

    line 11
  2. Very specific:

    If a new session does not inherit it, prefix commands with QMD_VAULT=...

    line 23
  3. Very specific:

    When the wiki-search MCP is active, prefer these tools over the CLI - they avoid the 3-4 second model load on every invocation:

    line 29
  4. Distinctive:

    Use when MCP is unavailable or for one-off maintenance.

    line 42
  5. Very specific:

    Check QMD_VAULT is set and points to the current vault path (no trailing slash, no spaces encoded).

    line 127

“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Wiki Search and Maintenance

qmd is a CLI + MCP server that provides semantic and keyword search over wiki/. The MCP server (wiki-search) exposes two tools consumed by Claude Code directly. The CLI is used for maintenance (re-index, status).

All paths are relative to the vault root ($QMD_VAULT).


Prerequisites

QMD_VAULT must point to your vault root (no trailing slash). Export it in your shell profile:

export QMD_VAULT="/path/to/your/ObsidianVaults/ClaudeBrain"

If a new session does not inherit it, prefix commands with QMD_VAULT=... qmd ... or source your profile. qmd is installed as a bun global (bun install -g @qmd/cli); if the qmd command is not found, ensure ~/.bun/bin is on PATH.


Searching via MCP (preferred in-session path)

When the wiki-search MCP is active, prefer these tools over the CLI - they avoid the 3-4 second model load on every invocation:

ToolPurpose
mcp__wiki-search__qmd_querySemantic (vector) search - use for concepts, techniques, intent
mcp__wiki-search__qmd_searchKeyword (substring) search - use for exact strings, tool names, CVE IDs

CLAUDE.md rule: never read wiki/index.md to find pages - always search first.


Searching via CLI

Use when MCP is unavailable or for one-off maintenance.

Semantic query (5 results, default):

qmd query "CDN bypass origin IP"

Semantic query (custom result count):

qmd query -n 10 "JWT empty secret"

Keyword search:

qmd keyword "pnpm"

Output format: [score] path/relative/to/wiki/ followed by a chunk of the matching content.


Maintenance

Re-index after adding or editing pages (run once after a bulk write, not per file):

qmd update

Expected output: Indexing wiki... Done. N chunks indexed.

The CUDA warning about an old driver is harmless - the model runs on CPU.

Check index size:

qmd status

Output: Collection: wiki Chunks: N

Integrity and catalog upkeep

These run automatically at SessionStart (via engagement-init.py); run them by hand after a bulk edit, rename, or before sharing:

python3 scripts/gen_index.py     # rebuild wiki/index.md catalog (idempotent; --check tests only)
python3 scripts/lint-wiki.py     # broken links, dead script refs, frontmatter gaps, stale index, lean areas
python3 scripts/build_moc.py     # rebuild graph hubs so every page stays reachable

lint-wiki.py exits non-zero on hard problems - use it as a pre-share / pre-commit gate. index.md and the *-moc.md hubs are generated; never hand-edit them.


Promote candidates

Generic, reusable knowledge found live during an engagement is staged to a review queue under targets/<eng>/wiki-candidates/ (gitignored) the moment it is confirmed, not at engagement end. It reaches wiki/ only through the leak-gated promoter.

python3 scripts/wiki-promote.py --list             # pending candidates (slug, kind, page)
python3 scripts/wiki-promote.py --review <slug>    # read one candidate in full
python3 scripts/wiki-promote.py --promote <slug>   # or: --promote all

--promote runs scripts/check-leaks.sh --file on the candidate BODY. If a client marker is present it refuses and writes nothing; if clean it merges into wiki/<target_page> (dedup by slug), sets status: promoted, archives the file to wiki-candidates/_promoted/, and re-indexes (gen_index.py + qmd update). Stage a new candidate with scripts/wiki-stage.py --kind <default-cred|api-pattern|technique> --slug <slug>. This is the only path that writes engagement-derived knowledge into wiki/, so the client-data boundary is enforced by code, not prose.


Broken install recovery

If qmd fails:

  1. Confirm the qmd binary is on PATH (command -v qmd); it installs to ~/.bun/bin/qmd via bun install -g @qmd/cli.
  2. Check QMD_VAULT is set and points to the current vault path (no trailing slash, no spaces encoded).
  3. The index lives under ~/.qmd/ - if the collection is missing, run qmd update to rebuild from scratch.

Files

PathPurpose
~/.bun/bin/qmdqmd CLI + MCP binary (bun global)
~/.qmd/local search index
$QMD_VAULT/wiki/the markdown corpus that gets indexed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.