This skill enables skills-compatible agents to create and edit valid Obsidian Bases (.base files) including views, filters, formulas, and all related configurations.
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.
Base files use the .base extension and contain valid YAML. They can also be embedded in Markdown code blocks.
# Global filters apply to ALL views in the base
# Can be a single filter string
# OR a recursive filter object with and/or/not
# Define formula properties that can be used across all views
formula_name : ' expression '
# Configure display names and settings for properties
displayName : " Display Name "
displayName : " Formula Display Name "
# Define custom summary formulas
custom_summary_name : ' values.mean().round(3) '
# Define one or more views
- type : table | cards | list | map
limit : 10 # Optional: limit results
groupBy : # Optional: group results
filters : # View-specific filters
order : # Properties to display in order
summaries : # Map properties to summary formulas
Filters narrow down results. They can be applied globally or per-view.
filters : ' status == "done" '
# AND - all conditions must be true
# OR - any condition can be true
# NOT - exclude matching items
- file.hasTag("archived")
- file.hasLink("Textbook")
- file.inFolder("Required Reading")
Operator Description ==equals !=not equal >greater than <less than >=greater than or equal <=less than or equal &&logical and ||logical or !logical not
Note properties - From frontmatter: note.author or just author
File properties - File metadata: file.name, file.mtime, etc.
Formula properties - Computed values: formula.my_formula
Property Type Description file.nameString File name file.basenameString File name without extension file.pathString Full path to file file.folderString Parent folder path file.extString File extension file.sizeNumber File size in bytes file.ctimeDate Created time file.mtimeDate Modified time file.tagsList All tags in file file.linksList Internal links in file file.backlinksList Files linking to this file file.embedsList Embeds in the note file.propertiesObject All frontmatter properties
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 compute values from properties. Defined in the formulas section.
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) / 86400000).round(0) '
Function Signature Description 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
Function Signature Description isTruthy()any.isTruthy(): booleanCoerce to boolean isType()any.isType(type): booleanCheck type toString()any.toString(): stringConvert to string
Fields: date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond
Function Signature Description 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
# Duration units: y/year/years, M/month/months, d/day/days,
# w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
" date + \" 1M \" " # Add 1 month
" date - \" 2h \" " # Subtract 2 hours
" now() + \" 1 day \" " # Tomorrow
" today() + \" 7d \" " # A week from today
# Subtract dates for millisecond difference
# Complex duration arithmetic
" now() + (duration('1d') * 2) "
Field: string.length
Function Signature Description 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
Function Signature Description 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
Field: list.length
Function Signature Description 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
Function Signature Description 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
Function Signature Description asFile()link.asFile(): fileGet file object linksTo()link.linksTo(file): booleanLinks to file
Function Signature Description isEmpty()object.isEmpty(): booleanNo properties keys()object.keys(): listList of keys values()object.values(): listList of values
Function Signature Description matches()regexp.matches(string): booleanTest if matches
Requires latitude/longitude properties and the Maps community plugin.
# Map-specific settings for lat/lng properties
Name Input Type Description AverageNumber Mathematical mean MinNumber Smallest number MaxNumber Largest number SumNumber Sum of all numbers RangeNumber Max - Min MedianNumber Mathematical median StddevNumber Standard deviation EarliestDate Earliest date LatestDate Latest date RangeDate Latest - Earliest CheckedBoolean Count of true values UncheckedBoolean Count of false values EmptyAny Count of empty values FilledAny Count of non-empty values UniqueAny Count of unique values
days_until_due : ' if(due, ((date(due) - today()) / 86400000).round(0), "") '
is_overdue : ' if(due, date(due) < today() && status != "done", false) '
priority_label : ' if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low")) '
displayName : " Days Until Due "
formula.days_until_due : Average
reading_time : ' if(pages, (pages * 2).toString() + " min", "") '
status_icon : ' if(status == "reading", "📖", if(status == "done", "✅", "📚")) '
year_read : ' if(finished_date, date(finished_date).year, "") '
- file.inFolder("Projects")
last_updated : ' file.mtime.relative() '
link_count : ' file.links.length '
avgLinks : ' values.filter(value.isType("number")).mean().round(1) '
formula.link_count : avgLinks
- file.inFolder("Daily Notes")
- ' /^\d{4}-\d{2}-\d{2}$/.matches(file.basename) '
word_estimate : ' (file.size / 5).round(0) '
day_of_week : ' date(file.basename).format("dddd") '
Embed in Markdown files:
![[MyBase.base#View Name]]
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
- ' file.mtime > now() - "7d" '
- file.hasTag("important")