Obsidian Bases

Build dynamic database views of your Obsidian notes with filters & formulas

✨ The solution you've been looking for

Verified
Tested and verified by our team
16036 Stars

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

obsidian knowledge-management database yaml note-organization productivity filtering formulas
Repository

See It In Action

Interactive preview & real-world examples

Live Demo
Skill Demo Animation

AI Conversation Simulator

See how users interact with this skill

User Prompt

Create an Obsidian Base for tracking my project tasks with high/medium/low priority filters and overdue indicators

Skill Processing

Analyzing request...

Agent Response

A .base file with table and card views showing active tasks, grouped by status, with calculated priority labels and days-until-due formulas

Quick Start (3 Steps)

Get up and running in minutes

1

Install

claude-code skill install obsidian-bases

claude-code skill install obsidian-bases
2

Config

3

First Trigger

@obsidian-bases help

Commands

CommandDescriptionRequired Args
@obsidian-bases task-management-dashboardCreate a dynamic view of all task notes with priority filtering, due date calculations, and status groupingNone
@obsidian-bases reading-list-databaseBuild a comprehensive reading tracker with reading time estimates, author filtering, and completion statusNone
@obsidian-bases project-knowledge-baseCreate filtered views of project documentation with link analysis and recent activity trackingNone

Typical Use Cases

Task Management Dashboard

Create a dynamic view of all task notes with priority filtering, due date calculations, and status grouping

Reading List Database

Build a comprehensive reading tracker with reading time estimates, author filtering, and completion status

Project Knowledge Base

Create filtered views of project documentation with link analysis and recent activity tracking

Overview

Obsidian Bases Skill

This skill enables Claude Code to create and edit valid Obsidian Bases (.base files) including views, filters, formulas, and all related configurations.

Overview

Obsidian Bases are YAML-based files that define dynamic views of notes in an Obsidian vault. A Base file can contain multiple views, global filters, formulas, property configurations, and custom summaries.

File Format

Base files use the .base extension and contain valid YAML. They can also be embedded in Markdown code blocks.

Complete Schema

 1# Global filters apply to ALL views in the base
 2filters:
 3  # Can be a single filter string
 4  # OR a recursive filter object with and/or/not
 5  and: []
 6  or: []
 7  not: []
 8
 9# Define formula properties that can be used across all views
10formulas:
11  formula_name: 'expression'
12
13# Configure display names and settings for properties
14properties:
15  property_name:
16    displayName: "Display Name"
17  formula.formula_name:
18    displayName: "Formula Display Name"
19  file.ext:
20    displayName: "Extension"
21
22# Define custom summary formulas
23summaries:
24  custom_summary_name: 'values.mean().round(3)'
25
26# Define one or more views
27views:
28  - type: table | cards | list | map
29    name: "View Name"
30    limit: 10                    # Optional: limit results
31    groupBy:                     # Optional: group results
32      property: property_name
33      direction: ASC | DESC
34    filters:                     # View-specific filters
35      and: []
36    order:                       # Properties to display in order
37      - file.name
38      - property_name
39      - formula.formula_name
40    summaries:                   # Map properties to summary formulas
41      property_name: Average

Filter Syntax

Filters narrow down results. They can be applied globally or per-view.

Filter Structure

 1# Single filter
 2filters: 'status == "done"'
 3
 4# AND - all conditions must be true
 5filters:
 6  and:
 7    - 'status == "done"'
 8    - 'priority > 3'
 9
10# OR - any condition can be true
11filters:
12  or:
13    - 'file.hasTag("book")'
14    - 'file.hasTag("article")'
15
16# NOT - exclude matching items
17filters:
18  not:
19    - 'file.hasTag("archived")'
20
21# Nested filters
22filters:
23  or:
24    - file.hasTag("tag")
25    - and:
26        - file.hasTag("book")
27        - file.hasLink("Textbook")
28    - not:
29        - file.hasTag("book")
30        - file.inFolder("Required Reading")

Filter Operators

OperatorDescription
==equals
!=not equal
>greater than
<less than
>=greater than or equal
<=less than or equal
&&logical and
||logical or
!logical not

Properties

Three Types of Properties

  1. Note properties - From frontmatter: note.author or just author
  2. File properties - File metadata: file.name, file.mtime, etc.
  3. Formula properties - Computed values: formula.my_formula

File Properties Reference

PropertyTypeDescription
file.nameStringFile name
file.basenameStringFile name without extension
file.pathStringFull path to file
file.folderStringParent folder path
file.extStringFile extension
file.sizeNumberFile size in bytes
file.ctimeDateCreated time
file.mtimeDateModified time
file.tagsListAll tags in file
file.linksListInternal links in file
file.backlinksListFiles linking to this file
file.embedsListEmbeds in the note
file.propertiesObjectAll frontmatter properties

The this Keyword

  • In main content area: refers to the base file itself
  • When embedded: refers to the embedding file
  • In sidebar: refers to the active file in main content

Formula Syntax

Formulas compute values from properties. Defined in the formulas section.

 1formulas:
 2  # Simple arithmetic
 3  total: "price * quantity"
 4  
 5  # Conditional logic
 6  status_icon: 'if(done, "✅", "⏳")'
 7  
 8  # String formatting
 9  formatted_price: 'if(price, price.toFixed(2) + " dollars")'
10  
11  # Date formatting
12  created: 'file.ctime.format("YYYY-MM-DD")'
13  
14  # Complex expressions
15  days_old: '((now() - file.ctime) / 86400000).round(0)'

Functions Reference

Global Functions

FunctionSignatureDescription
date()date(string): dateParse string to date. Format: YYYY-MM-DD HH:mm:ss
duration()duration(string): durationParse duration string
now()now(): dateCurrent date and time
today()today(): dateCurrent date (time = 00:00:00)
if()if(condition, trueResult, falseResult?)Conditional
min()min(n1, n2, ...): numberSmallest number
max()max(n1, n2, ...): numberLargest number
number()number(any): numberConvert to number
link()link(path, display?): LinkCreate a link
list()list(element): ListWrap in list if not already
file()file(path): fileGet file object
image()image(path): imageCreate image for rendering
icon()icon(name): iconLucide icon by name
html()html(string): htmlRender as HTML
escapeHTML()escapeHTML(string): stringEscape HTML characters

Any Type Functions

FunctionSignatureDescription
isTruthy()any.isTruthy(): booleanCoerce to boolean
isType()any.isType(type): booleanCheck type
toString()any.toString(): stringConvert to string

Date Functions & Fields

Fields: date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond

FunctionSignatureDescription
date()date.date(): dateRemove time portion
format()date.format(string): stringFormat with Moment.js pattern
time()date.time(): stringGet time as string
relative()date.relative(): stringHuman-readable relative time
isEmpty()date.isEmpty(): booleanAlways false for dates

Date Arithmetic

 1# Duration units: y/year/years, M/month/months, d/day/days, 
 2#                 w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
 3
 4# Add/subtract durations
 5"date + \"1M\""           # Add 1 month
 6"date - \"2h\""           # Subtract 2 hours
 7"now() + \"1 day\""       # Tomorrow
 8"today() + \"7d\""        # A week from today
 9
10# Subtract dates for millisecond difference
11"now() - file.ctime"
12
13# Complex duration arithmetic
14"now() + (duration('1d') * 2)"

String Functions

Field: string.length

FunctionSignatureDescription
contains()string.contains(value): booleanCheck substring
containsAll()string.containsAll(...values): booleanAll substrings present
containsAny()string.containsAny(...values): booleanAny substring present
startsWith()string.startsWith(query): booleanStarts with query
endsWith()string.endsWith(query): booleanEnds with query
isEmpty()string.isEmpty(): booleanEmpty or not present
lower()string.lower(): stringTo lowercase
title()string.title(): stringTo Title Case
trim()string.trim(): stringRemove whitespace
replace()string.replace(pattern, replacement): stringReplace pattern
repeat()string.repeat(count): stringRepeat string
reverse()string.reverse(): stringReverse string
slice()string.slice(start, end?): stringSubstring
split()string.split(separator, n?): listSplit to list

Number Functions

FunctionSignatureDescription
abs()number.abs(): numberAbsolute value
ceil()number.ceil(): numberRound up
floor()number.floor(): numberRound down
round()number.round(digits?): numberRound to digits
toFixed()number.toFixed(precision): stringFixed-point notation
isEmpty()number.isEmpty(): booleanNot present

List Functions

Field: list.length

FunctionSignatureDescription
contains()list.contains(value): booleanElement exists
containsAll()list.containsAll(...values): booleanAll elements exist
containsAny()list.containsAny(...values): booleanAny element exists
filter()list.filter(expression): listFilter by condition (uses value, index)
map()list.map(expression): listTransform elements (uses value, index)
reduce()list.reduce(expression, initial): anyReduce to single value (uses value, index, acc)
flat()list.flat(): listFlatten nested lists
join()list.join(separator): stringJoin to string
reverse()list.reverse(): listReverse order
slice()list.slice(start, end?): listSublist
sort()list.sort(): listSort ascending
unique()list.unique(): listRemove duplicates
isEmpty()list.isEmpty(): booleanNo elements

File Functions

FunctionSignatureDescription
asLink()file.asLink(display?): LinkConvert to link
hasLink()file.hasLink(otherFile): booleanHas link to file
hasTag()file.hasTag(...tags): booleanHas any of the tags
hasProperty()file.hasProperty(name): booleanHas property
inFolder()file.inFolder(folder): booleanIn folder or subfolder
FunctionSignatureDescription
asFile()link.asFile(): fileGet file object
linksTo()link.linksTo(file): booleanLinks to file

Object Functions

FunctionSignatureDescription
isEmpty()object.isEmpty(): booleanNo properties
keys()object.keys(): listList of keys
values()object.values(): listList of values

Regular Expression Functions

FunctionSignatureDescription
matches()regexp.matches(string): booleanTest if matches

View Types

Table View

 1views:
 2  - type: table
 3    name: "My Table"
 4    order:
 5      - file.name
 6      - status
 7      - due_date
 8    summaries:
 9      price: Sum
10      count: Average

Cards View

1views:
2  - type: cards
3    name: "Gallery"
4    order:
5      - file.name
6      - cover_image
7      - description

List View

1views:
2  - type: list
3    name: "Simple List"
4    order:
5      - file.name
6      - status

Map View

Requires latitude/longitude properties and the Maps plugin.

1views:
2  - type: map
3    name: "Locations"
4    # Map-specific settings for lat/lng properties

Default Summary Formulas

NameInput TypeDescription
AverageNumberMathematical mean
MinNumberSmallest number
MaxNumberLargest number
SumNumberSum of all numbers
RangeNumberMax - Min
MedianNumberMathematical median
StddevNumberStandard deviation
EarliestDateEarliest date
LatestDateLatest date
RangeDateLatest - Earliest
CheckedBooleanCount of true values
UncheckedBooleanCount of false values
EmptyAnyCount of empty values
FilledAnyCount of non-empty values
UniqueAnyCount of unique values

Complete Examples

Task Tracker Base

 1filters:
 2  and:
 3    - file.hasTag("task")
 4    - 'file.ext == "md"'
 5
 6formulas:
 7  days_until_due: 'if(due, ((date(due) - today()) / 86400000).round(0), "")'
 8  is_overdue: 'if(due, date(due) < today() && status != "done", false)'
 9  priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
10
11properties:
12  status:
13    displayName: Status
14  formula.days_until_due:
15    displayName: "Days Until Due"
16  formula.priority_label:
17    displayName: Priority
18
19views:
20  - type: table
21    name: "Active Tasks"
22    filters:
23      and:
24        - 'status != "done"'
25    order:
26      - file.name
27      - status
28      - formula.priority_label
29      - due
30      - formula.days_until_due
31    groupBy:
32      property: status
33      direction: ASC
34    summaries:
35      formula.days_until_due: Average
36
37  - type: table
38    name: "Completed"
39    filters:
40      and:
41        - 'status == "done"'
42    order:
43      - file.name
44      - completed_date

Reading List Base

 1filters:
 2  or:
 3    - file.hasTag("book")
 4    - file.hasTag("article")
 5
 6formulas:
 7  reading_time: 'if(pages, (pages * 2).toString() + " min", "")'
 8  status_icon: 'if(status == "reading", "📖", if(status == "done", "✅", "📚"))'
 9  year_read: 'if(finished_date, date(finished_date).year, "")'
10
11properties:
12  author:
13    displayName: Author
14  formula.status_icon:
15    displayName: ""
16  formula.reading_time:
17    displayName: "Est. Time"
18
19views:
20  - type: cards
21    name: "Library"
22    order:
23      - cover
24      - file.name
25      - author
26      - formula.status_icon
27    filters:
28      not:
29        - 'status == "dropped"'
30
31  - type: table
32    name: "Reading List"
33    filters:
34      and:
35        - 'status == "to-read"'
36    order:
37      - file.name
38      - author
39      - pages
40      - formula.reading_time

Project Notes Base

 1filters:
 2  and:
 3    - file.inFolder("Projects")
 4    - 'file.ext == "md"'
 5
 6formulas:
 7  last_updated: 'file.mtime.relative()'
 8  link_count: 'file.links.length'
 9  
10summaries:
11  avgLinks: 'values.filter(value.isType("number")).mean().round(1)'
12
13properties:
14  formula.last_updated:
15    displayName: "Updated"
16  formula.link_count:
17    displayName: "Links"
18
19views:
20  - type: table
21    name: "All Projects"
22    order:
23      - file.name
24      - status
25      - formula.last_updated
26      - formula.link_count
27    summaries:
28      formula.link_count: avgLinks
29    groupBy:
30      property: status
31      direction: ASC
32
33  - type: list
34    name: "Quick List"
35    order:
36      - file.name
37      - status

Daily Notes Index

 1filters:
 2  and:
 3    - file.inFolder("Daily Notes")
 4    - '/^\d{4}-\d{2}-\d{2}$/.matches(file.basename)'
 5
 6formulas:
 7  word_estimate: '(file.size / 5).round(0)'
 8  day_of_week: 'date(file.basename).format("dddd")'
 9
10properties:
11  formula.day_of_week:
12    displayName: "Day"
13  formula.word_estimate:
14    displayName: "~Words"
15
16views:
17  - type: table
18    name: "Recent Notes"
19    limit: 30
20    order:
21      - file.name
22      - formula.day_of_week
23      - formula.word_estimate
24      - file.mtime

Embedding Bases

Embed in Markdown files:

1![[MyBase.base]]
2
3<!-- Specific view -->
4![[MyBase.base#View Name]]

YAML Quoting Rules

  • Use single quotes for formulas containing double quotes: 'if(done, "Yes", "No")'
  • Use double quotes for simple strings: "My View Name"
  • Escape nested quotes properly in complex expressions

Common Patterns

Filter by Tag

1filters:
2  and:
3    - file.hasTag("project")

Filter by Folder

1filters:
2  and:
3    - file.inFolder("Notes")

Filter by Date Range

1filters:
2  and:
3    - 'file.mtime > now() - "7d"'

Filter by Property Value

1filters:
2  and:
3    - 'status == "active"'
4    - 'priority >= 3'

Combine Multiple Conditions

1filters:
2  or:
3    - and:
4        - file.hasTag("important")
5        - 'status != "done"'
6    - and:
7        - 'priority == 1'
8        - 'due != ""'

References

What Users Are Saying

Real feedback from the community

Environment Matrix

Dependencies

Obsidian app
Obsidian Bases plugin (if not built-in)

Framework Support

Obsidian vault structure ✓ (recommended) YAML formatting ✓ Markdown embedding ✓

Context Window

Token Usage ~3K-8K tokens for complex base configurations with multiple views

Security & Privacy

Information

Author
davila7
Updated
2026-01-30
Category
productivity-tools