basicmachines-co/basic-memory-skills/memory-metadata-search
- community
Checking that the SKILL.md file is still in the repository.
Structured metadata search for Basic Memory: query notes by custom frontmatter fields using equality, range, array, and nested filters. Use when finding notes by status, priority, confidence, or any custom YAML field rather than free-text content.
Install
npx vskill@latest install basicmachines-co/basic-memory-skills/memory-metadata-searchSKILL.md
Memory Metadata Search
Find notes by their structured frontmatter fields instead of (or in addition to) free-text content. Any custom YAML key in a note's frontmatter beyond the standard set (title, type, tags, permalink, schema) is automatically indexed as entity_metadata and becomes queryable.
When to Use
- Filtering by status or priority — find all notes with
status: draftorpriority: high - Querying custom fields — any frontmatter key you invent is searchable
- Range queries — find notes with
confidence > 0.7orscore between 0.3 and 0.8 - Combining text + metadata — narrow a text search with structured constraints
- Tag-based filtering — find notes tagged with specific frontmatter tags
- Schema-aware queries — filter by nested schema fields using dot notation
The Tool
All metadata searching uses search_notes. Pass filters via metadata_filters, or use the tags and status convenience shortcuts. Omit query (or pass None) for filter-only searches.
Filter Syntax
Filters are a JSON dictionary. Each key targets a frontmatter field; the value specifies the match condition. Multiple keys combine with AND logic.
Equality
Array Contains (all listed values must be present)
$in (match any value in list)
Comparisons ($gt, $gte, $lt, $lte)
Numeric values use numeric comparison; strings use lexicographic comparison.
$between (inclusive range)
Nested Access (dot notation)
Quick Reference
| Operator | Syntax | Example | |
|---|---|---|---|
| Equality | {"field": "value"} | {"status": "active"} | |
| Array contains | {"field": ["a", "b"]} | {"tags": ["security", "oauth"]} | |
$in | {"field": {"$in": [...]}} | {"priority": {"$in": ["high", "critical"]}} | |
$gt / $gte | {"field": {"$gt": N}} | {"confidence": {"$gt": 0.7}} | |
$lt / $lte | {"field": {"$lt": N}} | {"score": {"$lt": 0.5}} | |
$between | {"field": {"$between": [lo, hi]}} | {"score": {"$between": [0.3, 0.8]}} | |
| Nested | {"a.b": "value"} | {"schema.version": "2"} |
Rules:
- Keys must match
[A-Za-z0-9_-]+(dots separate nesting levels) - Operator dicts must contain exactly one operator
$inand array-contains require non-empty lists$betweenrequires exactly[min, max]
Warning: Operators MUST include the$prefix — write$gte, notgte. Without the prefix the filter is treated as an exact-match key and will silently return no results. Correct:{"confidence": {"$gte": 0.7}}. Wrong:{"confidence": {"gte": 0.7}}.
Using search_notes with Metadata
Pass metadata_filters, tags, or status to search_notes. Omit query for filter-only searches, or combine text and filters together.
Merging rules: tags and status are convenience shortcuts merged into metadata_filters via setdefault. If the same key exists in metadata_filters, the explicit filter wins.
Tag Search Shorthand
The tag: prefix in a query converts to a tag filter automatically:
Example: Custom Frontmatter in Practice
A note with custom fields:
Queries that find it:
Guidelines
- Use metadata search for structured queries. If you're looking for notes by a known field value (status, priority, type), metadata filters are more precise than text search.
- Use text search for content queries. If you're looking for notes about something, text search is better. Combine both when you need precision.
- Custom fields are free. Any YAML key you put in frontmatter becomes queryable — no schema or configuration required.
- Multiple filters are AND.
{"status": "active", "priority": "high"}requires both conditions. - Omit `query` for filter-only searches.
search_notes(metadata_filters={"status": "active"})works without a text query. - Dot notation for nesting. Access nested YAML structures with dots:
{"schema.version": "2"}queries theversionkey inside aschemaobject. - Tags shortcut is convenient but limited.
tagsandstatusare sugar for common fields. For anything else, usemetadata_filtersdirectly.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmemory-metadata-search/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/basicmachines-co/basic-memory-skills/memory-metadata-search)