Obsidian bases
Obsidian Bases database feature for YAML-based interactive note views. Use when creating .base files, writing filter queries, building formulas, configuring table/card views, or working with Obsidian properties and frontmatter databases.From its SKILL.md
npx -y skills add laurigates/dotfiles --skill obsidian-basesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.4 KB, as published. Nobody here has run it
Obsidian Bases
Expert knowledge for creating and managing Obsidian Bases - the interactive database feature introduced in Obsidian v1.9.10 that transforms notes into filterable, sortable views using YAML frontmatter properties.
Core Concepts
What is Bases?
- Native core plugin (no community plugins required)
- Creates interactive database views from any set of notes
- Uses
.basefile extension (plain-text YAML format) - Only reads YAML frontmatter - does not parse note content
- Faster performance than Dataview with inline editing support
Key Distinction from Dataview:
- Bases: User-friendly, visual, inline editable, YAML frontmatter only
- Dataview: More powerful queries, inline properties, content parsing
File Structure
# example.base
filters:
# Global filters (apply to all views)
and:
- 'status != "done"'
- taggedWith(file.file, "project")
formulas:
# Computed properties
days_left: '(dueDate - today()).days()'
status_icon: 'if(done, "β
", "β¬")'
views:
- type: table
name: "Active Tasks"
filters:
'dueDate > now()' # View-specific filter
properties:
- name: title
displayName: "Task"
- name: status
- name: dueDate
sort:
- property: dueDate
direction: asc
- type: card
name: "Visual View"
properties:
- name: cover
- name: title
Property Access Patterns
Note Properties (Frontmatter)
# Shorthand access
price
status
tags
# Explicit prefix
note.price
note.status
# Bracket notation (for spaces)
note["property name"]
File Properties (Implicit)
file.path # Full file path
file.name # File name only
file.folder # Parent folder
file.size # File size in bytes
file.ctime # Creation time
file.mtime # Modification time
file.ext # Extension
file.file # File object (for filter functions)
file.links # Outgoing links
file.inlinks # Incoming backlinks
Formula Properties
formula.my_formula
formula["formula name"]
Filter Syntax
Basic Operators
# Comparison (must have spaces around operators)
price > 10
status == "done"
age >= 18
# Logical operators
and:
- condition1
- condition2
or:
- condition1
- condition2
not:
- condition
Filter Functions
# Tag filtering
taggedWith(file.file, "project")
taggedWith(file.file, "project/web") # Nested tags
# Link filtering
linksTo(file.file, "Note Name")
file.hasLink(this.file) # Backlinks to current note
# Folder filtering
inFolder(file.file, "Projects")
inFolder(file.file, "Projects/Web") # Nested folders
# Date filtering
file.mtime > now() - "1 week" # Modified recently
dueDate < today() # Overdue
createdDate >= "2025-01-01" # This year
# Regex matching
/\d{4}-\d{2}-\d{2}/.matches(file.name) # Daily note format
The this Variable
Context-aware reference to the active note:
# In sidebar: references active note in main pane
file.hasLink(this.file) # Find backlinks
# In embedded base: references containing note
file.folder == this.file.folder # Same folder
# Exclude current note
file.path != this.file.path
Formula Syntax
Basic Formulas
formulas:
# Arithmetic
total: "price * quantity"
discounted: "total * 0.9"
# String manipulation
full_name: 'firstName + " " + lastName'
# Conditional logic
status_emoji: 'if(status == "done", "β
", if(status == "in-progress", "π", "β¬"))'
# Date calculations
days_until: '(dueDate - today()).days()'
overdue: 'dueDate < today()'
# Link analysis
backlink_count: 'file.inlinks.length'
has_backlinks: 'file.inlinks.length > 0'
Built-in Functions
Global:
today()- Current datenow()- Current date and timelink(target, displayText?)- Create linkimage(url)- Create image objectlist(value)- Ensure value is a listif(condition, trueResult, falseResult?)- Conditional
String methods:
.toUpperCase(),.toLowerCase().trim(),.split(separator).startsWith(prefix),.endsWith(suffix).replace(search, replacement)
Number methods:
.toFixed(decimals)- Format decimal places.round(),.floor(),.ceil()
Date methods:
.date()- Convert to date.startOf(unit),.endOf(unit).format(pattern).days(),.months(),.years()- Duration extraction
List methods:
.length- Count elements[index]- Access element (0-based).filter(condition)- Filter elements.map(transformation)- Transform elements.join(separator)- Concatenate to string
Duration Units
now() + "1 week"
now() - "30 days"
file.mtime > now() - "1 month"
# Available units
y, year, years
M, month, months
w, week, weeks
d, day, days
h, hour, hours
m, minute, minutes
s, second, seconds
View Types
Table View
views:
- type: table
name: "Tasks"
properties:
- name: title
displayName: "Task Name" # Column header
width: 200 # Optional width
- name: status
- name: dueDate
sort:
- property: dueDate
direction: asc # or desc
Card View
views:
- type: card
name: "Projects"
properties:
- name: cover # Cover image
- name: title
- name: status
Common Patterns
Task Management
filters:
taggedWith(file.file, "task")
formulas:
overdue: 'dueDate < today()'
priority_icon: 'if(priority == "high", "π΄", if(priority == "medium", "π‘", "π’"))'
views:
- type: table
name: "Active"
filters:
'status != "done"'
sort:
- property: dueDate
direction: asc
Enhanced Backlinks
# Drag to sidebar for context-aware backlinks
filters:
file.hasLink(this.file)
views:
- type: table
name: "Backlinks"
properties:
- name: file.name
displayName: "Note"
- name: file.mtime
displayName: "Modified"
Book/Media Library
filters:
taggedWith(file.file, "book")
formulas:
year_read: 'dateFinished.date().year()'
views:
- type: card
name: "Library"
properties:
- name: cover
- name: title
- name: author
- type: table
name: "Reading List"
filters:
'status == "to-read"'
Weekly Review
filters:
file.mtime > now() - "1 week"
formulas:
days_ago: '(today() - file.mtime.date()).days()'
views:
- type: table
name: "Recent Activity"
sort:
- property: file.mtime
direction: desc
Embedding Bases
![[MyBase.base]] # Embed entire base
![[MyBase.base#ViewName]] # Embed specific view
Best Practices
Filter Organization:
- Use global filters for the broadest scope (lowest common denominator)
- Refine with view-level filters for specific subsets
- Global + view filters combine with AND
Formula Reusability:
- Create formula properties for repeated logic
- Reference as
formula.namein views - No circular references allowed
Robust List Handling:
# Always wrap in list() for mixed single/array values
list(tags).length
list(tags).filter(value.startsWith("project"))
Date Validation:
valid_date: 'if(dueDate, dueDate, "No date")'
Common Gotchas
1. Arithmetic operator spacing:
# β
Correct
price * 2
# β Wrong (parser error)
price*2
2. Quote nesting in YAML:
# β
Correct - single outer, double inner
formulas:
message: 'Hello "world"'
# β Wrong
formulas:
message: "Hello "world""
3. Link properties in frontmatter:
# β
Correct - must quote
related: "[[Other Note]]"
# β Wrong
related: [[Other Note]]
4. File extension required:
<!-- β
Correct -->
![[MyBase.base]]
<!-- β Wrong (looks for .md) -->
![[MyBase]]
5. Global vs view filter scope:
- Cannot override global filter at view level
- Make global permissive, refine in views
Current Limitations
- View types: Only table and card (no board, calendar, gallery yet)
- Images: Display as text, not rendered in cards
- Inline properties: Only YAML frontmatter (no Dataview inline fields)
- Content parsing: Cannot query note body text
- Note creation: Cannot create new notes from base
- Grouping: No native group-by (use separate views instead)
- Aggregations: No built-in sum/average/count
Property Types
| Type | Example |
|---|---|
| Text | "Project Alpha" |
| List | ["tag1", "tag2"] |
| Number | 42, 3.14 |
| Checkbox | true, false |
| Date | 2025-11-26 |
| Date & Time | 2025-11-26T14:30:00 |
Note: Property types are vault-wide. If priority is Number in one note, it must be Number everywhere.
Resources
- Official Docs: https://help.obsidian.md/bases
- Syntax Reference: https://help.obsidian.md/bases/syntax
- Functions: https://help.obsidian.md/bases/functions
- Roadmap: https://help.obsidian.md/bases/roadmap