Quick SQLite Search

VerifiedSafe

Fast SQLite-based vault search using FTS5 full-text index. Returns results in milliseconds.

Sby Skills Guide Bot
ProductivityIntermediate
7/22/2026
Claude Code
#sqlite#full-text-search#fts5#knowledge-base#vault-search

Recommended for

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
When to use it

Use it when you need to locate a note, ADR, or task in an already indexed vault and grep/glob would be too slow.

When not to use it

Avoid it if the SQLite index has not been built or the vault does not follow the expected table schema.

Security analysis

Safe
Quality score85/100

The 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.

Findings
  • •SQL templates use unescaped placeholders like <search_terms> / <Type>, which could allow SQL injection if untrusted input is substituted directly
How this analysis is made

Examples

Full-text search
/q architecture patterns
Filtered ADR lookup
/q type:Adr status:proposed technology/aws
Backlinks check
/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

  1. Combine filters: /q type:Adr status:proposed technology/aws
  2. Use phrases: /q "data platform" for exact matches
  3. Wildcards: SQLite FTS5 supports * wildcards: /q architect*
  4. 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 files

This 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.md

From 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.

Related skills