opencode-skills-antigravity 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/bundled-skills/ad-creative/SKILL.md +371 -0
  2. package/bundled-skills/ad-creative/evals/evals.json +90 -0
  3. package/bundled-skills/ad-creative/references/generative-tools.md +637 -0
  4. package/bundled-skills/ad-creative/references/platform-specs.md +213 -0
  5. package/bundled-skills/ai-seo/SKILL.md +407 -0
  6. package/bundled-skills/ai-seo/evals/evals.json +90 -0
  7. package/bundled-skills/ai-seo/references/content-patterns.md +285 -0
  8. package/bundled-skills/ai-seo/references/platform-ranking-factors.md +152 -0
  9. package/bundled-skills/backend-dev-guidelines/SKILL.md +1 -1
  10. package/bundled-skills/cc-skill-security-review/SKILL.md +1 -1
  11. package/bundled-skills/churn-prevention/SKILL.md +433 -0
  12. package/bundled-skills/churn-prevention/evals/evals.json +93 -0
  13. package/bundled-skills/churn-prevention/references/cancel-flow-patterns.md +316 -0
  14. package/bundled-skills/churn-prevention/references/dunning-playbook.md +408 -0
  15. package/bundled-skills/claude-api/LICENSE.txt +202 -0
  16. package/bundled-skills/claude-api/SKILL.md +252 -0
  17. package/bundled-skills/claude-api/csharp/claude-api.md +70 -0
  18. package/bundled-skills/claude-api/curl/examples.md +164 -0
  19. package/bundled-skills/claude-api/go/claude-api.md +146 -0
  20. package/bundled-skills/claude-api/java/claude-api.md +128 -0
  21. package/bundled-skills/claude-api/php/claude-api.md +88 -0
  22. package/bundled-skills/claude-api/python/agent-sdk/README.md +269 -0
  23. package/bundled-skills/claude-api/python/agent-sdk/patterns.md +319 -0
  24. package/bundled-skills/claude-api/python/claude-api/README.md +404 -0
  25. package/bundled-skills/claude-api/python/claude-api/batches.md +182 -0
  26. package/bundled-skills/claude-api/python/claude-api/files-api.md +162 -0
  27. package/bundled-skills/claude-api/python/claude-api/streaming.md +162 -0
  28. package/bundled-skills/claude-api/python/claude-api/tool-use.md +587 -0
  29. package/bundled-skills/claude-api/ruby/claude-api.md +87 -0
  30. package/bundled-skills/claude-api/shared/error-codes.md +205 -0
  31. package/bundled-skills/claude-api/shared/live-sources.md +121 -0
  32. package/bundled-skills/claude-api/shared/models.md +68 -0
  33. package/bundled-skills/claude-api/shared/tool-use-concepts.md +305 -0
  34. package/bundled-skills/claude-api/typescript/agent-sdk/README.md +220 -0
  35. package/bundled-skills/claude-api/typescript/agent-sdk/patterns.md +150 -0
  36. package/bundled-skills/claude-api/typescript/claude-api/README.md +313 -0
  37. package/bundled-skills/claude-api/typescript/claude-api/batches.md +106 -0
  38. package/bundled-skills/claude-api/typescript/claude-api/files-api.md +98 -0
  39. package/bundled-skills/claude-api/typescript/claude-api/streaming.md +178 -0
  40. package/bundled-skills/claude-api/typescript/claude-api/tool-use.md +477 -0
  41. package/bundled-skills/codex-review/SKILL.md +1 -1
  42. package/bundled-skills/cold-email/SKILL.md +167 -0
  43. package/bundled-skills/cold-email/evals/evals.json +94 -0
  44. package/bundled-skills/cold-email/references/benchmarks.md +83 -0
  45. package/bundled-skills/cold-email/references/follow-up-sequences.md +81 -0
  46. package/bundled-skills/cold-email/references/frameworks.md +90 -0
  47. package/bundled-skills/cold-email/references/personalization.md +79 -0
  48. package/bundled-skills/cold-email/references/subject-lines.md +53 -0
  49. package/bundled-skills/content-strategy/SKILL.md +374 -0
  50. package/bundled-skills/content-strategy/evals/evals.json +90 -0
  51. package/bundled-skills/content-strategy/references/headless-cms.md +194 -0
  52. package/bundled-skills/context7-auto-research/SKILL.md +1 -1
  53. package/bundled-skills/dbos-golang/SKILL.md +1 -1
  54. package/bundled-skills/dbos-python/SKILL.md +1 -1
  55. package/bundled-skills/dbos-typescript/SKILL.md +1 -1
  56. package/bundled-skills/debug-buttercup/SKILL.md +1 -1
  57. package/bundled-skills/defuddle/SKILL.md +50 -0
  58. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  59. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  60. package/bundled-skills/docs/integrations/jetski-gemini-loader/package.json +1 -0
  61. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  62. package/bundled-skills/docs/maintainers/skills-import-2026-03-21.md +81 -0
  63. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  64. package/bundled-skills/docs/users/bundles.md +1 -1
  65. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  66. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  67. package/bundled-skills/docs/users/getting-started.md +1 -1
  68. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  69. package/bundled-skills/docs/users/usage.md +4 -4
  70. package/bundled-skills/docs/users/visual-guide.md +4 -4
  71. package/bundled-skills/evaluation/SKILL.md +1 -1
  72. package/bundled-skills/exa-search/SKILL.md +1 -1
  73. package/bundled-skills/firecrawl-scraper/SKILL.md +1 -1
  74. package/bundled-skills/frontend-dev-guidelines/SKILL.md +1 -1
  75. package/bundled-skills/gha-security-review/SKILL.md +2 -1
  76. package/bundled-skills/git-pushing/SKILL.md +1 -1
  77. package/bundled-skills/internal-comms/LICENSE.txt +202 -0
  78. package/bundled-skills/internal-comms/SKILL.md +35 -0
  79. package/bundled-skills/internal-comms/examples/3p-updates.md +47 -0
  80. package/bundled-skills/internal-comms/examples/company-newsletter.md +65 -0
  81. package/bundled-skills/internal-comms/examples/faq-answers.md +30 -0
  82. package/bundled-skills/internal-comms/examples/general-comms.md +16 -0
  83. package/bundled-skills/json-canvas/SKILL.md +253 -0
  84. package/bundled-skills/json-canvas/references/EXAMPLES.md +329 -0
  85. package/bundled-skills/lead-magnets/SKILL.md +319 -0
  86. package/bundled-skills/lead-magnets/references/benchmarks.md +129 -0
  87. package/bundled-skills/lead-magnets/references/format-guide.md +196 -0
  88. package/bundled-skills/memory-systems/SKILL.md +1 -1
  89. package/bundled-skills/obsidian-bases/SKILL.md +506 -0
  90. package/bundled-skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md +173 -0
  91. package/bundled-skills/obsidian-cli/SKILL.md +115 -0
  92. package/bundled-skills/obsidian-markdown/SKILL.md +205 -0
  93. package/bundled-skills/obsidian-markdown/references/CALLOUTS.md +58 -0
  94. package/bundled-skills/obsidian-markdown/references/EMBEDS.md +63 -0
  95. package/bundled-skills/obsidian-markdown/references/PROPERTIES.md +61 -0
  96. package/bundled-skills/product-marketing-context/SKILL.md +250 -0
  97. package/bundled-skills/product-marketing-context/evals/evals.json +85 -0
  98. package/bundled-skills/react-best-practices/SKILL.md +1 -1
  99. package/bundled-skills/revops/SKILL.md +352 -0
  100. package/bundled-skills/revops/evals/evals.json +91 -0
  101. package/bundled-skills/revops/references/automation-playbooks.md +290 -0
  102. package/bundled-skills/revops/references/lifecycle-definitions.md +278 -0
  103. package/bundled-skills/revops/references/routing-rules.md +203 -0
  104. package/bundled-skills/revops/references/scoring-models.md +247 -0
  105. package/bundled-skills/sales-enablement/SKILL.md +358 -0
  106. package/bundled-skills/sales-enablement/evals/evals.json +91 -0
  107. package/bundled-skills/sales-enablement/references/deck-frameworks.md +263 -0
  108. package/bundled-skills/sales-enablement/references/demo-scripts.md +355 -0
  109. package/bundled-skills/sales-enablement/references/objection-library.md +270 -0
  110. package/bundled-skills/sales-enablement/references/one-pager-templates.md +208 -0
  111. package/bundled-skills/seo/SKILL.md +139 -0
  112. package/bundled-skills/seo/references/cwv-thresholds.md +108 -0
  113. package/bundled-skills/seo/references/eeat-framework.md +214 -0
  114. package/bundled-skills/seo/references/quality-gates.md +155 -0
  115. package/bundled-skills/seo/references/schema-types.md +118 -0
  116. package/bundled-skills/seo-competitor-pages/SKILL.md +229 -0
  117. package/bundled-skills/seo-content/SKILL.md +186 -0
  118. package/bundled-skills/seo-dataforseo/SKILL.md +395 -0
  119. package/bundled-skills/seo-geo/SKILL.md +254 -0
  120. package/bundled-skills/seo-hreflang/SKILL.md +209 -0
  121. package/bundled-skills/seo-image-gen/SKILL.md +183 -0
  122. package/bundled-skills/seo-images/SKILL.md +193 -0
  123. package/bundled-skills/seo-page/SKILL.md +103 -0
  124. package/bundled-skills/seo-plan/SKILL.md +136 -0
  125. package/bundled-skills/seo-plan/assets/agency.md +175 -0
  126. package/bundled-skills/seo-plan/assets/ecommerce.md +167 -0
  127. package/bundled-skills/seo-plan/assets/generic.md +144 -0
  128. package/bundled-skills/seo-plan/assets/local-service.md +160 -0
  129. package/bundled-skills/seo-plan/assets/publisher.md +153 -0
  130. package/bundled-skills/seo-plan/assets/saas.md +135 -0
  131. package/bundled-skills/seo-programmatic/SKILL.md +184 -0
  132. package/bundled-skills/seo-schema/SKILL.md +178 -0
  133. package/bundled-skills/seo-sitemap/SKILL.md +129 -0
  134. package/bundled-skills/seo-technical/SKILL.md +175 -0
  135. package/bundled-skills/site-architecture/SKILL.md +366 -0
  136. package/bundled-skills/site-architecture/evals/evals.json +88 -0
  137. package/bundled-skills/site-architecture/references/mermaid-templates.md +216 -0
  138. package/bundled-skills/site-architecture/references/navigation-patterns.md +305 -0
  139. package/bundled-skills/site-architecture/references/site-type-templates.md +293 -0
  140. package/bundled-skills/skill-improver/SKILL.md +1 -1
  141. package/bundled-skills/tavily-web/SKILL.md +1 -1
  142. package/bundled-skills/test-fixing/SKILL.md +1 -1
  143. package/bundled-skills/tool-design/SKILL.md +1 -1
  144. package/bundled-skills/ui-ux-pro-max/SKILL.md +1 -1
  145. package/bundled-skills/verification-before-completion/SKILL.md +1 -1
  146. package/bundled-skills/wiki-changelog/SKILL.md +1 -1
  147. package/bundled-skills/wiki-onboarding/SKILL.md +1 -1
  148. package/bundled-skills/wiki-qa/SKILL.md +1 -1
  149. package/bundled-skills/wiki-researcher/SKILL.md +1 -1
  150. package/bundled-skills/wiki-vitepress/SKILL.md +1 -1
  151. package/package.json +1 -1
@@ -0,0 +1,506 @@
1
+ ---
2
+ name: obsidian-bases
3
+ description: 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.
4
+ risk: unknown
5
+ source: "https://github.com/kepano/obsidian-skills"
6
+ date_added: "2026-03-21"
7
+ ---
8
+
9
+ # Obsidian Bases Skill
10
+
11
+ ## When to Use
12
+
13
+ - Use when creating or editing `.base` files in Obsidian.
14
+ - Use for database-like note views with filters, formulas, summaries, or cards/tables.
15
+ - Use when the user asks about Obsidian Bases specifically.
16
+
17
+ ## Workflow
18
+
19
+ 1. **Create the file**: Create a `.base` file in the vault with valid YAML content
20
+ 2. **Define scope**: Add `filters` to select which notes appear (by tag, folder, property, or date)
21
+ 3. **Add formulas** (optional): Define computed properties in the `formulas` section
22
+ 4. **Configure views**: Add one or more views (`table`, `cards`, `list`, or `map`) with `order` specifying which properties to display
23
+ 5. **Validate**: Verify the file is valid YAML with no syntax errors. Check that all referenced properties and formulas exist. Common issues: unquoted strings containing special YAML characters, mismatched quotes in formula expressions, referencing `formula.X` without defining `X` in `formulas`
24
+ 6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below
25
+
26
+ ## Schema
27
+
28
+ Base files use the `.base` extension and contain valid YAML.
29
+
30
+ ```yaml
31
+ # Global filters apply to ALL views in the base
32
+ filters:
33
+ # Can be a single filter string
34
+ # OR a recursive filter object with and/or/not
35
+ and: []
36
+ or: []
37
+ not: []
38
+
39
+ # Define formula properties that can be used across all views
40
+ formulas:
41
+ formula_name: 'expression'
42
+
43
+ # Configure display names and settings for properties
44
+ properties:
45
+ property_name:
46
+ displayName: "Display Name"
47
+ formula.formula_name:
48
+ displayName: "Formula Display Name"
49
+ file.ext:
50
+ displayName: "Extension"
51
+
52
+ # Define custom summary formulas
53
+ summaries:
54
+ custom_summary_name: 'values.mean().round(3)'
55
+
56
+ # Define one or more views
57
+ views:
58
+ - type: table | cards | list | map
59
+ name: "View Name"
60
+ limit: 10 # Optional: limit results
61
+ groupBy: # Optional: group results
62
+ property: property_name
63
+ direction: ASC | DESC
64
+ filters: # View-specific filters
65
+ and: []
66
+ order: # Properties to display in order
67
+ - file.name
68
+ - property_name
69
+ - formula.formula_name
70
+ summaries: # Map properties to summary formulas
71
+ property_name: Average
72
+ ```
73
+
74
+ ## Filter Syntax
75
+
76
+ Filters narrow down results. They can be applied globally or per-view.
77
+
78
+ ### Filter Structure
79
+
80
+ ```yaml
81
+ # Single filter
82
+ filters: 'status == "done"'
83
+
84
+ # AND - all conditions must be true
85
+ filters:
86
+ and:
87
+ - 'status == "done"'
88
+ - 'priority > 3'
89
+
90
+ # OR - any condition can be true
91
+ filters:
92
+ or:
93
+ - 'file.hasTag("book")'
94
+ - 'file.hasTag("article")'
95
+
96
+ # NOT - exclude matching items
97
+ filters:
98
+ not:
99
+ - 'file.hasTag("archived")'
100
+
101
+ # Nested filters
102
+ filters:
103
+ or:
104
+ - file.hasTag("tag")
105
+ - and:
106
+ - file.hasTag("book")
107
+ - file.hasLink("Textbook")
108
+ - not:
109
+ - file.hasTag("book")
110
+ - file.inFolder("Required Reading")
111
+ ```
112
+
113
+ ### Filter Operators
114
+
115
+ | Operator | Description |
116
+ |----------|-------------|
117
+ | `==` | equals |
118
+ | `!=` | not equal |
119
+ | `>` | greater than |
120
+ | `<` | less than |
121
+ | `>=` | greater than or equal |
122
+ | `<=` | less than or equal |
123
+ | `&&` | logical and |
124
+ | `\|\|` | logical or |
125
+ | <code>!</code> | logical not |
126
+
127
+ ## Properties
128
+
129
+ ### Three Types of Properties
130
+
131
+ 1. **Note properties** - From frontmatter: `note.author` or just `author`
132
+ 2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
133
+ 3. **Formula properties** - Computed values: `formula.my_formula`
134
+
135
+ ### File Properties Reference
136
+
137
+ | Property | Type | Description |
138
+ |----------|------|-------------|
139
+ | `file.name` | String | File name |
140
+ | `file.basename` | String | File name without extension |
141
+ | `file.path` | String | Full path to file |
142
+ | `file.folder` | String | Parent folder path |
143
+ | `file.ext` | String | File extension |
144
+ | `file.size` | Number | File size in bytes |
145
+ | `file.ctime` | Date | Created time |
146
+ | `file.mtime` | Date | Modified time |
147
+ | `file.tags` | List | All tags in file |
148
+ | `file.links` | List | Internal links in file |
149
+ | `file.backlinks` | List | Files linking to this file |
150
+ | `file.embeds` | List | Embeds in the note |
151
+ | `file.properties` | Object | All frontmatter properties |
152
+
153
+ ### The `this` Keyword
154
+
155
+ - In main content area: refers to the base file itself
156
+ - When embedded: refers to the embedding file
157
+ - In sidebar: refers to the active file in main content
158
+
159
+ ## Formula Syntax
160
+
161
+ Formulas compute values from properties. Defined in the `formulas` section.
162
+
163
+ ```yaml
164
+ formulas:
165
+ # Simple arithmetic
166
+ total: "price * quantity"
167
+
168
+ # Conditional logic
169
+ status_icon: 'if(done, "✅", "⏳")'
170
+
171
+ # String formatting
172
+ formatted_price: 'if(price, price.toFixed(2) + " dollars")'
173
+
174
+ # Date formatting
175
+ created: 'file.ctime.format("YYYY-MM-DD")'
176
+
177
+ # Calculate days since created (use .days for Duration)
178
+ days_old: '(now() - file.ctime).days'
179
+
180
+ # Calculate days until due date
181
+ days_until_due: 'if(due_date, (date(due_date) - today()).days, "")'
182
+ ```
183
+
184
+ ## Key Functions
185
+
186
+ Most commonly used functions. For the complete reference of all types (Date, String, Number, List, File, Link, Object, RegExp), see [FUNCTIONS_REFERENCE.md](references/FUNCTIONS_REFERENCE.md).
187
+
188
+ | Function | Signature | Description |
189
+ |----------|-----------|-------------|
190
+ | `date()` | `date(string): date` | Parse string to date (`YYYY-MM-DD HH:mm:ss`) |
191
+ | `now()` | `now(): date` | Current date and time |
192
+ | `today()` | `today(): date` | Current date (time = 00:00:00) |
193
+ | `if()` | `if(condition, trueResult, falseResult?)` | Conditional |
194
+ | `duration()` | `duration(string): duration` | Parse duration string |
195
+ | `file()` | `file(path): file` | Get file object |
196
+ | `link()` | `link(path, display?): Link` | Create a link |
197
+
198
+ ### Duration Type
199
+
200
+ When subtracting two dates, the result is a **Duration** type (not a number).
201
+
202
+ **Duration Fields:** `duration.days`, `duration.hours`, `duration.minutes`, `duration.seconds`, `duration.milliseconds`
203
+
204
+ **IMPORTANT:** Duration does NOT support `.round()`, `.floor()`, `.ceil()` directly. Access a numeric field first (like `.days`), then apply number functions.
205
+
206
+ ```yaml
207
+ # CORRECT: Calculate days between dates
208
+ "(date(due_date) - today()).days" # Returns number of days
209
+ "(now() - file.ctime).days" # Days since created
210
+ "(date(due_date) - today()).days.round(0)" # Rounded days
211
+
212
+ # WRONG - will cause error:
213
+ # "((date(due) - today()) / 86400000).round(0)" # Duration doesn't support division then round
214
+ ```
215
+
216
+ ### Date Arithmetic
217
+
218
+ ```yaml
219
+ # Duration units: y/year/years, M/month/months, d/day/days,
220
+ # w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
221
+ "now() + \"1 day\"" # Tomorrow
222
+ "today() + \"7d\"" # A week from today
223
+ "now() - file.ctime" # Returns Duration
224
+ "(now() - file.ctime).days" # Get days as number
225
+ ```
226
+
227
+ ## View Types
228
+
229
+ ### Table View
230
+
231
+ ```yaml
232
+ views:
233
+ - type: table
234
+ name: "My Table"
235
+ order:
236
+ - file.name
237
+ - status
238
+ - due_date
239
+ summaries:
240
+ price: Sum
241
+ count: Average
242
+ ```
243
+
244
+ ### Cards View
245
+
246
+ ```yaml
247
+ views:
248
+ - type: cards
249
+ name: "Gallery"
250
+ order:
251
+ - file.name
252
+ - cover_image
253
+ - description
254
+ ```
255
+
256
+ ### List View
257
+
258
+ ```yaml
259
+ views:
260
+ - type: list
261
+ name: "Simple List"
262
+ order:
263
+ - file.name
264
+ - status
265
+ ```
266
+
267
+ ### Map View
268
+
269
+ Requires latitude/longitude properties and the Maps community plugin.
270
+
271
+ ```yaml
272
+ views:
273
+ - type: map
274
+ name: "Locations"
275
+ # Map-specific settings for lat/lng properties
276
+ ```
277
+
278
+ ## Default Summary Formulas
279
+
280
+ | Name | Input Type | Description |
281
+ |------|------------|-------------|
282
+ | `Average` | Number | Mathematical mean |
283
+ | `Min` | Number | Smallest number |
284
+ | `Max` | Number | Largest number |
285
+ | `Sum` | Number | Sum of all numbers |
286
+ | `Range` | Number | Max - Min |
287
+ | `Median` | Number | Mathematical median |
288
+ | `Stddev` | Number | Standard deviation |
289
+ | `Earliest` | Date | Earliest date |
290
+ | `Latest` | Date | Latest date |
291
+ | `Range` | Date | Latest - Earliest |
292
+ | `Checked` | Boolean | Count of true values |
293
+ | `Unchecked` | Boolean | Count of false values |
294
+ | `Empty` | Any | Count of empty values |
295
+ | `Filled` | Any | Count of non-empty values |
296
+ | `Unique` | Any | Count of unique values |
297
+
298
+ ## Complete Examples
299
+
300
+ ### Task Tracker Base
301
+
302
+ ```yaml
303
+ filters:
304
+ and:
305
+ - file.hasTag("task")
306
+ - 'file.ext == "md"'
307
+
308
+ formulas:
309
+ days_until_due: 'if(due, (date(due) - today()).days, "")'
310
+ is_overdue: 'if(due, date(due) < today() && status != "done", false)'
311
+ priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
312
+
313
+ properties:
314
+ status:
315
+ displayName: Status
316
+ formula.days_until_due:
317
+ displayName: "Days Until Due"
318
+ formula.priority_label:
319
+ displayName: Priority
320
+
321
+ views:
322
+ - type: table
323
+ name: "Active Tasks"
324
+ filters:
325
+ and:
326
+ - 'status != "done"'
327
+ order:
328
+ - file.name
329
+ - status
330
+ - formula.priority_label
331
+ - due
332
+ - formula.days_until_due
333
+ groupBy:
334
+ property: status
335
+ direction: ASC
336
+ summaries:
337
+ formula.days_until_due: Average
338
+
339
+ - type: table
340
+ name: "Completed"
341
+ filters:
342
+ and:
343
+ - 'status == "done"'
344
+ order:
345
+ - file.name
346
+ - completed_date
347
+ ```
348
+
349
+ ### Reading List Base
350
+
351
+ ```yaml
352
+ filters:
353
+ or:
354
+ - file.hasTag("book")
355
+ - file.hasTag("article")
356
+
357
+ formulas:
358
+ reading_time: 'if(pages, (pages * 2).toString() + " min", "")'
359
+ status_icon: 'if(status == "reading", "📖", if(status == "done", "✅", "📚"))'
360
+ year_read: 'if(finished_date, date(finished_date).year, "")'
361
+
362
+ properties:
363
+ author:
364
+ displayName: Author
365
+ formula.status_icon:
366
+ displayName: ""
367
+ formula.reading_time:
368
+ displayName: "Est. Time"
369
+
370
+ views:
371
+ - type: cards
372
+ name: "Library"
373
+ order:
374
+ - cover
375
+ - file.name
376
+ - author
377
+ - formula.status_icon
378
+ filters:
379
+ not:
380
+ - 'status == "dropped"'
381
+
382
+ - type: table
383
+ name: "Reading List"
384
+ filters:
385
+ and:
386
+ - 'status == "to-read"'
387
+ order:
388
+ - file.name
389
+ - author
390
+ - pages
391
+ - formula.reading_time
392
+ ```
393
+
394
+ ### Daily Notes Index
395
+
396
+ ```yaml
397
+ filters:
398
+ and:
399
+ - file.inFolder("Daily Notes")
400
+ - '/^\d{4}-\d{2}-\d{2}$/.matches(file.basename)'
401
+
402
+ formulas:
403
+ word_estimate: '(file.size / 5).round(0)'
404
+ day_of_week: 'date(file.basename).format("dddd")'
405
+
406
+ properties:
407
+ formula.day_of_week:
408
+ displayName: "Day"
409
+ formula.word_estimate:
410
+ displayName: "~Words"
411
+
412
+ views:
413
+ - type: table
414
+ name: "Recent Notes"
415
+ limit: 30
416
+ order:
417
+ - file.name
418
+ - formula.day_of_week
419
+ - formula.word_estimate
420
+ - file.mtime
421
+ ```
422
+
423
+ ## Embedding Bases
424
+
425
+ Embed in Markdown files:
426
+
427
+ ```markdown
428
+ ![[MyBase.base]]
429
+
430
+ <!-- Specific view -->
431
+ ![[MyBase.base#View Name]]
432
+ ```
433
+
434
+ ## YAML Quoting Rules
435
+
436
+ - Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'`
437
+ - Use double quotes for simple strings: `"My View Name"`
438
+ - Escape nested quotes properly in complex expressions
439
+
440
+ ## Troubleshooting
441
+
442
+ ### YAML Syntax Errors
443
+
444
+ **Unquoted special characters**: Strings containing `:`, `{`, `}`, `[`, `]`, `,`, `&`, `*`, `#`, `?`, `|`, `-`, `<`, `>`, `=`, `!`, `%`, `@`, `` ` `` must be quoted.
445
+
446
+ ```yaml
447
+ # WRONG - colon in unquoted string
448
+ displayName: Status: Active
449
+
450
+ # CORRECT
451
+ displayName: "Status: Active"
452
+ ```
453
+
454
+ **Mismatched quotes in formulas**: When a formula contains double quotes, wrap the entire formula in single quotes.
455
+
456
+ ```yaml
457
+ # WRONG - double quotes inside double quotes
458
+ formulas:
459
+ label: "if(done, "Yes", "No")"
460
+
461
+ # CORRECT - single quotes wrapping double quotes
462
+ formulas:
463
+ label: 'if(done, "Yes", "No")'
464
+ ```
465
+
466
+ ### Common Formula Errors
467
+
468
+ **Duration math without field access**: Subtracting dates returns a Duration, not a number. Always access `.days`, `.hours`, etc.
469
+
470
+ ```yaml
471
+ # WRONG - Duration is not a number
472
+ "(now() - file.ctime).round(0)"
473
+
474
+ # CORRECT - access .days first, then round
475
+ "(now() - file.ctime).days.round(0)"
476
+ ```
477
+
478
+ **Missing null checks**: Properties may not exist on all notes. Use `if()` to guard.
479
+
480
+ ```yaml
481
+ # WRONG - crashes if due_date is empty
482
+ "(date(due_date) - today()).days"
483
+
484
+ # CORRECT - guard with if()
485
+ 'if(due_date, (date(due_date) - today()).days, "")'
486
+ ```
487
+
488
+ **Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`.
489
+
490
+ ```yaml
491
+ # This will fail silently if 'total' is not defined in formulas
492
+ order:
493
+ - formula.total
494
+
495
+ # Fix: define it
496
+ formulas:
497
+ total: "price * quantity"
498
+ ```
499
+
500
+ ## References
501
+
502
+ - [Bases Syntax](https://help.obsidian.md/bases/syntax)
503
+ - [Functions](https://help.obsidian.md/bases/functions)
504
+ - [Views](https://help.obsidian.md/bases/views)
505
+ - [Formulas](https://help.obsidian.md/formulas)
506
+ - [Complete Functions Reference](references/FUNCTIONS_REFERENCE.md)
@@ -0,0 +1,173 @@
1
+ # Functions Reference
2
+
3
+ ## Global Functions
4
+
5
+ | Function | Signature | Description |
6
+ |----------|-----------|-------------|
7
+ | `date()` | `date(string): date` | Parse string to date. Format: `YYYY-MM-DD HH:mm:ss` |
8
+ | `duration()` | `duration(string): duration` | Parse duration string |
9
+ | `now()` | `now(): date` | Current date and time |
10
+ | `today()` | `today(): date` | Current date (time = 00:00:00) |
11
+ | `if()` | `if(condition, trueResult, falseResult?)` | Conditional |
12
+ | `min()` | `min(n1, n2, ...): number` | Smallest number |
13
+ | `max()` | `max(n1, n2, ...): number` | Largest number |
14
+ | `number()` | `number(any): number` | Convert to number |
15
+ | `link()` | `link(path, display?): Link` | Create a link |
16
+ | `list()` | `list(element): List` | Wrap in list if not already |
17
+ | `file()` | `file(path): file` | Get file object |
18
+ | `image()` | `image(path): image` | Create image for rendering |
19
+ | `icon()` | `icon(name): icon` | Lucide icon by name |
20
+ | `html()` | `html(string): html` | Render as HTML |
21
+ | `escapeHTML()` | `escapeHTML(string): string` | Escape HTML characters |
22
+
23
+ ## Any Type Functions
24
+
25
+ | Function | Signature | Description |
26
+ |----------|-----------|-------------|
27
+ | `isTruthy()` | `any.isTruthy(): boolean` | Coerce to boolean |
28
+ | `isType()` | `any.isType(type): boolean` | Check type |
29
+ | `toString()` | `any.toString(): string` | Convert to string |
30
+
31
+ ## Date Functions & Fields
32
+
33
+ **Fields:** `date.year`, `date.month`, `date.day`, `date.hour`, `date.minute`, `date.second`, `date.millisecond`
34
+
35
+ | Function | Signature | Description |
36
+ |----------|-----------|-------------|
37
+ | `date()` | `date.date(): date` | Remove time portion |
38
+ | `format()` | `date.format(string): string` | Format with Moment.js pattern |
39
+ | `time()` | `date.time(): string` | Get time as string |
40
+ | `relative()` | `date.relative(): string` | Human-readable relative time |
41
+ | `isEmpty()` | `date.isEmpty(): boolean` | Always false for dates |
42
+
43
+ ## Duration Type
44
+
45
+ When subtracting two dates, the result is a **Duration** type (not a number). Duration has its own properties and methods.
46
+
47
+ **Duration Fields:**
48
+ | Field | Type | Description |
49
+ |-------|------|-------------|
50
+ | `duration.days` | Number | Total days in duration |
51
+ | `duration.hours` | Number | Total hours in duration |
52
+ | `duration.minutes` | Number | Total minutes in duration |
53
+ | `duration.seconds` | Number | Total seconds in duration |
54
+ | `duration.milliseconds` | Number | Total milliseconds in duration |
55
+
56
+ **IMPORTANT:** Duration does NOT support `.round()`, `.floor()`, `.ceil()` directly. You must access a numeric field first (like `.days`), then apply number functions.
57
+
58
+ ```yaml
59
+ # CORRECT: Calculate days between dates
60
+ "(date(due_date) - today()).days" # Returns number of days
61
+ "(now() - file.ctime).days" # Days since created
62
+
63
+ # CORRECT: Round the numeric result if needed
64
+ "(date(due_date) - today()).days.round(0)" # Rounded days
65
+ "(now() - file.ctime).hours.round(0)" # Rounded hours
66
+
67
+ # WRONG - will cause error:
68
+ # "((date(due) - today()) / 86400000).round(0)" # Duration doesn't support division then round
69
+ ```
70
+
71
+ ## Date Arithmetic
72
+
73
+ ```yaml
74
+ # Duration units: y/year/years, M/month/months, d/day/days,
75
+ # w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
76
+
77
+ # Add/subtract durations
78
+ "date + \"1M\"" # Add 1 month
79
+ "date - \"2h\"" # Subtract 2 hours
80
+ "now() + \"1 day\"" # Tomorrow
81
+ "today() + \"7d\"" # A week from today
82
+
83
+ # Subtract dates returns Duration type
84
+ "now() - file.ctime" # Returns Duration
85
+ "(now() - file.ctime).days" # Get days as number
86
+ "(now() - file.ctime).hours" # Get hours as number
87
+
88
+ # Complex duration arithmetic
89
+ "now() + (duration('1d') * 2)"
90
+ ```
91
+
92
+ ## String Functions
93
+
94
+ **Field:** `string.length`
95
+
96
+ | Function | Signature | Description |
97
+ |----------|-----------|-------------|
98
+ | `contains()` | `string.contains(value): boolean` | Check substring |
99
+ | `containsAll()` | `string.containsAll(...values): boolean` | All substrings present |
100
+ | `containsAny()` | `string.containsAny(...values): boolean` | Any substring present |
101
+ | `startsWith()` | `string.startsWith(query): boolean` | Starts with query |
102
+ | `endsWith()` | `string.endsWith(query): boolean` | Ends with query |
103
+ | `isEmpty()` | `string.isEmpty(): boolean` | Empty or not present |
104
+ | `lower()` | `string.lower(): string` | To lowercase |
105
+ | `title()` | `string.title(): string` | To Title Case |
106
+ | `trim()` | `string.trim(): string` | Remove whitespace |
107
+ | `replace()` | `string.replace(pattern, replacement): string` | Replace pattern |
108
+ | `repeat()` | `string.repeat(count): string` | Repeat string |
109
+ | `reverse()` | `string.reverse(): string` | Reverse string |
110
+ | `slice()` | `string.slice(start, end?): string` | Substring |
111
+ | `split()` | `string.split(separator, n?): list` | Split to list |
112
+
113
+ ## Number Functions
114
+
115
+ | Function | Signature | Description |
116
+ |----------|-----------|-------------|
117
+ | `abs()` | `number.abs(): number` | Absolute value |
118
+ | `ceil()` | `number.ceil(): number` | Round up |
119
+ | `floor()` | `number.floor(): number` | Round down |
120
+ | `round()` | `number.round(digits?): number` | Round to digits |
121
+ | `toFixed()` | `number.toFixed(precision): string` | Fixed-point notation |
122
+ | `isEmpty()` | `number.isEmpty(): boolean` | Not present |
123
+
124
+ ## List Functions
125
+
126
+ **Field:** `list.length`
127
+
128
+ | Function | Signature | Description |
129
+ |----------|-----------|-------------|
130
+ | `contains()` | `list.contains(value): boolean` | Element exists |
131
+ | `containsAll()` | `list.containsAll(...values): boolean` | All elements exist |
132
+ | `containsAny()` | `list.containsAny(...values): boolean` | Any element exists |
133
+ | `filter()` | `list.filter(expression): list` | Filter by condition (uses `value`, `index`) |
134
+ | `map()` | `list.map(expression): list` | Transform elements (uses `value`, `index`) |
135
+ | `reduce()` | `list.reduce(expression, initial): any` | Reduce to single value (uses `value`, `index`, `acc`) |
136
+ | `flat()` | `list.flat(): list` | Flatten nested lists |
137
+ | `join()` | `list.join(separator): string` | Join to string |
138
+ | `reverse()` | `list.reverse(): list` | Reverse order |
139
+ | `slice()` | `list.slice(start, end?): list` | Sublist |
140
+ | `sort()` | `list.sort(): list` | Sort ascending |
141
+ | `unique()` | `list.unique(): list` | Remove duplicates |
142
+ | `isEmpty()` | `list.isEmpty(): boolean` | No elements |
143
+
144
+ ## File Functions
145
+
146
+ | Function | Signature | Description |
147
+ |----------|-----------|-------------|
148
+ | `asLink()` | `file.asLink(display?): Link` | Convert to link |
149
+ | `hasLink()` | `file.hasLink(otherFile): boolean` | Has link to file |
150
+ | `hasTag()` | `file.hasTag(...tags): boolean` | Has any of the tags |
151
+ | `hasProperty()` | `file.hasProperty(name): boolean` | Has property |
152
+ | `inFolder()` | `file.inFolder(folder): boolean` | In folder or subfolder |
153
+
154
+ ## Link Functions
155
+
156
+ | Function | Signature | Description |
157
+ |----------|-----------|-------------|
158
+ | `asFile()` | `link.asFile(): file` | Get file object |
159
+ | `linksTo()` | `link.linksTo(file): boolean` | Links to file |
160
+
161
+ ## Object Functions
162
+
163
+ | Function | Signature | Description |
164
+ |----------|-----------|-------------|
165
+ | `isEmpty()` | `object.isEmpty(): boolean` | No properties |
166
+ | `keys()` | `object.keys(): list` | List of keys |
167
+ | `values()` | `object.values(): list` | List of values |
168
+
169
+ ## Regular Expression Functions
170
+
171
+ | Function | Signature | Description |
172
+ |----------|-----------|-------------|
173
+ | `matches()` | `regexp.matches(string): boolean` | Test if matches |