Obsidian Bases
Build dynamic database views of your Obsidian notes with filters & formulas
✨ The solution you've been looking for
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.
See It In Action
Interactive preview & real-world examples
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
Install
claude-code skill install obsidian-bases
claude-code skill install obsidian-basesConfig
First Trigger
@obsidian-bases helpCommands
| Command | Description | Required Args |
|---|---|---|
| @obsidian-bases task-management-dashboard | Create a dynamic view of all task notes with priority filtering, due date calculations, and status grouping | None |
| @obsidian-bases reading-list-database | Build a comprehensive reading tracker with reading time estimates, author filtering, and completion status | None |
| @obsidian-bases project-knowledge-base | Create filtered views of project documentation with link analysis and recent activity tracking | None |
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
| Operator | Description |
|---|---|
== | 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
- Note properties - From frontmatter:
note.authoror justauthor - File properties - File metadata:
file.name,file.mtime, etc. - Formula properties - Computed values:
formula.my_formula
File Properties Reference
| Property | Type | Description |
|---|---|---|
file.name | String | File name |
file.basename | String | File name without extension |
file.path | String | Full path to file |
file.folder | String | Parent folder path |
file.ext | String | File extension |
file.size | Number | File size in bytes |
file.ctime | Date | Created time |
file.mtime | Date | Modified time |
file.tags | List | All tags in file |
file.links | List | Internal links in file |
file.backlinks | List | Files linking to this file |
file.embeds | List | Embeds in the note |
file.properties | Object | All 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
| Function | Signature | Description |
|---|---|---|
date() | date(string): date | Parse string to date. Format: YYYY-MM-DD HH:mm:ss |
duration() | duration(string): duration | Parse duration string |
now() | now(): date | Current date and time |
today() | today(): date | Current date (time = 00:00:00) |
if() | if(condition, trueResult, falseResult?) | Conditional |
min() | min(n1, n2, ...): number | Smallest number |
max() | max(n1, n2, ...): number | Largest number |
number() | number(any): number | Convert to number |
link() | link(path, display?): Link | Create a link |
list() | list(element): List | Wrap in list if not already |
file() | file(path): file | Get file object |
image() | image(path): image | Create image for rendering |
icon() | icon(name): icon | Lucide icon by name |
html() | html(string): html | Render as HTML |
escapeHTML() | escapeHTML(string): string | Escape HTML characters |
Any Type Functions
| Function | Signature | Description |
|---|---|---|
isTruthy() | any.isTruthy(): boolean | Coerce to boolean |
isType() | any.isType(type): boolean | Check type |
toString() | any.toString(): string | Convert to string |
Date Functions & Fields
Fields: date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond
| Function | Signature | Description |
|---|---|---|
date() | date.date(): date | Remove time portion |
format() | date.format(string): string | Format with Moment.js pattern |
time() | date.time(): string | Get time as string |
relative() | date.relative(): string | Human-readable relative time |
isEmpty() | date.isEmpty(): boolean | Always 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
| Function | Signature | Description |
|---|---|---|
contains() | string.contains(value): boolean | Check substring |
containsAll() | string.containsAll(...values): boolean | All substrings present |
containsAny() | string.containsAny(...values): boolean | Any substring present |
startsWith() | string.startsWith(query): boolean | Starts with query |
endsWith() | string.endsWith(query): boolean | Ends with query |
isEmpty() | string.isEmpty(): boolean | Empty or not present |
lower() | string.lower(): string | To lowercase |
title() | string.title(): string | To Title Case |
trim() | string.trim(): string | Remove whitespace |
replace() | string.replace(pattern, replacement): string | Replace pattern |
repeat() | string.repeat(count): string | Repeat string |
reverse() | string.reverse(): string | Reverse string |
slice() | string.slice(start, end?): string | Substring |
split() | string.split(separator, n?): list | Split to list |
Number Functions
| Function | Signature | Description |
|---|---|---|
abs() | number.abs(): number | Absolute value |
ceil() | number.ceil(): number | Round up |
floor() | number.floor(): number | Round down |
round() | number.round(digits?): number | Round to digits |
toFixed() | number.toFixed(precision): string | Fixed-point notation |
isEmpty() | number.isEmpty(): boolean | Not present |
List Functions
Field: list.length
| Function | Signature | Description |
|---|---|---|
contains() | list.contains(value): boolean | Element exists |
containsAll() | list.containsAll(...values): boolean | All elements exist |
containsAny() | list.containsAny(...values): boolean | Any element exists |
filter() | list.filter(expression): list | Filter by condition (uses value, index) |
map() | list.map(expression): list | Transform elements (uses value, index) |
reduce() | list.reduce(expression, initial): any | Reduce to single value (uses value, index, acc) |
flat() | list.flat(): list | Flatten nested lists |
join() | list.join(separator): string | Join to string |
reverse() | list.reverse(): list | Reverse order |
slice() | list.slice(start, end?): list | Sublist |
sort() | list.sort(): list | Sort ascending |
unique() | list.unique(): list | Remove duplicates |
isEmpty() | list.isEmpty(): boolean | No elements |
File Functions
| Function | Signature | Description |
|---|---|---|
asLink() | file.asLink(display?): Link | Convert to link |
hasLink() | file.hasLink(otherFile): boolean | Has link to file |
hasTag() | file.hasTag(...tags): boolean | Has any of the tags |
hasProperty() | file.hasProperty(name): boolean | Has property |
inFolder() | file.inFolder(folder): boolean | In folder or subfolder |
Link Functions
| Function | Signature | Description |
|---|---|---|
asFile() | link.asFile(): file | Get file object |
linksTo() | link.linksTo(file): boolean | Links to file |
Object Functions
| Function | Signature | Description |
|---|---|---|
isEmpty() | object.isEmpty(): boolean | No properties |
keys() | object.keys(): list | List of keys |
values() | object.values(): list | List of values |
Regular Expression Functions
| Function | Signature | Description |
|---|---|---|
matches() | regexp.matches(string): boolean | Test 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
| Name | Input Type | Description |
|---|---|---|
Average | Number | Mathematical mean |
Min | Number | Smallest number |
Max | Number | Largest number |
Sum | Number | Sum of all numbers |
Range | Number | Max - Min |
Median | Number | Mathematical median |
Stddev | Number | Standard deviation |
Earliest | Date | Earliest date |
Latest | Date | Latest date |
Range | Date | Latest - Earliest |
Checked | Boolean | Count of true values |
Unchecked | Boolean | Count of false values |
Empty | Any | Count of empty values |
Filled | Any | Count of non-empty values |
Unique | Any | Count 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
Framework Support
Context Window
Security & Privacy
Information
- Author
- davila7
- Updated
- 2026-01-30
- Category
- productivity-tools
Related Skills
Obsidian Bases
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when …
View Details →Command Development
This skill should be used when the user asks to "create a slash command", "add a command", "write a …
View Details →Command Development
This skill should be used when the user asks to "create a slash command", "add a command", "write a …
View Details →