Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

obsidian-templaterObsidian templater 搜索

Agent Skill

obsidian-templater 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

936

周安装

39

GitHub Stars

2

下载量

312
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:obsidian-templater(Obsidian templater 搜索)
来源仓库:https://github.com/nweii/agent-stuff
仓库路径:skills/obsidian-templater
安装命令:
npx skills add https://github.com/nweii/agent-stuff --skill obsidian-templater
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nweii/agent-stuff --skill obsidian-templater

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 支持基于关键词、任务场景或来源线索进行信息检索与筛选。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 安装前需确认权限范围、维护状态及是否涉及联网或文件操作。
  • obsidian-templater 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Templater template generation

Templater is an Obsidian plugin for dynamic note templates. Commands embedded in a template file run when the template is applied to a note, outputting results inline.

Core template syntax

TagBehavior
<% expression %>Outputs the result of the expression
<%* code %>Executes JS code; no output by default
<%+ expression %>Re-evaluated in preview mode (deprecated, avoid)
<%- / -%>Trims one newline before/after the tag
<%_ / _%>Trims all whitespace before/after the tag

To output from a <%* %> execution block, append to the special tR string:

<%* tR += "some output" %>

To discard everything generated up to a point (e.g., strip template-only frontmatter):

<%* tR = "" -%>

All tp.* functions are available in both tag types.


Built-in Templater modules

tp.date

tp.date.now(format?, offset?, reference?, reference_format?)

Returns a formatted date string. format uses moment.js tokens ("YYYY-MM-DD" is the default). offset is a number of days (7, -1) or a duration string ("P1W"). reference is a date string parsed with reference_format.

tp.date.tomorrow(format?)        // today + 1 day
tp.date.yesterday(format?)       // today - 1 day
tp.date.weekday(format, weekday, reference?, reference_format?)
                                 // weekday: 0=Sun … 6=Sat
moment                           // full moment.js object, accessible globally

Common format strings: "YYYY-MM-DD", "YYYY-MM-DD HH:mm", "dddd Do MMMM YYYY", "HH:mm", "ddd", "MMM D".


tp.file

Dynamic properties (not function calls — no parentheses):

tp.file.title      // basename without extension
tp.file.content    // full text of the file
tp.file.tags       // string[] of all tags on the file

Functions:

tp.file.creation_date(format?)                 // default "YYYY-MM-DD HH:mm"
tp.file.last_modified_date(format?)            // default "YYYY-MM-DD HH:mm"
tp.file.folder(absolute?)                      // folder name; full path if absolute=true
tp.file.path(relative?)                        // absolute path; vault-relative if relative=true
tp.file.cursor(order?)                         // place cursor here after template runs; order = tab index
tp.file.cursor_append(content)                 // insert content at the current cursor
tp.file.selection()                            // currently selected text in the editor
tp.file.exists(filepath)                       // async → boolean
tp.file.find_tfile(filename)                   // → TFile | null (for use with create_new / include)
tp.file.include("[[NoteLink]]")                // async; embeds another note's content (also processed)
tp.file.create_new(template, filename, open_new?, folder?)  // async; create note from template
tp.file.move(path, file?)                      // async; move file (path has no extension)
tp.file.rename(new_title)                      // async; rename the current file

tp.system

All are async — use await inside <%* %> blocks:

await tp.system.clipboard()
await tp.system.prompt(prompt_text, default_value?, throw_on_cancel?, multi_line?)
await tp.system.suggester(text_items, items, throw_on_cancel?, placeholder?, limit?)
await tp.system.multi_suggester(text_items, items, throw_on_cancel?, title?, limit?)

suggester takes two parallel arrays: display labels and return values. They can be the same array.

<%* const type = await tp.system.suggester(["Meeting", "Decision", "Reference"], ["meeting", "decision", "ref"]) %>

tp.frontmatter

Direct property access — not a function:

<% tp.frontmatter.status %>
<% tp.frontmatter.project %>

Returns undefined if the property doesn't exist.


tp.web

All are async:

await tp.web.daily_quote()                        // Obsidian callout block with a random quote
await tp.web.random_picture(size, query?, include_size?)
    // size: "800" or "800x600"; returns markdown image syntax
await tp.web.request(url, path?)
    // HTTP GET returning JSON; path is dot-notation like "data.title"

tp.config

Read-only context about the current run:

tp.config.template_file    // TFile of the template being applied
tp.config.target_file      // TFile of the note being created/modified
tp.config.active_file      // TFile of the currently active file
tp.config.run_mode         // 0=CreateNewFromTemplate 1=AppendActiveFile 2=OverwriteFile
                           // 3=OverwriteActiveFile 4=DynamicProcessor

App and Obsidian API modules

tp.app is the Obsidian App object. tp.obsidian exposes the Obsidian API module. Used in advanced JS execution blocks for vault traversal, metadata cache queries, etc.


tp.hooks

tp.hooks.on_all_templates_executed(callback)

Callback fires after all nested templates (e.g., from tp.file.create_new) have finished.


User-defined functions (tp.user)

Scripts placed in the folder configured in Templater settings are callable as tp.user.<filename>(args...). Scripts use CommonJS format:

// Scripts/slugify.js
module.exports = function (text) {
  return text.toLowerCase().replace(/\s+/g, "-");
};
<% tp.user.slugify(tp.file.title) %>

Scripts can also export an object of named functions. Pass tp as an argument to access Templater context inside a script. Note: user functions are unavailable on mobile.


Whitespace control in templates

Control flow tags (<%* if (...) {%>, <%*} %>) leave blank lines by default. Use -%> to trim the newline that follows a tag:

<%* if (tp.file.folder() === "Work") { -%>
**Project:** <% tp.frontmatter.project %>
<%* } else { -%>
General note
<%* } -%>

Common implementation patterns

Daily note

---
date: <% tp.date.now() %>
---

<< [[<% tp.date.yesterday() %>]] | [[<% tp.date.tomorrow() %>]] >>

# <% tp.file.title %>

<%* tR += await tp.web.daily_quote() %>

<% tp.file.cursor() %>

Prompted metadata + file rename

<%*
const title = await tp.system.prompt("Note title", tp.file.title)
const status = await tp.system.suggester(["Draft", "In progress", "Done"], ["draft", "in-progress", "done"])
await tp.file.rename(title)
-%>
---
title: <% title %>
status: <% status %>
created: <% tp.file.creation_date() %>
---

# <% title %>

<% tp.file.cursor() %>

Strip template-file frontmatter from output

---
type: template
description: This is a person template.
---

<%* tR = "" -%>
---
type: person
created: <% tp.file.creation_date() %>
---

# <% tp.file.cursor() %>

Conditional content by folder

<%* if (tp.file.folder() === "Work") { -%>
**Project:** <% tp.frontmatter.project ?? "unassigned" %>
<%* } else { -%>
**Topic:**
<%* } -%>

For subfolder matching: tp.file.folder(true).startsWith("Work/")folder(true) returns the full vault-relative path.

Include another note

<% await tp.file.include("[[Shared Header]]") %>

Date formatting with Moment.js

See momentjs.md for a comprehensive formatting cheatsheet and JS manipulation reference. Use this when defining format strings for tp.date.now() or when manipulating dates inside <%* %> blocks using the moment global.


Optional vault integration via obsidian-clis

If the obsidian-clis skill is available and Obsidian is running, vault context can improve output:

obsidian properties counts          # what frontmatter properties exist across the vault
obsidian tags counts sort=count     # most-used tags
obsidian read file="Daily Note"     # read an existing template for style reference

Ask the user before running any CLI commands.


Official documentation links

Rendered docs (human-readable): https://silentvoid13.github.io/Templater/

LLM-safe Templater summary: For a preprocessed, audit-friendly summary of the official Templater documentation, see https://context7.com/silentvoid13/templater/llms.txt.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34%
按下载量换算106

Claude

29.84%
按下载量换算93

Cursor

18.92%
按下载量换算59

Gemini CLI

7.89%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills