with one click
obsidian-bases
// Create and edit Obsidian Bases (.base files) — dynamic tables, cards, lists, filters, and formulas over vault notes.
// Create and edit Obsidian Bases (.base files) — dynamic tables, cards, lists, filters, and formulas over vault notes.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | obsidian-bases |
| description | Obsidian Bases (.base files) — dynamic tables, cards, lists, filters, formulas. |
| allowed-tools | Bash Read |
Obsidian Bases: turn vault notes into queryable views (tables, cards, lists, maps). Core feature; no plugin needed. Prefer kepano/obsidian-skills if installed. Docs: https://help.obsidian.md/bases/syntax
This skill creates and edits .base files inside the vault. All reads and writes go through the obsidian CLI:
obsidian read path=wiki/meta/<name>.baseobsidian basesobsidian create path=wiki/meta/<name>.base content="<yaml with \n escapes>"obsidian create path=... overwrite=true content=... (read first, modify in memory, write atomically)See ${CLAUDE_PLUGIN_ROOT}/_shared/cli.md for verb syntax, multiline content= escapes, and the overwrite flag.
.base files contain valid YAML. The root keys are filters, formulas, properties, summaries, and views.
# Global filters: apply to ALL views
filters:
and:
- file.hasTag("wiki")
- 'status != "archived"'
# Computed properties
formulas:
age_days: "(now() - file.ctime).days.round(0)"
status_icon: 'if(status == "mature", "✅", "🔄")'
# Display name overrides for properties panel
properties:
status:
displayName: "Status"
formula.age_days:
displayName: "Age (days)"
# One or more views
views:
- type: table
name: "All Pages"
order:
- file.name
- type
- status
- updated
- formula.age_days
Filters select which notes appear. Applied globally or per-view.
# Single string filter
filters: 'status == "current"'
# AND: all must be true
filters:
and:
- 'status != "archived"'
- file.hasTag("wiki")
# OR: any can be true
filters:
or:
- file.hasTag("concept")
- file.hasTag("entity")
# NOT: exclude matches
filters:
not:
- file.inFolder("wiki/meta")
# Nested
filters:
and:
- file.inFolder("wiki/")
- or:
- 'type == "concept"'
- 'type == "entity"'
== != > < >= <=
| Function | Example |
|---|---|
file.hasTag("x") | Notes with tag x |
file.inFolder("path/") | Notes in folder |
file.hasLink("Note") | Notes linking to Note |
Three types:
status, type, updatedfile.name, file.mtime, file.size, file.ctime, file.tags, file.folderformula.age_daysDefined in formulas:. Referenced as formula.name in order: and properties:.
formulas:
# Days since created
age_days: "(now() - file.ctime).days.round(0)"
# Days until a date property
days_until: 'if(due_date, (date(due_date) - today()).days, "")'
# Conditional label
status_icon: 'if(status == "mature", "✅", if(status == "developing", "🔄", "🌱"))'
# Word count estimate
word_est: "(file.size / 5).round(0)"
Key rule: Subtracting two dates returns a Duration. Not a number. Always access .days first:
# CORRECT
age: '(now() - file.ctime).days'
# WRONG: crashes
age: '(now() - file.ctime).round(0)'
Always guard nullable properties with if():
# CORRECT
days_left: 'if(due_date, (date(due_date) - today()).days, "")'
views:
- type: table
name: "Wiki Index"
limit: 100
order:
- file.name
- type
- status
- updated
groupBy:
property: type
direction: ASC
views:
- type: cards
name: "Gallery"
order:
- file.name
- tags
- status
views:
- type: list
name: "Quick List"
order:
- file.name
- status
filters:
and:
- file.inFolder("wiki/")
- not:
- file.inFolder("wiki/meta")
formulas:
age: "(now() - file.ctime).days.round(0)"
properties:
formula.age:
displayName: "Age (days)"
views:
- type: table
name: "All Wiki Pages"
order:
- file.name
- type
- status
- updated
- formula.age
groupBy:
property: type
direction: ASC
filters:
and:
- file.inFolder("wiki/entities/")
- 'file.ext == "md"'
views:
- type: table
name: "Entities"
order:
- file.name
- entity_type
- status
- updated
groupBy:
property: entity_type
direction: ASC
filters:
and:
- file.inFolder("wiki/sources/")
views:
- type: table
name: "Sources"
order:
- file.name
- source_type
- created
- status
groupBy:
property: source_type
direction: ASC
![[MyBase.base]]
![[MyBase.base#View Name]]
Store .base files in wiki/meta/ for vault dashboards:
wiki/meta/dashboard.base: main content viewwiki/meta/entities.base: entity trackerwiki/meta/sources.base: ingestion log'if(done, "Yes", "No")'"Status: Active": break YAML parsingfrom: or where: (Dataview syntax, not Bases)sort: at root; sort per-view via order: and groupBy:.base files outside vaultformula.X in order: without defining X in formulas: