Install
openclaw skills install linkly-aiSearch, browse, and read the user's local documents indexed by Linkly AI. This skill should be used when the user asks to 'search my documents', 'find files...
openclaw skills install linkly-aiLinkly AI indexes documents on the user's local machine (PDF, Markdown, DOCX, TXT, HTML, etc.) and exposes them through a progressive disclosure workflow: search → grep or outline → read.
Before executing any document operation, detect the available access mode:
Run linkly --version via Bash. If the command succeeds:
linkly status to verify the desktop app is connected.linkly doctor to diagnose the issue. See references/troubleshooting.md for detailed guidance.The CLI supports three connection modes:
~/.linkly/port. Requires the app to be running locally.--endpoint <url> --token <token> to connect to a Linkly AI instance on the local network.--remote to connect via the https://mcp.linkly.ai tunnel. Requires prior setup: linkly auth set-key <api-key>.If no Bash tool is available, check whether MCP tools named search, outline, grep, read, list_libraries, and explore (from the linkly-ai MCP server) are accessible in the current environment.
See references/mcp-tools-reference.md for full parameter schemas and response formats.
If the CLI is not found, inform the user that the Linkly AI CLI is required and direct them to the installation guide: Install Linkly AI CLI.
If neither Bash nor MCP tools are available (rare — e.g., a sandboxed environment with no shell access), inform the user of the prerequisites and stop.
Find documents matching a query. Always start here — never guess document IDs.
linkly search "query keywords" --limit 10
linkly search "machine learning" --type pdf,md --limit 5
linkly search "API design" --library my-research --limit 10
linkly search "notes" --path-glob "*.md"
Search uses BM25 + vector hybrid retrieval (OR logic for keywords, semantic matching for meaning). For advanced query strategies, see references/search-strategies.md.
Tips:
--type filter when the user mentions a specific format.--library only when the user explicitly specifies a library name.--path-glob to filter by file path patterns. Syntax follows SQLite GLOB: * matches any characters (including /), ? matches exactly one character, [...] matches a character class. Always case-sensitive.doc_id — save these for subsequent steps.Get structural overviews of documents before reading.
linkly outline <ID>
linkly outline <ID1> <ID2> <ID3>
When to use: The document has has_outline: true and is longer than ~50 lines.
When to skip: The document is short (<50 lines) or has has_outline: false — use grep to find specific patterns or go directly to read.
Search for exact regex pattern matches within specific documents.
linkly grep "pattern" <ID>
linkly grep "function_name" <ID> -C 3
linkly grep "error|warning" <ID> -i --mode count
When to use: You need to find specific text (names, dates, terms, identifiers, or any pattern) within known documents. When you already know the exact text to find, grep is more precise than search.
When to skip: You need to understand the overall document structure — use outline instead.
Read document content with line numbers and pagination.
linkly read <ID>
linkly read <ID> --offset 50 --limit 100
Reading strategies:
offset by limit on each call (e.g., offset=1 limit=200, then offset=201 limit=200).Libraries are user-curated collections of folders. They allow scoped searches within a specific knowledge domain.
--library my-researchlinkly list-libraries--libraryLibraries are an advanced, optional feature. Default behavior is always global search.
linkly list-libraries
linkly search "deep learning" --library my-research --limit 10
The explore tool provides a bird's-eye overview of all indexed documents or a specific library. It returns document type distribution, directory structure with file counts, top keywords with source attribution, and recent activity (directories with changes in the last 7 days) — without reading any document content.
linkly explore
linkly explore --library my-research
When to use:
When NOT to use: The user already knows what they're looking for — go directly to Search.
After getting an overview, use the top keywords, directory names, and recent activity from the explore output to craft targeted search queries with search.
When users report connection issues, search failures, or other problems with Linkly AI:
linkly doctor to diagnose. It checks port file, HTTP connectivity, app status, and MCP round-trip. Share the output with the user and follow the advice printed for each failing check.For detailed troubleshooting steps, see references/troubleshooting.md.
grep instead of scanning with outline + read.explore first, then follow up with targeted searches based on the keywords and directories it reveals.--library when the user explicitly requests it.--json for search, default output for read. JSON output is easier to scan programmatically when processing many search results; default Markdown output is more readable when displaying document content to the user.linkly doctor and inform the user with actionable next steps.references/cli-reference.md — CLI installation, all commands, and options.references/mcp-tools-reference.md — MCP tool schemas, parameters, and response formats.references/search-strategies.md — Advanced query crafting, multi-round search, and complex retrieval patterns.references/troubleshooting.md — Diagnosing and resolving connection and search issues.