SkillAtlasSkill 详情

obsidian-bases

收录最全、更新最快的AI Agent技能库,涵盖文档处理、内容创作、编程开发、机器学习、自动化工作流等多个领域的精选技能包。

审核状态:已审核Quality 80Security 88

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年10月1日

🎯 技能商店 - Skill Store

Stars Forks Last Commit Issues License Auto Sync

收录最全、更新最快的AI Agent技能库,涵盖文档处理、内容创作、编程开发、机器学习、自动化工作流等多个领域的精选技能包。

官方技能 本地技能 备份覆盖 自动更新

🧠 知易智能基座 :20+模型自由切换,知识永远留在你手里 —一个对话框调度所有模型,240+技能即插即用,四色卡片让AI真正记住你。 👉 申请体验

📊 统计数据

  • 官方技能: 182 个(来自 awesome-agent-skills,自动爬取)
  • 本地技能: 63 个(27核心 + 30子技能 + 6系统内置)
  • 技能总数: 245 个(官方 + 本地)
  • 备份覆盖率: 100%(71个压缩包,完整备份)
  • 自动更新: 每24小时自动爬取最新技能

🌟 核心特性

🤖 自动更新

每24小时自动爬取 awesome-agent-skills 仓库,确保技能库始终保持最新状态。

📦 双重技能库

  • 官方技能:182个来自Anthropic、Vercel、Cloudflare、Google Labs、Hugging Face等顶级团队
  • 本地技能:63个精选中文技能,涵盖内容创作、视频制作、电商营销等垂直领域

🏷️ 智能分类

按照功能、来源、Star数量等多维度标签进行分类整理。

📊 数据导出

支持JSON和CSV格式导出,方便数据分析和二次开发。

📚 官方技能来源

本技能商店收录了来自以下顶级团队的官方技能:

  • Anthropic (17个) - docx, pptx, xlsx, pdf, mcp-builder, webapp-testing 等
  • Vercel (7个) - react-best-practices, next-best-practices, composition-patterns 等
  • Cloudflare (7个) - agents-sdk, durable-objects, wrangler 等
  • Trail of Bits (26个) - building-secure-contracts, static-analysis, property-based-testing 等
  • Hugging Face (8个) - model-trainer, datasets, evaluation, jobs 等
  • Google Labs (2个) - design-md, react-components 等
  • Stripe (2个) - stripe-best-practices, upgrade-stripe
  • Supabase (1个) - postgres-best-practices
  • Expo (3个) - expo-app-design, expo-deployment, upgrading-expo
  • Sentry (7个) - code-review, commit, create-pr, find-bugs 等
  • Better Auth (3个) - best-practices, commands, create-auth
  • 其他团队 - Tinybird, Remotion, Inngest 等

💾 本地技能库(63个)

📝 内容创作与发布(10个)

  • content-creation-publisher ⭐⭐⭐⭐⭐ - 内容创作与发布全流程
  • intelligent-content-system ⭐⭐⭐⭐⭐ - 智能内容系统
  • article-illustrator ⭐⭐⭐⭐ - 文章智能配图
  • baoyu-url-to-markdown ⭐⭐⭐⭐ - 网页转Markdown
  • baoyu-format-markdown ⭐⭐⭐⭐ - Markdown格式化
  • baoyu-post-to-wechat ⭐⭐⭐⭐ - 微信公众号发布
  • baoyu-post-to-x ⭐⭐⭐ - X/Twitter发布
  • baoyu-xhs-images ⭐⭐⭐⭐ - 小红书图文生成
  • wechat-hotspot-publisher ⭐⭐⭐ - 微信热点文章生成

🎬 视频创作(9个)

  • video-creation-suite ⭐⭐⭐⭐⭐ - 完整视频创作套件
  • video-creation-collaborator ⭐⭐⭐⭐ - 多智能体协同视频创作
  • video-creation-pro ⭐⭐⭐ - 商品视频创作系统
  • video-recreation ⭐⭐⭐⭐ - 视频二创工具
  • video-frame-extractor ⭐⭐⭐ - 视频反推工具
  • viral-video-copywriting ⭐⭐⭐⭐ - 爆款短视频文案
  • historical-science-video-prod ⭐⭐ - 历史科学类视频
  • historical-interview-scripts ⭐⭐ - 历史访谈文案
  • three-body-video-creator ⭐⭐ - 《三体》视频创作

🛒 电商与营销(7个)

  • ecommerce-full-pipeline ⭐⭐⭐⭐⭐ - 跨境电商全链路自动化(1688采集/清洗/上架/推广/视频/代发/爆品挖掘/闲鱼选品捡漏)
  • pet-commerce-creator ⭐⭐⭐ - 萌宠带货短视频
  • ecommerce-copywriter ⭐⭐⭐ - 电商图片文案
  • ecommerce-video-marketing ⭐⭐⭐ - 电商视频营销
  • product-marketing-copywriter ⭐⭐⭐ - 产品营销文案
  • product-video-creator ⭐⭐⭐⭐ - 商品视频创作
  • xiaohongshu-makeup ⭐⭐⭐ - 小红书美妆内容

📊 PPT与演示(6个)

  • NanoBanana-PPT-Skills ⭐⭐⭐⭐⭐ - AI生成PPT图片和视频
  • ppt-generator ⭐⭐⭐⭐ - 智能PPT生成
  • pptx-generator ⭐⭐⭐ - JSON转PPTX
  • nanobanana-ppt-visualizer ⭐⭐⭐ - PPT视觉增强
  • ppt-roadshow-generator ⭐⭐ - PPT路演视频
  • remotion-video-enhancer ⭐⭐ - 视频转场动画

🎙️ 语音与音频(3个)

  • tts-voice-synthesis ⭐⭐⭐⭐⭐ - 智能语音合成
  • qwen3-tts-local ⭐⭐⭐⭐ - 本地语音合成(Edge-TTS)
  • qwen3-asr-assistant ⭐⭐⭐⭐ - 语音转文字

🤖 数字人与视频配音(5个)

  • infinitetalk ⭐⭐⭐⭐⭐ - 音频驱动视频配音
  • infinitetalk-shopping-avatar ⭐⭐ - 小省导购员提示词
  • digital-avatar-shopping-video ⭐⭐ - 数字人口播带货
  • dream-video-prompt-generator ⭐⭐ - 即梦视频提示词
  • agentkit-multimedia-shopping ⭐⭐ - 多媒体带货视频

📄 文档与分析(4个)

  • paper-analysis-assistant ⭐⭐⭐⭐ - arXiv论文分析
  • contract-review ⭐⭐⭐ - 合同审核
  • law-to-markdown ⭐⭐ - 法律文档转换
  • stock-analysis ⭐⭐⭐ - 股票个股分析

💻 软件开发与代码理解(2个)

  • ontoly-software-graph ⭐⭐⭐⭐ - 基于 Ontoly Software Graph 的架构审查、请求追踪、依赖分析与影响分析
  • archify ⭐⭐⭐⭐⭐ - 将代码库/系统描述转为可交互的架构/工作流/时序/数据流/生命周期图,单文件 HTML + PNG/SVG/WebM 导出(含架构 Delta 评审)

🤝 智能体协作(3个)

  • agent-team ⭐⭐⭐ - 智能体团队协作
  • multi-agent-meeting ⭐⭐ - 多智能体会议
  • peers-advisory-group ⭐⭐ - 同行顾问团

💼 产品与项目管理(2个)

  • product-manager-toolkit ⭐⭐⭐ - 产品经理工具包
  • sales-ai-assistant ⭐⭐ - 销售AI助手

🎨 设计与可视化(4个)

  • frontend-design ⭐⭐⭐ - 前端界面设计
  • ai-drawio ⭐⭐⭐⭐ - 流程图绘制
  • pop-up-book-illustration ⭐⭐ - 3D纸艺插画
  • web-to-app ⭐⭐ - 网页转桌面应用

📑 文档处理(4个 - 系统内置)

  • pptx ⭐⭐⭐⭐⭐ - PPT文件处理
  • xlsx ⭐⭐⭐⭐⭐ - Excel文件处理
  • pdf ⭐⭐⭐⭐⭐ - PDF文件处理
  • docx ⭐⭐⭐⭐⭐ - Word文件处理

🔧 技能管理(2个 - 系统内置)

  • find-skill ⭐⭐⭐ - 技能发现工具
  • skill-creator ⭐⭐⭐ - 技能创建工具

💰 财务分析(2个)

  • creating-financial-models ⭐⭐⭐⭐ - 财务建模套件
  • market-research-reports ⭐⭐⭐⭐ - 市场研究报告

🎭 文化创作(1个)

  • poetry-music-visual ⭐⭐ - 古诗词配图配乐

🚀 快速开始

1. 克隆仓库

git clone https://github.com/anbeime/skill.git
cd skill

2. 安装依赖

pip install -r requirements.txt

3. 运行更新

# 立即执行一次更新
python main.py --once

# 启动定时更新守护进程
python main.py --daemon

# 显示数据统计
python main.py --stats

# 导出为 CSV 格式
python main.py --export skills.csv

# 详细日志模式
python main.py --once -v

4. 浏览技能

访问 在线技能商店 或查看本地文件:

# 查看官方技能列表
cat data/skills.json

# 查看本地技能列表
cat data/local_skills.json

# 查看技能文档
ls docs/

💾 技能备份

备份位置

  • 主目录: D:\tool\skills\
  • 压缩备份: D:\tool\skills\skill压缩文件\(71个压缩包)
  • 备份覆盖率: 100%

备份说明

  • 所有本地技能均有对应压缩包
  • 系统内置技能(pptx、xlsx、pdf、docx、find-skill、skill-creator)无需压缩包
  • 包含backup标记的文件为历史版本备份

📖 文档

🛠️ 技能验证工具

内置技能验证工具,用于检查 SKILL.md 是否符合规范:

# 验证所有技能
python tools/skill_validator.py validate

# 验证单个技能
python tools/skill_validator.py validate skills/agent-team

# 读取技能属性
python tools/skill_validator.py read-properties skills/agent-team --json

# 生成 XML prompt(用于 AI 调用)
python tools/skill_validator.py to-prompt skills/agent-team

详见 工具文档。

📊 数据格式

skills.json(官方技能)

{
  "skills": [
    {
      "name": "组织名/技能名",
      "description": "技能描述",
      "link": "GitHub链接",
      "category": "分类名称",
      "source": "来源仓库",
      "crawled_at": "2026-02-02T17:07:33"
    }
  ],
  "total": 182,
  "updated_at": "2026-02-02T17:07:33"
}

local_skills.json(本地技能)

{
  "metadata": {
    "total_skills": 61,
    "core_skills": 25,
    "sub_skills": 30,
    "system_builtin": 6,
    "last_updated": "2026-02-11T15:30:00"
  },
  "categories": {
    "内容创作与发布": {...},
    "视频创作": {...},
    ...
  },
  "statistics": {
    "by_api_requirement": {
      "必需API": 15,
      "可选API": 20,
      "完全免费": 26
    }
  }
}

🎯 核心技能推荐

⭐⭐⭐⭐⭐ 五星技能(11个)

  1. content-creation-publisher - 内容创作与发布全流程
  2. intelligent-content-system - 智能内容系统
  3. video-creation-suite - 完整视频创作套件
  4. ecommerce-full-pipeline - 跨境电商全链路自动化(1688采集/上架/推广/视频/代发/爆品挖掘/闲鱼选品)
  5. NanoBanana-PPT-Skills - AI生成PPT
  6. tts-voice-synthesis - 智能语音合成
  7. infinitetalk - 音频驱动视频配音
  8. pptx - PPT文件处理(系统内置)
  9. xlsx - Excel文件处理(系统内置)
  10. pdf - PDF文件处理(系统内置)
  11. docx - Word文件处理(系统内置)

🔗 相关链接

🤝 贡献

欢迎提交 Issue 和 Pull Request!详见 贡献指南。

🤝 贡献你的技能

发现了好用的 AI Agent 技能?欢迎提交!

贡献者

感谢所有为这个项目做出贡献的伙伴:

Contributors

🌐 兄弟项目

📄 许可证

MIT License

🙏 致谢

📝 更新日志

v2.2 (2026-07-29)

  • ✨ 新增 ecommerce-full-pipeline 技能:跨境电商全链路自动化工具
  • 🛒 集成1688采集、数据清洗、多平台上架(微信小店/Shopify/TikTok)、推广方案、短视频创作、一键代发、爆品挖掘、闲鱼选品捡漏、全自动流水线
  • 📊 本地技能从61个增加到62个
  • 🏆 电商与营销分类从6个增加到7个

v2.1 (2026-07-28)

  • 🛠️ 新增技能验证工具 (tools/skill_validator/)
  • 📋 新增技能创建模板 (skills/_template/)
  • 📖 新增规范文档、最佳实践、快速入门
  • 📝 新增贡献指南 (CONTRIBUTING.md)
  • ✅ 验证工具支持双重嵌套目录结构
  • ⚠️ 非标准字段改为警告(兼容社区技能)

v2.0 (2026-02-11)

  • ✨ 新增12个本地技能
  • 📊 本地技能从49个增加到61个
  • 🏷️ 完善技能分类体系(14个分类)
  • 📦 更新技能管理数据库
  • 🔄 更新README和前端页面
  • 📝 添加技能清单文档
  • 🔍 保留182个官方技能数据

v1.0 (2026-02-09)

  • 🎉 初始版本发布
  • 📦 包含182个官方技能
  • 💾 包含49个本地技能
  • 🗂️ 建立技能仓库
  • 🤖 实现自动爬取功能

最后更新: 2026-02-11
维护者: anbeime
联系方式: GitHub Issues

📦 社区技能仓库聚合

此部分由自动化脚本每日从上游源同步更新

最后更新: 2026-10-01T08:26:40.763383 | 技能源总数: 4492

数据来源

技能仓库列表

OpenAI Skills

VoltAgent Awesome Agent Skills

Awesome DSH Plugin

Matt Pocock Skills

ClawHub (Skill Registry)

Latest commit: 72a32c2

Packages

PackageDescription
clawhub-adminclawhub-admin package
clawhubCLI tool for managing skills
schemaShared API types and routes

CLI Commands

CLI

Common CLI flows:

  • Auth: clawhub login, clawhub whoami
  • Remote/headless auth: clawhub login --device
  • Discover: clawhub search ..., clawhub explore
  • Browse unified catalog (skills + plugins): clawhub package explore, clawhub package inspect <name>
  • Manage local installs: clawhub install @openclaw/demo, clawhub pin <skill>, clawhub unpin <skill>, clawhub uninstall <skill>, clawhub list, clawhub update --all
  • Inspect without installing: `clawhub inspect @op

💬 联系我们 & 社群

有任何问题、建议或合作需求,欢迎通过以下方式联系:

🧠 知易智能基座 :20+模型自由切换,知识永远留在你手里 —一个key调度所有模型,240+技能即插即用,四色卡片让AI无缝对接工作。 👉 申请体验

  • 🐙 GitHub Issues:提交Issue
  • 💬 微信交流群:扫码加入(备注「技能」)
  • 📮 公众号:关注「TOPGO智能AI123」,每日AI工具与Agent实战干货
微信交流群二维码
💬 微信交流群(备注「技能」)
TOPGO智能AI123公众号二维码
📮 公众号「TOPGO智能AI123」

扫码添加微信,拉你进AI技能交流群;或关注公众号,第一时间获取新技能更新和知易产品动态。

数据与 AI内容与创作

中风险

  • 来源需自行核对维护者身份。
  • 未检测到明显脚本安装指令。
  • 未检测到明显外部权限要求。
  • 未检测到高风险命令。
  • 扫描发现:1 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/anbeime/skill.git
  3. 将 "skills/obsidian-skills-integrated/obsidian-bases" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/anbeime/skill.git
  3. 将 "skills/obsidian-skills-integrated/obsidian-bases" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/anbeime/skill.git
  3. 将 "skills/obsidian-skills-integrated/obsidian-bases" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/anbeime/skill.git
  3. 将 "skills/obsidian-skills-integrated/obsidian-bases" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/anbeime/skill.git
  3. 将 "skills/obsidian-skills-integrated/obsidian-bases" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: obsidian-bases
description: 内容创作者与技术写作员在管理海量笔记时,当需要构建 Obsidian 数据库视图、配置过滤器或编写 YAML 公式,使用此技能可自动生成标准 .base 文件,轻松实现笔记的表格/卡片多维展示与数据汇总,让知识库管理效率翻倍。

Obsidian Bases Skill

This skill enables skills-compatible agents 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

# Global filters apply to ALL views in the base
filters:
  # Can be a single filter string
  # OR a recursive filter object with and/or/not
  and: []
  or: []
  not: []

# Define formula properties that can be used across all views
formulas:
  formula_name: 'expression'

# Configure display names and settings for properties
properties:
  property_name:
    displayName: "Display Name"
  formula.formula_name:
    displayName: "Formula Display Name"
  file.ext:
    displayName: "Extension"

# 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
      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

Filters narrow down results. They can be applied globally or per-view.

Filter Structure

# Single filter
filters: 'status == "done"'

# AND - all conditions must be true
filters:
  and:
    - 'status == "done"'
    - 'priority > 3'

# OR - any condition can be true
filters:
  or:
    - 'file.hasTag("book")'
    - 'file.hasTag("article")'

# NOT - exclude matching items
filters:
  not:
    - 'file.hasTag("archived")'

# Nested filters
filters:
  or:
    - file.hasTag("tag")
    - and:
        - file.hasTag("book")
        - file.hasLink("Textbook")
    - not:
        - file.hasTag("book")
        - file.inFolder("Required Reading")

Filter Operators

OperatorDescription
==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

  1. Note properties - From frontmatter: note.author or just author
  2. File properties - File metadata: file.name, file.mtime, etc.
  3. Formula properties - Computed values: formula.my_formula

File Properties Reference

PropertyTypeDescription
file.nameStringFile name
file.basenameStringFile name without extension
file.pathStringFull path to file
file.folderStringParent folder path
file.extStringFile extension
file.sizeNumberFile size in bytes
file.ctimeDateCreated time
file.mtimeDateModified time
file.tagsListAll tags in file
file.linksListInternal links in file
file.backlinksListFiles linking to this file
file.embedsListEmbeds in the note
file.propertiesObjectAll 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.

formulas:
  # Simple arithmetic
  total: "price * quantity"

  # Conditional logic
  status_icon: 'if(done, "✅", "⏳")'

  # String formatting
  formatted_price: 'if(price, price.toFixed(2) + " dollars")'

  # Date formatting
  created: 'file.ctime.format("YYYY-MM-DD")'

  # Calculate days since created (use .days for Duration)
  days_old: '(now() - file.ctime).days'

  # Calculate days until due date
  days_until_due: 'if(due_date, (date(due_date) - today()).days, "")'

Functions Reference

Global Functions

FunctionSignatureDescription
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

Any Type Functions

FunctionSignatureDescription
isTruthy()any.isTruthy(): booleanCoerce to boolean
isType()any.isType(type): booleanCheck type
toString()any.toString(): stringConvert to string

Date Functions & Fields

Fields: date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond

FunctionSignatureDescription
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 Type

When subtracting two dates, the result is a Duration type (not a number). Duration has its own properties and methods.

Duration Fields:

FieldTypeDescription
duration.daysNumberTotal days in duration
duration.hoursNumberTotal hours in duration
duration.minutesNumberTotal minutes in duration
duration.secondsNumberTotal seconds in duration
duration.millisecondsNumberTotal milliseconds in duration

IMPORTANT: Duration does NOT support .round(), .floor(), .ceil() directly. You must access a numeric field first (like .days), then apply number functions.

# CORRECT: Calculate days between dates
"(date(due_date) - today()).days"                    # Returns number of days
"(now() - file.ctime).days"                          # Days since created

# CORRECT: Round the numeric result if needed
"(date(due_date) - today()).days.round(0)"           # Rounded days
"(now() - file.ctime).hours.round(0)"                # Rounded hours

# WRONG - will cause error:
# "((date(due) - today()) / 86400000).round(0)"      # Duration doesn't support division then round

Date Arithmetic

# Duration units: y/year/years, M/month/months, d/day/days,
#                 w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds

# Add/subtract durations
"date + \"1M\""           # Add 1 month
"date - \"2h\""           # Subtract 2 hours
"now() + \"1 day\""       # Tomorrow
"today() + \"7d\""        # A week from today

# Subtract dates returns Duration type
"now() - file.ctime"                    # Returns Duration
"(now() - file.ctime).days"             # Get days as number
"(now() - file.ctime).hours"            # Get hours as number

# Complex duration arithmetic
"now() + (duration('1d') * 2)"

String Functions

Field: string.length

FunctionSignatureDescription
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

Number Functions

FunctionSignatureDescription
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

List Functions

Field: list.length

FunctionSignatureDescription
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

File Functions

FunctionSignatureDescription
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

Link Functions

FunctionSignatureDescription
asFile()link.asFile(): fileGet file object
linksTo()link.linksTo(file): booleanLinks to file

Object Functions

FunctionSignatureDescription
isEmpty()object.isEmpty(): booleanNo properties
keys()object.keys(): listList of keys
values()object.values(): listList of values

Regular Expression Functions

FunctionSignatureDescription
matches()regexp.matches(string): booleanTest if matches

View Types

Table View

views:
  - type: table
    name: "My Table"
    order:
      - file.name
      - status
      - due_date
    summaries:
      price: Sum
      count: Average

Cards View

views:
  - type: cards
    name: "Gallery"
    order:
      - file.name
      - cover_image
      - description

List View

views:
  - type: list
    name: "Simple List"
    order:
      - file.name
      - status

Map View

Requires latitude/longitude properties and the Maps community plugin.

views:
  - type: map
    name: "Locations"
    # Map-specific settings for lat/lng properties

Default Summary Formulas

NameInput TypeDescription
AverageNumberMathematical mean
MinNumberSmallest number
MaxNumberLargest number
SumNumberSum of all numbers
RangeNumberMax - Min
MedianNumberMathematical median
StddevNumberStandard deviation
EarliestDateEarliest date
LatestDateLatest date
RangeDateLatest - Earliest
CheckedBooleanCount of true values
UncheckedBooleanCount of false values
EmptyAnyCount of empty values
FilledAnyCount of non-empty values
UniqueAnyCount of unique values

Complete Examples

Task Tracker Base

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

Reading List Base

filters:
  or:
    - file.hasTag("book")
    - file.hasTag("article")

formulas:
  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, "")'

properties:
  author:
    displayName: Author
  formula.status_icon:
    displayName: ""
  formula.reading_time:
    displayName: "Est. Time"

views:
  - type: cards
    name: "Library"
    order:
      - cover
      - file.name
      - author
      - formula.status_icon
    filters:
      not:
        - 'status == "dropped"'

  - type: table
    name: "Reading List"
    filters:
      and:
        - 'status == "to-read"'
    order:
      - file.name
      - author
      - pages
      - formula.reading_time

Project Notes Base

filters:
  and:
    - file.inFolder("Projects")
    - 'file.ext == "md"'

formulas:
  last_updated: 'file.mtime.relative()'
  link_count: 'file.links.length'

summaries:
  avgLinks: 'values.filter(value.isType("number")).mean().round(1)'

properties:
  formula.last_updated:
    displayName: "Updated"
  formula.link_count:
    displayName: "Links"

views:
  - type: table
    name: "All Projects"
    order:
      - file.name
      - status
      - formula.last_updated
      - formula.link_count
    summaries:
      formula.link_count: avgLinks
    groupBy:
      property: status
      direction: ASC

  - type: list
    name: "Quick List"
    order:
      - file.name
      - status

Daily Notes Index

filters:
  and:
    - file.inFolder("Daily Notes")
    - '/^\d{4}-\d{2}-\d{2}$/.matches(file.basename)'

formulas:
  word_estimate: '(file.size / 5).round(0)'
  day_of_week: 'date(file.basename).format("dddd")'

properties:
  formula.day_of_week:
    displayName: "Day"
  formula.word_estimate:
    displayName: "~Words"

views:
  - type: table
    name: "Recent Notes"
    limit: 30
    order:
      - file.name
      - formula.day_of_week
      - formula.word_estimate
      - file.mtime

Embedding Bases

Embed in Markdown files:

![[MyBase.base]]

<!-- Specific view -->
![[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

filters:
  and:
    - file.hasTag("project")

Filter by Folder

filters:
  and:
    - file.inFolder("Notes")

Filter by Date Range

filters:
  and:
    - 'file.mtime > now() - "7d"'

Filter by Property Value

filters:
  and:
    - 'status == "active"'
    - 'priority >= 3'

Combine Multiple Conditions

filters:
  or:
    - and:
        - file.hasTag("important")
        - 'status != "done"'
    - and:
        - 'priority == 1'
        - 'due != ""'

References

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!