Wiki search

From jleechanorg/claude-commands · View interactive version

Wiki search is an AI agent skill from the GitHub repository jleechanorg/claude-commands. Search the local LLM wiki for matching pages, titles, and content snippets.

How to use this skill

Skill file

/wiki-search — Search the LLM Wiki

Usage

/wiki-search <query> [--wiki <wiki_dir>]

Search the wiki for pages matching a query. Searches titles, content, and tags.

--wiki <wiki_dir> overrides the default wiki location (~/llm_wiki/wiki).

Execution

Phase 1: Resolve wiki path

# Parse args: query is first positional; --wiki <path> overrides default
WIKI="$HOME/llm_wiki/wiki"
QUERY="<first positional arg>"
if args contain "--wiki <path>"; then
  WIKI="<path>"
fi

Phase 2: Grep search


# Search titles and content
results=$(grep -rl "$QUERY" "$WIKI"/**/*.md 2>/dev/null | head -20)

# Also search frontmatter titles
title_results=$(grep -rl "title:" "$WIKI"/**/*.md 2>/dev/null | xargs grep -l -i "$QUERY" 2>/dev/null | head -10)

# Combine and deduplicate
combined=$(echo "$results"$'\n'"$title_results" | sort -u | head -20)

Phase 3: Extract context

For each result, extract:

Phase 4: Output

## Wiki Search: "<query>"

Found N results:

1. **[Page Title](path/to/page.md)**
   ~path/to/page.md~
   > ...snippet of matching content...

2. **[Page Title](path/to/page.md)**
   ...

If no results: No wiki pages match "<query>".

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.