obsidian-clipper-template-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseObsidian Web Clipper Template Creator
Obsidian Web Clipper 模板创建指南
This skill helps you create importable JSON templates for the Obsidian Web Clipper.
本指南可帮助你为Obsidian Web Clipper创建可导入的JSON模板。
Workflow
工作流程
- Identify User Intent: specific site (YouTube), specific type (Recipe), or general clipping?
- Check Existing Bases: The user likely has a "Base" schema defined in .
Templates/Bases/- Action: Read to find a matching category (e.g.,
Templates/Bases/*.base).Recipes.base - Action: Use the properties defined in the Base to structure the Clipper template properties.
- See references/bases-workflow.md for details.
- Action: Read
- Fetch & Analyze Reference URL: Validate variables against a real page.
- Action: Ask the user for a sample URL of the content they want to clip (if not provided).
- Action (REQUIRED): Use or a browser DOM snapshot to retrieve page content before choosing any selector.
WebFetch - Action: Analyze the HTML for Schema.org JSON, Meta tags, and CSS selectors.
- Action (REQUIRED): Verify each selector against the fetched content. Do not guess selectors.
- See references/analysis-workflow.md for analysis techniques.
- Draft the JSON: Create a valid JSON object following the schema.
- See references/json-schema.md.
- Verify Variables: Ensure the chosen variables (Preset, Schema, Selector) exist in your analysis.
- Action (REQUIRED): If a selector cannot be verified from the fetched content, state that explicitly and ask for another URL.
- See references/variables.md.
- 明确用户意图: 是针对特定网站(如YouTube)、特定类型(如食谱),还是通用剪藏?
- 检查现有基础模板: 用户可能已在目录中定义了“基础”架构。
Templates/Bases/- 操作: 读取文件,找到匹配的分类(如
Templates/Bases/*.base)。Recipes.base - 操作: 使用基础模板中定义的属性来构建剪藏模板的属性结构。
- 详情请参阅references/bases-workflow.md。
- 操作: 读取
- 获取并分析参考URL: 对照真实页面验证变量。
- 操作: 如果用户未提供,请向其索要想要剪藏内容的示例URL。
- 必填操作: 在选择任何选择器之前,使用或浏览器DOM快照获取页面内容。
WebFetch - 操作: 分析HTML中的Schema.org JSON、Meta标签和CSS选择器。
- 必填操作: 对照获取的内容验证每个选择器。请勿猜测选择器。
- 分析技巧请参阅references/analysis-workflow.md。
- 起草JSON: 遵循架构创建有效的JSON对象。
- 详情请参阅references/json-schema.md。
- 验证变量: 确保所选变量(预设、架构、选择器)存在于你的分析结果中。
- 必填操作: 如果某个选择器无法通过获取的内容验证,请明确说明并请求提供另一个URL。
- 详情请参阅references/variables.md。
Selector Verification Rules
选择器验证规则
- Always verify selectors against live page content before responding.
- Never guess selectors. If the DOM cannot be accessed or the element is missing, ask for another URL or a screenshot.
- Prefer stable selectors (data attributes, semantic roles, unique IDs) over fragile class chains.
- Document the target element in your reasoning (e.g., "About sidebar paragraph") to reduce mismatch.
- 始终对照实时页面内容验证选择器后再给出响应。
- 切勿猜测选择器。 如果无法访问DOM或元素缺失,请请求提供另一个URL或截图。
- 优先选择稳定的选择器(数据属性、语义角色、唯一ID)而非易失效的类链。
- 在推理过程中记录目标元素(例如:“关于侧边栏段落”)以减少匹配错误。
Output Format
输出格式
ALWAYS output the final result as a JSON code block that the user can copy and import.
json
{
"schemaVersion": "0.1.0",
"name": "My Template",
...
}请始终将最终结果输出为用户可复制导入的JSON代码块。
json
{
"schemaVersion": "0.1.0",
"name": "My Template",
...
}Resources
资源
- references/variables.md - Available data variables.
- references/filters.md - Formatting filters.
- references/json-schema.md - JSON structure documentation.
- references/bases-workflow.md - How to map Bases to Templates.
- references/analysis-workflow.md - How to validate page data.
- references/variables.md - 可用数据变量。
- references/filters.md - 格式化过滤器。
- references/json-schema.md - JSON结构文档。
- references/bases-workflow.md - 如何将基础模板映射到剪藏模板。
- references/analysis-workflow.md - 如何验证页面数据。
Official Documentation
官方文档
Examples
示例
See assets/ for JSON examples.
请查看assets/目录中的JSON示例。