Automated summary
This skill provides a /q command that queries an SQLite FTS5 index to quickly find notes in a vault (full-text search, type and tag filters, recent notes, backlinks, and orphans).
Strengths
- Millisecond full-text search via the FTS5 index, with contextual excerpts from snippet()
- Handles many needs with one command: type:/tag: filters, /q recent, /q backlinks, and /q orphans
- Ships ready-to-run SQL queries that are easy to copy or adapt
- -markdown output gives directly readable tables
Limitations
- Requires a prebuilt index (npm run vault:index) and the sqlite3 CLI on the command line
- Assumes a specific vault schema (notes, tags, links, fts_content tables) and won't work on other note formats
- Lexical search only: no semantic matching, so synonyms and rephrasings are missed
Use it when you need to locate a note, ADR, or task in an already indexed vault and grep/glob would be too slow.
Avoid it if the SQLite index has not been built or the vault does not follow the expected table schema.
Security analysis
SafeThe skill only runs read-only sqlite3 queries against a local vault database and documents npm scripts for index building. There are no destructive commands, no network calls sending data out, no obfuscated payloads, and no attempts to disable safety. The only minor concern is unescaped SQL placeholders, which is a robustness rather than an exfiltration risk.
- •SQL templates use unescaped placeholders like <search_terms> / <Type>, which could allow SQL injection if untrusted input is substituted directly
Examples
/q architecture patterns/q type:Adr status:proposed technology/aws/q backlinks:"Project - Atlas"description: Fast SQLite-based vault search using FTS5 full-text search index context: normal model: haiku
/q - Quick SQLite Search
Fast vault search using the SQLite FTS5 index. Returns results in milliseconds instead of seconds.
Prerequisites
The SQLite index must be built first:
npm run vault:index
Usage Patterns
Full-text Search
/q architecture patterns
/q "event driven" # Phrase search
/q kafka integration # Multiple terms (AND)
Type Filter
/q type:Adr # All ADRs
/q type:Project status:active
/q type:Task priority:high
Tag Search
/q tag:technology/aws
/q tag:project/your-project
Recent Notes
/q recent # Modified in last 7 days
/q recent:30 # Modified in last 30 days
Backlinks
/q backlinks:"Project - Your Project"
/q backlinks:"System - Your System"
Orphans
/q orphans # Notes with no backlinks
Implementation
Execute the appropriate SQLite query based on the search pattern.
Full-text Search Query
sqlite3 .data/vault.db -markdown "
SELECT n.path, snippet(fts_content,1,'→','←','...',40) as match
FROM fts_content
JOIN notes n ON fts_content.rowid = n.id
WHERE fts_content MATCH '<search_terms>'
ORDER BY rank
LIMIT 20
"
Type Filter Query
sqlite3 .data/vault.db -markdown "
SELECT path, title, status, priority
FROM notes
WHERE type = '<Type>'
ORDER BY modified DESC
LIMIT 20
"
Tag Search Query
sqlite3 .data/vault.db -markdown "
SELECT n.path, n.title, n.type
FROM notes n
JOIN tags t ON n.id = t.note_id
WHERE t.tag = '<tag>'
ORDER BY n.modified DESC
LIMIT 20
"
Recent Notes Query
sqlite3 .data/vault.db -markdown "
SELECT path, title, type, modified
FROM notes
WHERE modified >= date('now', '-<days> days')
ORDER BY modified DESC
LIMIT 30
"
Backlinks Query
sqlite3 .data/vault.db -markdown "
SELECT n.path, n.title, n.type
FROM notes n
JOIN links l ON n.id = l.source_id
WHERE l.target_path LIKE '%<note_name>%'
ORDER BY n.modified DESC
"
Orphans Query
sqlite3 .data/vault.db -markdown "
SELECT n.path, n.title, n.type
FROM notes n
LEFT JOIN links l ON n.id = l.target_id
WHERE l.target_id IS NULL
AND n.type NOT IN ('DailyNote', 'MOC', 'Dashboard', 'Query')
ORDER BY n.modified DESC
"
Performance
| Query Type | Grep/Glob | SQLite | Improvement | | ----------- | --------- | ------ | ----------- | | Full-text | 5-15 sec | 0.01s | ~1000x | | Type filter | 3-5 sec | 0.007s | ~500x | | Tag search | 2-5 sec | 0.007s | ~500x | | Backlinks | 10+ sec | 0.01s | ~1000x |
Rebuilding the Index
The index should be rebuilt when vault content changes significantly:
npm run vault:index # Full rebuild
npm run vault:stats # View current statistics
Tips
- Combine filters:
/q type:Adr status:proposed technology/aws - Use phrases:
/q "data platform"for exact matches - Wildcards: SQLite FTS5 supports
*wildcards:/q architect* - Present results: Format output as markdown table for readability
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/quick-sqlite-search-mrwakdbg/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/quick-sqlite-search-mrwakdbg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/quick-sqlite-search-mrwakdbg/download' --output '.skill-downloads/quick-sqlite-search-mrwakdbg/SKILL.md.part' && mv '.skill-downloads/quick-sqlite-search-mrwakdbg/SKILL.md.part' '.skill-downloads/quick-sqlite-search-mrwakdbg/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Prerequisites
The SQLite index must be built first:
npm run vault:index
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.
Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/quick-sqlite-search-mrwakdbg/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
PDF Reader
Productivity
Read and extract text from PDF files, including documents, reports, contracts, and spreadsheets. Works with local files, URLs, and WhatsApp attachments. Use whenever PDF content is needed, even if not explicitly requested.
Discord Messaging Workflows
Productivity
Use the message tool to send, edit, and moderate Discord messages with interactive components.
Interactive Verdict Preview
Productivity
Generate an interactive HTML preview of keep/drop verdicts for maintainer review, then process the pasted feedback JSON.