Obsidian Bases Skill
Obsidian Bases are YAML-based .base 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.
Complete Schema
# Global filters apply to ALL views in the base
filters:
and: [] # All conditions must be true
or: [] # Any condition can be true
not: [] # Exclude matching items
# Can also be a single filter string: 'status == "done"'
# Define formula properties (computed values)
formulas:
formula_name: 'expression'
# Configure display names for properties
properties:
property_name:
displayName: "Display Name"
formula.formula_name:
displayName: "Formula Display Name"
# Define custom summary formulas
summaries:
custom_summary_name: 'values.mean().round(3)'
# Define one or more views
views:
- type: table | cards | list | map
name: "View Name"
limit: 10 # Optional: limit results
groupBy: # Optional: group results
property: property_name
direction: ASC | DESC
filters: # View-specific filters (same syntax as global)
and: []
order: # Properties to display in order
- file.name
- property_name
- formula.formula_name
summaries: # Map properties to summary formulas
property_name: Average
Filter Syntax
# Single filter
filters: 'status == "done"'
# AND / OR / NOT
filters:
and:
- 'status == "done"'
- 'priority > 3'
# Nested filters
filters:
or:
- file.hasTag("tag")
- and:
- file.hasTag("book")
- file.hasLink("Textbook")
- not:
- file.hasTag("archived")
Filter Operators
| Operator |
Description |
== |
equals |
!= |
not equal |
>, <, >=, <= |
comparisons |
&& |
logical and |
|| |
logical or |
! |
logical not |
Properties
Three types of properties:
- Note properties - From frontmatter:
author or note.author
- File properties - File metadata:
file.name, file.mtime, etc.
- Formula properties - Computed values:
formula.my_formula
File Properties
| Property |
Type |
Description |
file.name |
String |
File name |
file.basename |
String |
Name without extension |
file.path |
String |
Full path |
file.folder |
String |
Parent folder |
file.ext |
String |
Extension |
file.size |
Number |
Size in bytes |
file.ctime |
Date |
Created time |
file.mtime |
Date |
Modified time |
file.tags |
List |
All tags |
file.links |
List |
Internal links |
file.backlinks |
List |
Files linking to this |
file.embeds |
List |
Embeds in note |
file.properties |
Object |
All frontmatter |
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
Formulas
formulas:
total: "price * quantity"
status_icon: 'if(done, "✅", "⏳")'
formatted_price: 'if(price, price.toFixed(2) + " dollars")'
created: 'file.ctime.format("YYYY-MM-DD")'
days_old: '(now() - file.ctime).days'
days_until_due: 'if(due_date, (date(due_date) - today()).days, "")'
For the complete function catalog (global, string, number, list, date, duration, file, link, object, regex functions), see references/functions.md.
Default Summary Formulas
| Name |
Input |
Description |
Average, Min, Max, Sum, Range, Median, Stddev |
Number |
Numeric aggregations |
Earliest, Latest, Range |
Date |
Date aggregations |
Checked, Unchecked |
Boolean |
Boolean counts |
Empty, Filled, Unique |
Any |
General counts |
Complete Example: Task Tracker
filters:
and:
- file.hasTag("task")
- 'file.ext == "md"'
formulas:
days_until_due: 'if(due, (date(due) - today()).days, "")'
is_overdue: 'if(due, date(due) < today() && status != "done", false)'
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
properties:
status:
displayName: Status
formula.days_until_due:
displayName: "Days Until Due"
formula.priority_label:
displayName: Priority
views:
- type: table
name: "Active Tasks"
filters:
and:
- 'status != "done"'
order:
- file.name
- status
- formula.priority_label
- due
- formula.days_until_due
groupBy:
property: status
direction: ASC
summaries:
formula.days_until_due: Average
- type: table
name: "Completed"
filters:
and:
- 'status == "done"'
order:
- file.name
- completed_date
Common Filter Patterns
# By tag
filters:
and:
- file.hasTag("project")
# By folder
filters:
and:
- file.inFolder("Notes")
# By date range (last 7 days)
filters:
and:
- 'file.mtime > now() - "7d"'
# By property value
filters:
and:
- 'status == "active"'
- 'priority >= 3'
Embedding Bases
![[MyBase.base]]
![[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"
When To Use
- Creating or editing
.base files for Obsidian vaults
- Building table, cards, list, or map views over vault notes
- Writing filters, formulas, or summaries for Bases
- User mentions Obsidian Bases, database views, or
.base file syntax
Boundaries
- Not for editing standard Obsidian Markdown (use obsidian-markdown skill instead)
- Not for Dataview plugin queries; Bases uses its own YAML schema
- Skip when the user needs a community plugin that is not Bases (e.g., Kanban, Calendar)
- Do not generate Base files that reference plugins or properties the vault does not have
Output
- A valid
.base YAML file or YAML code block ready to paste into Obsidian
- Includes views, filters, formulas, properties, and summaries as needed
- Uses correct quoting rules (single quotes for expressions containing double quotes)
Verification
- Output is valid YAML that Obsidian Bases can parse without errors
- All referenced properties, formulas, and summary names are internally consistent
- Filter expressions use only documented operators and functions
- Duration arithmetic accesses numeric fields (
.days, .hours) before applying .round()
References
Sibling skills
Three Obsidian-format references, distinguished by file type.
obsidian-markdown — .md notes with Obsidian extensions (wikilinks, callouts, properties). Use for note authoring; this skill is for the database-view layer over those notes.
obsidian-canvas — .canvas visual canvases. Orthogonal.
1---2name: obsidian-bases3description: Create and edit Obsidian Bases (.base files) with database-style views, filters, formulas, and summaries. Use when working with .base files, building table/card/dashboard views over a vault, or when the user mentions Bases, filters, or formulas in Obsidian.4---56# Obsidian Bases Skill78Obsidian Bases are YAML-based `.base` 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.910## Complete Schema1112```yaml13# Global filters apply to ALL views in the base14filters:15 and: [] # All conditions must be true16 or: [] # Any condition can be true17 not: [] # Exclude matching items18 # Can also be a single filter string: 'status == "done"'1920# Define formula properties (computed values)21formulas:22 formula_name: 'expression'2324# Configure display names for properties25properties:26 property_name:27 displayName: "Display Name"28 formula.formula_name:29 displayName: "Formula Display Name"3031# Define custom summary formulas32summaries:33 custom_summary_name: 'values.mean().round(3)'3435# Define one or more views36views:37 - type: table | cards | list | map38 name: "View Name"39 limit: 10 # Optional: limit results40 groupBy: # Optional: group results41 property: property_name42 direction: ASC | DESC43 filters: # View-specific filters (same syntax as global)44 and: []45 order: # Properties to display in order46 - file.name47 - property_name48 - formula.formula_name49 summaries: # Map properties to summary formulas50 property_name: Average51```5253## Filter Syntax5455```yaml56# Single filter57filters: 'status == "done"'5859# AND / OR / NOT60filters:61 and:62 - 'status == "done"'63 - 'priority > 3'6465# Nested filters66filters:67 or:68 - file.hasTag("tag")69 - and:70 - file.hasTag("book")71 - file.hasLink("Textbook")72 - not:73 - file.hasTag("archived")74```7576### Filter Operators7778| Operator | Description |79|----------|-------------|80| `==` | equals |81| `!=` | not equal |82| `>`, `<`, `>=`, `<=` | comparisons |83| `&&` | logical and |84| `\|\|` | logical or |85| `!` | logical not |8687## Properties8889Three types of properties:901. **Note properties** - From frontmatter: `author` or `note.author`912. **File properties** - File metadata: `file.name`, `file.mtime`, etc.923. **Formula properties** - Computed values: `formula.my_formula`9394### File Properties9596| Property | Type | Description |97|----------|------|-------------|98| `file.name` | String | File name |99| `file.basename` | String | Name without extension |100| `file.path` | String | Full path |101| `file.folder` | String | Parent folder |102| `file.ext` | String | Extension |103| `file.size` | Number | Size in bytes |104| `file.ctime` | Date | Created time |105| `file.mtime` | Date | Modified time |106| `file.tags` | List | All tags |107| `file.links` | List | Internal links |108| `file.backlinks` | List | Files linking to this |109| `file.embeds` | List | Embeds in note |110| `file.properties` | Object | All frontmatter |111112### The `this` Keyword113114- In main content area: refers to the base file itself115- When embedded: refers to the embedding file116- In sidebar: refers to the active file in main content117118## Formulas119120```yaml121formulas:122 total: "price * quantity"123 status_icon: 'if(done, "✅", "⏳")'124 formatted_price: 'if(price, price.toFixed(2) + " dollars")'125 created: 'file.ctime.format("YYYY-MM-DD")'126 days_old: '(now() - file.ctime).days'127 days_until_due: 'if(due_date, (date(due_date) - today()).days, "")'128```129130For the complete function catalog (global, string, number, list, date, duration, file, link, object, regex functions), see `references/functions.md`.131132## Default Summary Formulas133134| Name | Input | Description |135|------|-------|-------------|136| `Average`, `Min`, `Max`, `Sum`, `Range`, `Median`, `Stddev` | Number | Numeric aggregations |137| `Earliest`, `Latest`, `Range` | Date | Date aggregations |138| `Checked`, `Unchecked` | Boolean | Boolean counts |139| `Empty`, `Filled`, `Unique` | Any | General counts |140141## Complete Example: Task Tracker142143```yaml144filters:145 and:146 - file.hasTag("task")147 - 'file.ext == "md"'148149formulas:150 days_until_due: 'if(due, (date(due) - today()).days, "")'151 is_overdue: 'if(due, date(due) < today() && status != "done", false)'152 priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'153154properties:155 status:156 displayName: Status157 formula.days_until_due:158 displayName: "Days Until Due"159 formula.priority_label:160 displayName: Priority161162views:163 - type: table164 name: "Active Tasks"165 filters:166 and:167 - 'status != "done"'168 order:169 - file.name170 - status171 - formula.priority_label172 - due173 - formula.days_until_due174 groupBy:175 property: status176 direction: ASC177 summaries:178 formula.days_until_due: Average179180 - type: table181 name: "Completed"182 filters:183 and:184 - 'status == "done"'185 order:186 - file.name187 - completed_date188```189190## Common Filter Patterns191192```yaml193# By tag194filters:195 and:196 - file.hasTag("project")197198# By folder199filters:200 and:201 - file.inFolder("Notes")202203# By date range (last 7 days)204filters:205 and:206 - 'file.mtime > now() - "7d"'207208# By property value209filters:210 and:211 - 'status == "active"'212 - 'priority >= 3'213```214215## Embedding Bases216217```markdown218![[MyBase.base]]219![[MyBase.base#View Name]]220```221222## YAML Quoting Rules223224- Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'`225- Use double quotes for simple strings: `"My View Name"`226227## When To Use228229- Creating or editing `.base` files for Obsidian vaults230- Building table, cards, list, or map views over vault notes231- Writing filters, formulas, or summaries for Bases232- User mentions Obsidian Bases, database views, or `.base` file syntax233234## Boundaries235236- Not for editing standard Obsidian Markdown (use obsidian-markdown skill instead)237- Not for Dataview plugin queries; Bases uses its own YAML schema238- Skip when the user needs a community plugin that is not Bases (e.g., Kanban, Calendar)239- Do not generate Base files that reference plugins or properties the vault does not have240241## Output242243- A valid `.base` YAML file or YAML code block ready to paste into Obsidian244- Includes views, filters, formulas, properties, and summaries as needed245- Uses correct quoting rules (single quotes for expressions containing double quotes)246247## Verification248249- Output is valid YAML that Obsidian Bases can parse without errors250- All referenced properties, formulas, and summary names are internally consistent251- Filter expressions use only documented operators and functions252- Duration arithmetic accesses numeric fields (`.days`, `.hours`) before applying `.round()`253254## References255256- [Bases Syntax](https://help.obsidian.md/bases/syntax)257- [Functions](https://help.obsidian.md/bases/functions)258- [Views](https://help.obsidian.md/bases/views)259- [Formulas](https://help.obsidian.md/formulas)260261## Sibling skills262263Three Obsidian-format references, distinguished by *file type*.264265- `obsidian-markdown` — `.md` notes with Obsidian extensions (wikilinks, callouts, properties). Use for note authoring; this skill is for the database-view layer over those notes.266- `obsidian-canvas` — `.canvas` visual canvases. Orthogonal.